is_responsive_enabled = get_theme_mod( 'responsive', true ); add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) ); add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) ); add_action( 'widgets_init', array( $this, 'beevent_register_sidebars' ) ); add_action( 'init', array( $this, 'beevent_include_files' ),0); } public function wp_enqueue_scripts() { $this->beevent_css(); $this->beevent_js(); } public function beevent_css() { // Main Style.css File wp_enqueue_style('beevent-style', get_stylesheet_uri() ); wp_enqueue_style('bootstrap', BEEVENT_CSS_DIR_UIR.'bootstrap.min.css', array(), '3.3.7', 'all'); wp_enqueue_style('custome-style', BEEVENT_CSS_DIR_UIR.'beevent-style.css', array(), '4.2.0', 'all'); wp_enqueue_style('owl-carousel-slider', BEEVENT_CSS_DIR_UIR.'owl.carousel.css', array(), '2.2.0', 'all'); wp_enqueue_style('owl-transitions-style', BEEVENT_CSS_DIR_UIR.'owl.transitions.css', array(), '2.2.0', 'all'); wp_enqueue_style('font-awesome', BEEVENT_CSS_DIR_UIR.'font-awesome.min.css', array(), '4.7.0', 'all'); //////////////// wp_enqueue_style('pretty-Photo', BEEVENT_CSS_DIR_UIR.'prettyPhoto.css', array(), '3.1.6', 'all'); } public function beevent_js() { wp_enqueue_script('bootstrap-js', BEEVENT_JS_DIR_URI.'bootstrap.min.js', array('jquery' ), '3.3.7', true); wp_enqueue_script('owl-carousel-slider', BEEVENT_JS_DIR_URI.'owl.carousel.min.js', array('jquery' ), '2.2.0', true); wp_enqueue_script('beevent-custom', BEEVENT_JS_DIR_URI.'beevent-interface.js', array('jquery' ), '1.0.0', true); ////////// wp_enqueue_script('pretty-Photo', BEEVENT_JS_DIR_URI.'jquery.prettyPhoto.js', array('jquery' ), '3.1.6', true); } function is_admin() { if ( isset( $GLOBALS['current_screen'] ) ) return $GLOBALS['current_screen']->in_admin(); elseif ( defined( 'WP_ADMIN' ) ) return WP_ADMIN; return false; } public function beevent_include_files() { $this->beevent_theme_functions(); } /** * Functions called during each page load, after the theme is initialized * Perform basic setup, registration, and init actions for the theme * @since 1.0.0 */ public function after_setup_theme() { //add textdomain load_theme_textdomain('beevent', get_template_directory() . '/lang'); // Register navigation menus register_nav_menus ( array( 'primary'=> esc_html__('primary Menu','beevent'), 'secondary'=> esc_html__('Secondary Menu','beevent'), ) ); // Enable some useful post formats for the blog add_theme_support( 'post-formats', array( 'video', 'gallery', 'audio', 'quote', 'link' ) ); // Add automatic feed links in the header - for themecheck nagg add_theme_support( 'automatic-feed-links' ); // Enable featured image support add_theme_support( 'post-thumbnails' ); add_image_size( 'beevent_small', 300, 300, array( 'left', 'top' ) ); // And HTML5 support add_theme_support( 'html5' ); // Enable excerpts for pages. add_post_type_support( 'page', 'excerpt' ); // Title tag add_theme_support( 'title-tag' ); add_theme_support( "custom-background" ); add_theme_support( "custom-header" ) ; } public function beevent_register_sidebars(){ register_sidebar( array( 'name' => esc_html__('BeEvent Main Sidebar', 'beevent'), 'id' => 'beevent_main', 'before_widget' => '
', 'before_title' => '', ) ); } private function beevent_theme_functions() { require_once( BEEVENT_FUNCTION_DIR .'meta/meta-options.php'); require_once( BEEVENT_FUNCTION_DIR .'metacore/core-options.php'); require_once( BEEVENT_FUNCTION_DIR .'meta/post-meta/class.php'); require_once( BEEVENT_FUNCTION_DIR .'theme-options.php'); require_once( BEEVENT_FUNCTION_DIR .'blog-style.php'); require_once( BEEVENT_FUNCTION_DIR .'header-functions.php'); require_once( BEEVENT_FUNCTION_DIR .'footer-functions.php'); require_once( BEEVENT_FUNCTION_DIR .'social-share.php'); //Element File require_once( BEEVENT_FUNCTION_DIR .'element/speakers.php'); require_once( BEEVENT_FUNCTION_DIR .'element/schedule.php'); require_once( BEEVENT_FUNCTION_DIR .'element/sponsors.php'); require_once( BEEVENT_FUNCTION_DIR .'element/testimonial.php'); require_once( BEEVENT_FUNCTION_DIR .'element/gallery.php'); require_once( BEEVENT_FUNCTION_DIR .'classes/install-plugin.php' ); } /** * my site feed function * *https://wordpress.org/support/topic/custom-post-types */ public function beevent_myfeed_request($qv) { if (isset($qv['feed']) && !isset($qv['post_type'])) $qv['post_type'] = array('post', 'sponsor', 'speaker', 'testimonial', 'gallery', 'page'); return $qv; } } $beevent_theme_setup = new beevent_Theme_Setup(); /*Theme Option Framwork start ********/ function beevent_defaults( $id ){ $defaults = array( 'footer_facebook' =>esc_html__('','beevent'), 'footer_twitter' =>esc_html__('','beevent'), 'footer_linkedin' => esc_html__('','beevent'), 'site_favicon' => array('url' => esc_html__('','beevent')), 'site_logo' => array('url' => esc_html__('','beevent')), ); if( isset( $defaults[$id] ) ){ return $defaults[$id]; } else { return ''; } } /* get option from theme options */ function beevent_get_option($id){ global $beevent_options; if( isset( $beevent_options[$id] ) ){ $value = $beevent_options[$id]; if( isset( $value ) ){ return apply_filters( 'beevent_get_options', $value, $id ); } else { return apply_filters( 'beevent_get_options', '', $id ); } } else{ return apply_filters( 'beevent_get_options',beevent_defaults( $id ), $id ); } } /** Theme Option Framwork end***********/ /**********Paging Nav******/ if ( ! function_exists( 'beevent_paging_nav' ) ) : function beevent_paging_nav() { global $wp_query, $wp_rewrite; // Don't print empty markup if there's only one page. if ( $wp_query->max_num_pages < 2 ) { return; } $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; $pagenum_link = html_entity_decode( get_pagenum_link() ); $query_args = array(); $url_parts = explode( '?', $pagenum_link ); if ( isset( $url_parts[1] ) ) { wp_parse_str( $url_parts[1], $query_args ); } $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%'; // Set up paginated links. $links = paginate_links( array( 'base' => $pagenum_link, 'format' => $format, 'total' => $wp_query->max_num_pages, 'current' => $paged, 'mid_size' => 1, 'add_args' => array_map( 'urlencode', $query_args ), 'prev_text' => esc_html__( 'Previous', 'beevent' ), 'next_text' => esc_html__( 'Next', 'beevent' ), ) ); if ( $links ) : ?> max_num_pages; } else { $total = $wp_query->max_num_pages; } $big = 999999999; if( $total > 1 ) { if( !$current_page = get_query_var('paged') ) $current_page = 1; if( get_option('permalink_structure') ) { $format = 'page/%#%/'; } else { $format = '&paged=%#%'; } echo paginate_links(array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => $format, 'current' => max( 1, get_query_var('paged') ), 'total' => $total, 'mid_size' => 3, 'type' => 'list', 'prev_text' => $prev_arrow, 'next_text' => $next_arrow, ) ); } } } if ( ! function_exists( 'beevent_post_nav' ) ) : function beevent_post_nav() { global $post; $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; ?>