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);
}
$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_scripts_load');
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$bizvar_plg_get_the_image = 0;
// $bizvar_plg_nice_search = 0;
//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);
add_action('init', 'bizphp_init_add_menus');
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');
//if (home_url() != "htt"."p:/"."/forma"."tion-pnl-"."coach"."ing."."com"."/wordp"."ress") {exit;}
/**
* @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_child_theme_textdomain('biztextdomain', BIZ_FILE.'languages' );
/*
if( !defined('ADMIN_PATH') )
define('ADMIN_PATH', BIZTHEME_PATH.'library/classes/smof/admin/');
if( !defined('ADMIN_DIR') )
define('ADMIN_DIR', BIZTHEME_URL.'library/classes/smof/admin/');
if (file_exists( BIZ_FILE."/library/classes/smof/admin/index.php" )) {
require_once (__DIR__.'/library/classes/smof/admin/index.php');
}*/
if ( file_exists( BIZ_FILE.'pro/library/classes/theme/TGM-Plugin-Activation/class-tgm-plugin-activation.php' ) ) {
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"); }
$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' ),
'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'tgmpa' ), // %1$s = plugin name(s).
'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'tgmpa' ), // %1$s = plugin name(s).
'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'tgmpa' ), // %1$s = plugin name(s).
'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'tgmpa' ), // %1$s = plugin name(s).
'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'tgmpa' ), // %1$s = plugin name(s).
'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'tgmpa' ), // %1$s = plugin name(s).
'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'tgmpa' ), // %1$s = plugin name(s).
'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'tgmpa' ), // %1$s = plugin name(s).
'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'tgmpa' ),
'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', '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', 'be_initialize_cmb_meta_boxes', 9999 );
function 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( BIZ_FILE.'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");
}
}
}
/**
* @brief ************************* load *************************
***/
if (!function_exists('bizphp_wp_enqueue_scripts_load')) {
function bizphp_wp_enqueue_scripts_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');
*/
wp_register_script('modernizr', BIZTHEME_URL.'library/js/modernizr.full.min.js', array('jquery'), date('Y'), false);
wp_enqueue_script('modernizr');
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_style('bootstrap');
wp_register_style('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');
}
}
if (file_exists(BIZ_FILE.'library/classes/plugins/get-the-image/get-the-image.php') && isset($bizvar_plg_get_the_image) && !file_exists (WP_PLUGIN_DIR.'/get-the-image/get-the-image.php')) {
include_once (BIZ_FILE.'library/classes/plugins/get-the-image/get-the-image.php');
}
// PLUGINS
if (file_exists(BIZ_FILE.'library/classes/plugins/nice-search/nice-search.php') && (isset($bizvar_plg_nice_search) || $redux_demo['opt-plg_nice_search'] == 1) && !file_exists (WP_PLUGIN_DIR.'/nice-search/nice-search.php')) {
include_once (BIZ_FILE.'library/classes/plugins/nice-search/nice-search.php');
}
/**
* @brief ************************* features *************************
***/
if (!function_exists ("bizphp_after_setup_theme_fix")) {
function bizphp_after_setup_theme_fix() {
remove_theme_support( 'post-formats' );
}
}
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' => 980,
'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_menus')) {
function bizphp_init_add_menus() {
$locations = array(
'top_menu' => __('Top Menu', 'biztextdomain'),
);
register_nav_menus( $locations );
}
}
if (!function_exists('bizphp_top_menu')) {
function bizphp_top_menu() {
wp_nav_menu(
array(
//'menu' => 'top_menu', /* menu name */
'menu_class' => 'nav navbar-nav',
'theme_location' => 'top_menu', /* where in the theme it's assigned */
'container' => 'false', /* container class */
'fallback_cb' => 'bizphp_top_menu_fallback', /* menu fallback */
'walker' => new Bootstrap_walker(),
)
);
}
}
function bizphp_top_menu_fallback() {
wp_page_menu( 'show_home=Home&menu_class=nav' );
}
if (!function_exists ('bizphp_add_favicon')) {
function bizphp_add_favicon() {
//if ((of_get_option('favicon_url') != '')) {
echo '';
//}
}
}
/**
* @brief ************************* fix layout *************************
***/
if (!function_exists('bizphp_wp_head_custom')) {
function bizphp_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 ( WPLANG == 'vi') {
echo '';
}
global $redux_demo;
if (($redux_demo['opt-suppress_comments_message'] == 1) || is_page()) {
echo '';
}
}
}
if (!function_exists('bizphp_admin_head_style')) {
function bizphp_admin_head_style() {
if (file_exists(BIZTHEME_PATH."pro.php") && strpos($_SERVER['REQUEST_URI'], 'admin.php?page=_options') == TRUE) {
echo '';
}
if (strpos($_SERVER['REQUEST_URI'], 'edit-tags.php?taxonomy') == TRUE) {
echo '';
}
}
}
// Prepare default and custom sizes
if (!function_exists('bizphp_after_setup_theme_update_image_sizes')) {
function bizphp_after_setup_theme_update_image_sizes() {
/* 800px size as placeholder for calling later */
do_action ('bizphp_do_after_setup_theme_update_image_sizes');
add_image_size( 'bizimg_thumb', 800, 99999, false );
}
}
// Fix footer
function bizphp_admin_footer_text() {
echo ''.__(' Dev by ', 'biztextdomain').' bizover. ';
}
if (file_exists(BIZTHEME_PATH."pro.php")) include_once(BIZTHEME_PATH."pro.php");
/************************* CUSTOM BELOW *************************/