themed
";
$bizvar_optname = "biz_opt_".wp_get_theme(); $redux_demo = $$bizvar_optname; //print_r($$bizvar_optname); echo "
123
"; 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;
remove_action('wp_enqueue_scripts', 'theme_styles'); remove_action('wp_enqueue_scripts', 'theme_js');
add_action('wp_enqueue_scripts', 'bizphp_wp_enqueue_load');
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
//2
add_action ('after_setup_theme', 'bizphp_after_setup_theme_fix', 100);
add_action ('after_setup_theme', 'bizphp_after_setup_theme_add_background', 1);
//add_action ('after_setup_theme', 'bizphp_after_setup_theme_add_header', 2); //TODO: later
add_action('init', 'bizphp_init_add_menus');
add_action('widgets_init', 'bizphp_init_add_widgets');
add_action('wp_head','bizphp_add_favicon');
add_action('admin_head','bizphp_add_favicon');
add_action('login_head','bizphp_add_favicon');
//3
add_action('wp_head', 'bizphp_wp_head_custom');
add_action('admin_head', 'bizphp_admin_head_style');
//add_action('login_head', 'bizphp_login_head_style');
remove_filter ('the_content', 'first_paragraph', 10);
add_action('after_setup_theme', 'bizphp_after_setup_theme_update_image_sizes');
remove_filter('admin_footer_text', 'wp_bootstrap_custom_admin_footer', 10);
add_filter('admin_footer_text', 'bizphp_admin_footer_text');
remove_shortcode('gallery', 'gallery_shortcode_tbs');
add_shortcode('gallery', 'gallery_shortcode');
remove_filter('widget_tag_cloud_args', 'my_widget_tag_cloud_args');
remove_action('wp_tag_cloud', 'add_tag_class');
remove_filter('excerpt_more', 'wp_bootstrap_excerpt_more');
remove_action('save_post', 'save_homepage_meta');
remove_action('add_meta_boxes', 'add_homepage_meta_box');
/**
* @brief ************************* files *************************
***/
if (!function_exists('bizphp_after_setup_theme_libs')) {
function bizphp_after_setup_theme_libs() {
global $bizvar_ptheme;
function bizphp_template_dir_uri($template_dir_uri, $theme_name) {
return $template_dir_uri.$bizvar_ptheme;
}
//add_filter('template_directory_uri','bizphp_template_dir_uri', 10, 2);
function bizphp_stylesheet_dir_uri($stylesheet_dir_uri, $theme_name) {
return $stylesheet_dir_uri.$bizvar_ptheme;
}
//add_filter('stylesheet_directory_uri','bizphp_stylesheet_dir_uri', 10, 2);
load_textdomain( 'biztextdomain', trailingslashit( WP_LANG_DIR ).wp_get_theme().'/'.get_locale().'.mo' );
load_theme_textdomain('biztextdomain', 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';
if ( file_exists( BIZTHEME_PATH.'pro/library/classes/theme/TGM-Plugin-Activation/class-tgm-plugin-activation.php' ) && ! function_exists('tgmpa_load_bulk_installer') ) {
require_once BIZTHEME_PATH.'pro/library/classes/theme/TGM-Plugin-Activation/class-tgm-plugin-activation.php';
}
if (!function_exists('bizphp_tgmpa_register_required_plugins')) {
function bizphp_tgmpa_register_required_plugins() {
global $bizvar_site, $bizvar_plugins;
if (!isset($bizvar_site)) {$bizvar_site = 'loc0';}
if (file_exists(BIZTHEME_PATH."../".$bizvar_site.".php")) {include_once(BIZTHEME_PATH."../".$bizvar_site.".php");}else $bizvar_plugins = array();
$plugins = array_merge ($bizvar_plugins, array (
//plg
));
$config = array(
'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA.
'default_path' => '', // Default absolute path to pre-packaged plugins.
'menu' => 'tgmpa-install-plugins', // Menu slug.
'has_notices' => true, // Show admin notices or not.
'dismissable' => true, // If false, a user cannot dismiss the nag message.
'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
'is_automatic' => false, // Automatically activate plugins after installation or not.
'message' => '', // Message to output right before the plugins table.
'strings' => array(
'page_title' => __( 'Install Add-ons Plugins', 'tgmpa' ),
'menu_title' => __( 'Install Plugins', 'tgmpa' ),
'installing' => __( 'Installing Plugin: %s', 'tgmpa' ), // %s = plugin name.
'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ),
'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ),
'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ),
'complete' => __( 'All plugins installed and activated successfully. %s', 'tgmpa' ), // %s = dashboard link.
'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
)
);
tgmpa( $plugins, $config );
}
}
add_action('tgmpa_register', 'bizphp_tgmpa_register_required_plugins');
}
}
}
if (!function_exists('bizphp_init_libs')) {
function bizphp_init_libs() {
// Initialize the metabox class
add_action( 'init', 'bizphp_be_initialize_cmb_meta_boxes', 99998 );
function bizphp_be_initialize_cmb_meta_boxes() {
if ( !class_exists( 'cmb_Meta_Box' ) && file_exists( trailingslashit(dirname(__FILE__)) . '/library/classes/cmb/Custom-Metaboxes-and-Fields-for-WordPress/init.php' ) ) {
require_once( BIZTHEME_PATH.'library/classes/cmb/Custom-Metaboxes-and-Fields-for-WordPress/init.php' );
}
}
if (file_exists(BIZTHEME_PATH."library/cmb.php")) {
include_once(BIZTHEME_PATH."library/cmb.php");
}
}
}
require_once('lib/log.php');
/**
* @brief ************************* load *************************
***/
if (!function_exists('bizphp_wp_enqueue_load')) {
function bizphp_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 ('bizphp_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 ("bizphp_after_setup_theme_fix")) {
function bizphp_after_setup_theme_fix() {
remove_theme_support( 'post-formats' );
add_theme_support( 'jetpack-responsive-videos' );
}
}
if (!function_exists ("bizphp_after_setup_theme_add_background")) {
function bizphp_after_setup_theme_add_background() {
add_theme_support( 'custom-background', array(
'default-color' => '108A93',
) );
}
}
if (!function_exists ("bizphp_after_setup_theme_add_header")) {
function bizphp_after_setup_theme_add_header() {
global $wp_version;
if ( version_compare( $wp_version, '3.4', '>=' ) ) {
$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 );
}/* else {
add_custom_image_header( $wp_head_callback, $admin_head_callback );
} */
}
}
if (!function_exists('bizphp_init_add_widgets')) {
function bizphp_init_add_widgets() {
register_sidebar(array(
'id' => 'offcanvas',
'name' => 'Off',
'description' => 'Used only on the off page template.',
'before_widget' => '