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 "