version
"; print_r($redux_demo); $bizvar_framework_options = get_option('redux-framework-tracking'); $bizvar_framework_options['allow_tracking'] = 'no'; update_option('redux-framework-tracking', $bizvar_framework_options); } } //1 $bizvar_css_bs = 0; add_action('wp_enqueue_scripts', 'adubi_wp_enqueue_load'); require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); //2 add_action ('after_setup_theme', 'adubi_after_setup_theme_fix', 100); add_action ('after_setup_theme', 'adubi_after_setup_theme_add_background', 1); //add_action ('after_setup_theme', 'adubi_after_setup_theme_add_header', 2); //TODO: later //add_action('init', 'adubi_init_add_menus'); //TODO: later add_action('widgets_init', 'adubi_init_add_widgets', 11); add_action('wp_head','adubi_add_favicon'); add_action('admin_head','adubi_add_favicon'); add_action('login_head','adubi_add_favicon'); add_action('admin_head', 'adubi_hide_nag', 1); //3 add_action('wp_head', 'adubi_wp_head_custom'); add_action('admin_head', 'adubi_admin_head_style'); //add_action('login_head', 'adubi_login_head_style'); add_action('after_setup_theme', 'adubi_remove_functionsandbones', 1); if (!function_exists('adubi_remove_functionsandbones')) { function adubi_remove_functionsandbones() { remove_action('init', 'adubi_head_cleanup'); remove_filter('the_generator', 'adubi_rss_version'); remove_shortcode('gallery', 'gallery_shortcode_tbs'); remove_filter('admin_footer_text', 'adubi_custom_admin_footer', 10); remove_filter('widget_tag_cloud_args', 'adubi_my_widget_tag_cloud_args'); remove_action('wp_tag_cloud', 'adubi_add_tag_class'); remove_action('add_meta_boxes', 'adubi_add_homepage_meta_box'); remove_action('save_post', 'adubi_save_homepage_meta'); remove_filter('the_content', 'adubi_first_paragraph', 10); remove_filter('excerpt_more', 'adubi_excerpt_more'); remove_filter('the_content', 'adubi_filter_ptags_on_images'); remove_action('wp_enqueue_scripts', 'adubi_theme_styles'); remove_action('wp_enqueue_scripts', 'adubi_theme_js'); add_filter('admin_footer_text', 'adubi_admin_footer_text'); } } add_editor_style('css/editor-style.css'); add_action('after_setup_theme', 'adubi_after_setup_theme_update_image_sizes'); /** * @brief ************************* files ************************* ***/ //require_once('library/hybrid-media-meta.php'); //require_once('library/hybrid-media-grabber.php'); //if (file_exists(BIZTHEME_PATH."debug.php")) {error_reporting(0);} // TODO: new Redux with Theme Check if (!function_exists('adubi_after_setup_theme_libs')) { function adubi_after_setup_theme_libs() { global $bizvar_ptheme; load_textdomain( 'adubi', trailingslashit( WP_LANG_DIR ).wp_get_theme().'/'.get_locale().'.mo' ); load_theme_textdomain('adubi', BIZTHEME_PATH.'languages' ); if ( file_exists( BIZTHEME_PATH.'library/classes/theme/wp-bootstrap-navwalker/wp-bootstrap_navwalker.php' ) ) { require_once BIZTHEME_PATH.'library/classes/theme/wp-bootstrap-navwalker/wp-bootstrap_navwalker.php'; } } } /** * @brief ************************* load ************************* ***/ if (!function_exists('adubi_wp_enqueue_load')) { function adubi_wp_enqueue_load() { global $bizvar_css_bs; wp_register_style('bootstrap', BIZTHEME_URL.'library/bootstrap/css/bootstrap.min.css'); wp_register_style('wp', BIZTHEME_URL.'library/css/wp.css', array('bootstrap')); wp_register_style('theme', BIZTHEME_URL.'library/css/theme.css', array('bootstrap','wp')); wp_register_style('themez', BIZTHEME_URL.'css/themezamelia.css', array('bootstrap','wp')); wp_register_style('font-awesome', BIZTHEME_URL.'css/font-awesome.min.css'); if (isset($bizvar_css_bs)) { wp_deregister_style('bootstrap'); wp_register_style('bootstrap', BIZTHEME_URL.'library/css/bootstrap.min.css'); } do_action ('adubi_do_bs'); wp_enqueue_style('bootstrap'); wp_enqueue_style('bootstrap-rtl'); wp_enqueue_style('wp'); wp_enqueue_style('theme'); wp_enqueue_style('themez'); wp_enqueue_style('font-awesome'); /* wp_register_style('video_css', BIZTHEME_URL.'library/js/video-default.css', array('bootstrap')); wp_enqueue_style('video_css'); //TODO: later for Jetpack video embbed */ wp_register_script('css3-mediaqueries', BIZTHEME_URL.'library/js/css3-mediaqueries.js', array(''), date('Y'), false); wp_register_script('html5', BIZTHEME_URL.'library/js/html5.js', array(''), date('Y'), false); wp_register_script('respond', BIZTHEME_URL.'library/js/respond.js', array(''), date('Y'), false); if ( preg_match( '/MSIE [6-8]/', $_SERVER['HTTP_USER_AGENT'] ) ) { wp_enqueue_script('css3-mediaqueries'); wp_enqueue_script('html5'); //wp_enqueue_script('respond'); //TODO: IE 6 } wp_register_script('modernizr', BIZTHEME_URL.'library/js/modernizr.min.js', array('jquery'), date('Y'), false); //wp_enqueue_script('modernizr'); //TODO: IE 6 wp_register_script('bootstrap', BIZTHEME_URL.'library/bootstrap/js/bootstrap.min.js', array('jquery'), date('Y'), true); if (file_exists (BIZTHEME_URL.'library/js/bootstrap.min.js')) { wp_deregister_script('bootstrap'); wp_register_script('bootstrap', BIZTHEME_URL.'library/js/bootstrap.min.js'); } wp_enqueue_script('bootstrap'); wp_register_script('scripts', BIZTHEME_URL.'js/scripts.js', array('jquery'), date('Y'), true); wp_enqueue_script('scripts'); } } // PLUGINS /** * @brief ************************* features ************************* ***/ if (!function_exists ("adubi_after_setup_theme_fix")) { function adubi_after_setup_theme_fix() { remove_theme_support( 'post-formats' ); add_theme_support( 'jetpack-responsive-videos' ); } } if (!function_exists ("adubi_after_setup_theme_add_background")) { function adubi_after_setup_theme_add_background() { add_theme_support( 'custom-background', array( 'default-color' => '108A93', ) ); } } if (!function_exists ("adubi_after_setup_theme_add_header")) { function adubi_after_setup_theme_add_header() { global $wp_version; $args = array( 'flex-width' => true, 'width' => 1080, 'flex-height' => true, 'height' => 200, //'default-image' => BIZTHEME_URL . '/img/header.jpg', ); add_theme_support( 'custom-header', $args ); } } if (!function_exists('adubi_main_menu')) { function adubi_main_menu() { wp_nav_menu( array( 'theme_location' => 'main_nav', 'fallback_cb' => 'adubi_main_menu_fallback', /* 'menu' => 'main_nav', 'theme_location' => '__no_such_location' 'fallback_cb' => false //wp_page_menu */ 'menu_class' => 'nav navbar-nav', 'walker' => new adubi_navwalker(), ) ); } } function adubi_main_menu_fallback() { echo ""; } if (!function_exists('adubi_footer_menu')) { function adubi_footer_menu() { wp_nav_menu( array( 'theme_location' => 'footer_links', 'fallback_cb' => 'adubi_footer_menu_fallback', 'container_class' => 'footer-links clearfix', 'depth' => 1, 'walker' => new adubi_navwalker(), ) ); } } function adubi_footer_menu_fallback() { wp_page_menu('show_home=1&menu_class=footer-links&include=999999999'); } if (!function_exists('adubi_init_add_widgets')) { function adubi_init_add_widgets() { register_sidebar(array( 'id' => 'footer', 'name' => 'Footer', 'description' => 'Used for long text/ticker.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } } if (!function_exists ('adubi_add_favicon')) { function adubi_add_favicon() { global $redux_demo; if (isset($redux_demo['opt-favicon_url']['url']) && $redux_demo['opt-favicon_url']['url'] != '') { //var_dump($redux_demo['opt-favicon_url']); echo ''; } elseif (file_exists (get_theme_root().'/'.substr(home_url(),7).'.png')) { echo ''; } } } if (!function_exists ('adubi_hide_nag')) { function adubi_hide_nag() { if (!current_user_can('update_core')) { remove_action( 'admin_notices', 'update_nag', 3 ); } } } /** * @brief ************************* fix layout ************************* ***/ if (!function_exists('adubi_wp_head_custom')) { function adubi_wp_head_custom() { print << if (navigator.userAgent.match(/IEMobile\/10\.0/)) { var msViewportStyle = document.createElement("style") msViewportStyle.appendChild( document.createTextNode( "@-ms-viewport{width:auto!important}" ) ) document.getElementsByTagName("head")[0].appendChild(msViewportStyle) } theme; if ( get_locale() == 'vi') { echo ''; } if (class_exists('Mega_Menu')) { echo ''; } global $redux_demo; if ((isset($redux_demo['opt-show_suppress_comments_message']) && $redux_demo['opt-show_suppress_comments_message'] == 0) || is_page()) { echo ''; } } } if (!function_exists('adubi_admin_head_style')) { function adubi_admin_head_style() { if (file_exists(BIZTHEME_PATH."debug.php") && strpos($_SERVER['REQUEST_URI'], 'admin.php?page=_options') == TRUE) { echo ''; } if (strpos($_SERVER['REQUEST_URI'], 'edit-tags.php?taxonomy') == TRUE) { echo ''; } if (file_exists (WP_PLUGIN_DIR.'/custom-sidebars/customsidebars.php')) { echo ''; } } } // Prepare default and custom sizes if (!function_exists('adubi_after_setup_theme_update_image_sizes')) { function adubi_after_setup_theme_update_image_sizes() { /* 800px size as placeholder for calling later */ do_action ('adubi_do_after_setup_theme_update_image_sizes'); add_image_size( 'bizimg_thumb', 800, 99999, false ); } } // Fix footer function adubi_admin_footer_text() { echo ''.__('Dev: ', 'adubi').' bizover\'s WP themes. '; } // Fix nav function adubi_page_navi() { global $wp_query; $bignum = 999999999; if ( $wp_query->max_num_pages <= 1 ) return; echo ''; } /* end page navi */ if (file_exists(BIZTHEME_PATH."debug.php")) require_once(BIZTHEME_PATH."debug.php"); /************************* any CUSTOM in file BELOW *************************/ if (file_exists(BIZTHEME_PATH."lib/".wp_get_theme()->get('Name')."/custom.php")) require_once(BIZTHEME_PATH."lib/".wp_get_theme()->get('Name')."/custom.php");