Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../wp-conte.../plugins/themify-.../themify
File: themify-admin.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Themify admin page
[2] Fix | Delete
*
[3] Fix | Delete
* @package Themify
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
defined( 'ABSPATH' ) || exit;
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Enqueue JS and CSS for Themify settings page and meta boxes
[10] Fix | Delete
* @param String $page
[11] Fix | Delete
* @since 1.1.1
[12] Fix | Delete
*******************************************************/
[13] Fix | Delete
function themify_enqueue_scripts($page){
[14] Fix | Delete
$pagenow = isset( $_GET['page'] ) ? $_GET['page'] : '';
[15] Fix | Delete
[16] Fix | Delete
// Don't do anything while updating the theme
[17] Fix | Delete
if ( 'themify' === $pagenow && isset( $_GET['action'] ) && 'upgrade' === $_GET['action'] ) {
[18] Fix | Delete
return;
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
global $typenow;
[22] Fix | Delete
$types = themify_post_types();
[23] Fix | Delete
$pages = apply_filters( 'themify_top_pages', array( 'post.php', 'post-new.php', 'toplevel_page_themify', 'nav-menus.php' ) );
[24] Fix | Delete
$pagenows = apply_filters( 'themify_pagenow', array( 'themify' ) );
[25] Fix | Delete
[26] Fix | Delete
wp_register_style( 'tf_base', THEMIFY_URI . '/css/base.min.css', null, THEMIFY_VERSION);
[27] Fix | Delete
wp_register_style( 'themify-ui', THEMIFY_URI . '/css/themify-ui.css', array('tf_base'), THEMIFY_VERSION );
[28] Fix | Delete
wp_register_style( 'themify-ui-rtl', THEMIFY_URI . '/css/themify-ui-rtl.css', array('themify-ui'), THEMIFY_VERSION );
[29] Fix | Delete
wp_register_style( 'themify-colorpicker', THEMIFY_METABOX_URI . 'css/jquery.minicolors.css', null, THEMIFY_VERSION );
[30] Fix | Delete
wp_register_script( 'markjs', THEMIFY_URI . '/js/admin/jquery-mark.min.js', array('jquery'), THEMIFY_VERSION,true );
[31] Fix | Delete
wp_register_script( 'themify-colorpicker', THEMIFY_METABOX_URI . 'js/jquery.minicolors.js', array('jquery'), THEMIFY_VERSION,true );
[32] Fix | Delete
wp_localize_script( 'themify-colorpicker', 'themifyCM', Themify_Metabox::themify_localize_cm_data() );
[33] Fix | Delete
wp_register_script( 'themify-scripts', THEMIFY_URI . '/js/admin/scripts.js', array('jquery', 'jquery-ui-tabs'), THEMIFY_VERSION,true );
[34] Fix | Delete
wp_register_script( 'themify-plupload', THEMIFY_METABOX_URI . 'js/plupload.js', array('jquery', 'themify-scripts'), THEMIFY_VERSION,true);
[35] Fix | Delete
wp_register_style ( 'magnific', THEMIFY_URI . '/css/modules/lightbox.css', array(), THEMIFY_VERSION );
[36] Fix | Delete
wp_register_script( 'magnific', THEMIFY_URI . '/js/modules/lightbox.min.js', array('jquery'), THEMIFY_VERSION, true );
[37] Fix | Delete
[38] Fix | Delete
// Custom Write Panel
[39] Fix | Delete
if( ($page === 'post.php' || $page === 'post-new.php') && in_array($typenow, $types,true) ){
[40] Fix | Delete
wp_enqueue_script( 'meta-box-tabs' );
[41] Fix | Delete
wp_enqueue_script( 'media-library-browse' );
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
// Register icon assets for later enqueueing.
[45] Fix | Delete
wp_register_style( 'themify-icons', THEMIFY_URI . '/themify-icons/themify-icons.css', array(), THEMIFY_VERSION );
[46] Fix | Delete
[47] Fix | Delete
$admin_vars=array(
[48] Fix | Delete
'nonce' => wp_create_nonce('tf_nonce'),
[49] Fix | Delete
'admin_url' => admin_url( 'admin.php?page=themify' ),
[50] Fix | Delete
'page_not_found' => esc_html__( 'Page not found', 'themify' )
[51] Fix | Delete
);
[52] Fix | Delete
// Settings Panel
[53] Fix | Delete
if( $page === 'toplevel_page_themify' ){
[54] Fix | Delete
[55] Fix | Delete
[56] Fix | Delete
wp_enqueue_script( 'jquery-ui-sortable' );
[57] Fix | Delete
// Load main.js for using fontawsome function
[58] Fix | Delete
themify_enque_script( 'themify-main-script', THEMIFY_URI.'/js/main.js', THEMIFY_VERSION, array('jquery'));
[59] Fix | Delete
Themify_Enqueue_Assets::addLocalization('url', THEMIFY_URI, false);
[60] Fix | Delete
[61] Fix | Delete
$admin_vars['empty_li']=__('The fileds could not be empty!','themify');
[62] Fix | Delete
$admin_vars['theme']=get_template();
[63] Fix | Delete
$admin_vars['erase']=array(
[64] Fix | Delete
'processing'=>__('Erasing... ','themify'),
[65] Fix | Delete
'done'=>__('Erasing complete','themify'),
[66] Fix | Delete
'error'=>__('An error occurred: %error%','themify')
[67] Fix | Delete
);
[68] Fix | Delete
$admin_vars['license']=array(
[69] Fix | Delete
'title'=>__('Themify License','themify'),
[70] Fix | Delete
'labels'=>array(
[71] Fix | Delete
'name'=>__('Themify Username','themify'),
[72] Fix | Delete
'key'=>__('License Key','themify'),
[73] Fix | Delete
'update'=>__('Update','themify'),
[74] Fix | Delete
),
[75] Fix | Delete
'link'=> sprintf('%s<a href="https://themify.me/member/softsale/license" target="_blank" rel="noopener">%s</a>%s',__('Please enter your Themify username and ','themify'),__('license key','themify'),__('. Make sure your membership/license key is active (not expired).','themify'))
[76] Fix | Delete
);
[77] Fix | Delete
$admin_vars['import']=array(
[78] Fix | Delete
'posts' => __('Importing Posts (%from%/%to%): %post%', 'themify'),
[79] Fix | Delete
'terms' => __('Importing Taxonomies (%from%/%to%): %post%', 'themify'),
[80] Fix | Delete
'menu_items' => __('Importing menu items (%from%/%to%): %post%', 'themify'),
[81] Fix | Delete
'menu' => __('Importing menus', 'themify'),
[82] Fix | Delete
'theme' => __('Importing theme Settings', 'themify'),
[83] Fix | Delete
'done'=>__('Import successfully finished', 'themify'),
[84] Fix | Delete
'import_gs_data' => __('Importing Global Styling', 'themify'),
[85] Fix | Delete
'download_images'=> __( 'Downloading images (%from%/%to%):', 'themify' ),
[86] Fix | Delete
'upload_images'=> __( 'Uploading images (%from%/%to%):', 'themify' ),
[87] Fix | Delete
'import_skip' => __('Failed import. Skip importing %post%', 'tbp'),
[88] Fix | Delete
'import_failed' => __('Failed import: %post%', 'themify'),
[89] Fix | Delete
'download_fail' => __('download failed.', 'themify'),
[90] Fix | Delete
'upload_fail' => __('upload failed (%msg%)', 'themify'),
[91] Fix | Delete
'memory'=>(int)(wp_convert_hr_to_bytes(WP_MEMORY_LIMIT)*MB_IN_BYTES)
[92] Fix | Delete
);
[93] Fix | Delete
[94] Fix | Delete
if(class_exists('Themify_Updater',false)){
[95] Fix | Delete
$themify_updater = Themify_Updater::get_instance();
[96] Fix | Delete
$username=$themify_updater->get_setting('username');
[97] Fix | Delete
$key=$themify_updater->get_setting('key');
[98] Fix | Delete
$admin_vars['license']['username']=!empty($username)?$username:'';
[99] Fix | Delete
$admin_vars['license']['key']=!empty($key)?$key:'';
[100] Fix | Delete
unset($themify_updater,$key,$username);
[101] Fix | Delete
}
[102] Fix | Delete
[103] Fix | Delete
//used icons
[104] Fix | Delete
themify_get_icon('info','ti');
[105] Fix | Delete
themify_get_icon('alert','ti');
[106] Fix | Delete
themify_get_icon('check','ti');
[107] Fix | Delete
themify_get_icon('cog','fa');
[108] Fix | Delete
}
[109] Fix | Delete
if( in_array( $page, $pages,true ) ) {
[110] Fix | Delete
//Enqueue styles
[111] Fix | Delete
wp_enqueue_style( 'themify-ui' );
[112] Fix | Delete
wp_enqueue_style( 'themify-metabox' );
[113] Fix | Delete
if ( is_rtl() ) {
[114] Fix | Delete
wp_enqueue_style( 'themify-ui-rtl' );
[115] Fix | Delete
}
[116] Fix | Delete
wp_enqueue_style( 'themify-colorpicker' );
[117] Fix | Delete
[118] Fix | Delete
//Enqueue scripts
[119] Fix | Delete
wp_enqueue_script( 'jquery' );
[120] Fix | Delete
wp_enqueue_script( 'jquery-ui-core' );
[121] Fix | Delete
wp_enqueue_script( 'jquery-ui-tabs' );
[122] Fix | Delete
wp_enqueue_script( 'jquery-ui-slider' );
[123] Fix | Delete
if( 'themify' === $pagenow){
[124] Fix | Delete
wp_enqueue_script( 'jquery-ui-autocomplete' );
[125] Fix | Delete
}
[126] Fix | Delete
wp_enqueue_script( 'json2' );
[127] Fix | Delete
wp_enqueue_script( 'plupload-all' );
[128] Fix | Delete
wp_enqueue_script( 'markjs' );
[129] Fix | Delete
wp_enqueue_script( 'themify-colorpicker' );
[130] Fix | Delete
if( in_array($typenow, $types,true) || in_array( $pagenow, $pagenows,true ) ){
[131] Fix | Delete
//Don't include Themify JavaScript if we're not in one of the Themify-managed pages
[132] Fix | Delete
wp_enqueue_script( 'themify-scripts' );
[133] Fix | Delete
wp_enqueue_script( 'themify-plupload' );
[134] Fix | Delete
Themify_Metabox::get_instance()->enqueue();
[135] Fix | Delete
}
[136] Fix | Delete
// Enqueue font icon assets.
[137] Fix | Delete
[138] Fix | Delete
wp_enqueue_style( 'themify-icons' );
[139] Fix | Delete
Themify_Icon_Font::enqueue();
[140] Fix | Delete
wp_enqueue_style ( 'magnific' );
[141] Fix | Delete
wp_enqueue_script( 'magnific' );
[142] Fix | Delete
}
[143] Fix | Delete
[144] Fix | Delete
[145] Fix | Delete
wp_localize_script('themify-scripts', 'themify_js_vars', $admin_vars);
[146] Fix | Delete
[147] Fix | Delete
wp_localize_script('themify-scripts', 'themify_lang', array(
[148] Fix | Delete
'confirm_reset_settings' => __('Are you sure you want to reset your theme settings?', 'themify'),
[149] Fix | Delete
'check_backup' => __('Make sure to backup before upgrading. Files and settings may get lost or changed.', 'themify'),
[150] Fix | Delete
'confirm_delete_image' => __('Do you want to delete this image permanently?', 'themify'),
[151] Fix | Delete
'confirm_demo' => __( 'This will import demo and override current Themify panel settings.', 'themify' ),
[152] Fix | Delete
)
[153] Fix | Delete
);
[154] Fix | Delete
[155] Fix | Delete
wp_localize_script('themify-plupload', 'themify_plupload_lang', array(
[156] Fix | Delete
'enable_zip_upload' => sprintf(
[157] Fix | Delete
__('Install the "File Upload Types" plugin and add the file extension upload support.', 'themify'),
[158] Fix | Delete
esc_url( network_admin_url('settings.php').'#upload_filetypes' )
[159] Fix | Delete
),
[160] Fix | Delete
'filesize_error' => __('The file you are trying to upload exceeds the maximum file size allowed.', 'themify'),
[161] Fix | Delete
'filesize_error_fix' => sprintf(
[162] Fix | Delete
__('Go to your <a href="%s">Network Settings</a> and increase the value of the <strong>Max upload file size</strong>.', 'themify'),
[163] Fix | Delete
esc_url( network_admin_url('settings.php').'#fileupload_maxk' )
[164] Fix | Delete
)
[165] Fix | Delete
)
[166] Fix | Delete
);
[167] Fix | Delete
[168] Fix | Delete
// Enqueu admin widgets stuff
[169] Fix | Delete
if( $page === 'index.php' && themify_is_themify_theme()) {
[170] Fix | Delete
wp_enqueue_style( 'themify-admin-widgets-css' );
[171] Fix | Delete
wp_enqueue_script( 'themify-admin-widgets-js' );
[172] Fix | Delete
}
[173] Fix | Delete
}
[174] Fix | Delete
[175] Fix | Delete
/**
[176] Fix | Delete
* Checks if current user is allowed to view the update interface.
[177] Fix | Delete
*
[178] Fix | Delete
* @since 2.0.0
[179] Fix | Delete
*
[180] Fix | Delete
* @return bool
[181] Fix | Delete
*/
[182] Fix | Delete
function themify_allow_update() {
[183] Fix | Delete
return current_user_can( 'update_themes' );
[184] Fix | Delete
}
[185] Fix | Delete
[186] Fix | Delete
///////////////////////////////////////////
[187] Fix | Delete
// Create Nav Options
[188] Fix | Delete
///////////////////////////////////////////
[189] Fix | Delete
function themify_admin_nav() {
[190] Fix | Delete
global $submenu;
[191] Fix | Delete
$theme = wp_get_theme();
[192] Fix | Delete
$name = $theme->display('Name');
[193] Fix | Delete
$can_manage_option = current_user_can( 'manage_options' );
[194] Fix | Delete
/**
[195] Fix | Delete
* Add Themify menu entry
[196] Fix | Delete
* @since 2.0.2
[197] Fix | Delete
*/
[198] Fix | Delete
[199] Fix | Delete
$themify_page = add_menu_page( 'themify',$name , 'edit_posts', 'themify', $can_manage_option?'themify_page':'',"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23ffcc08' viewBox='0 0 32 32'%3E%3Cpath d='M11.5 3.5c15.8-5 21.8 9 20.3 17.3-.9 4.5-10 5.7-18 6.5-6.9.7-12.1 2.3-12.1 2.3s6.2-4.7 2.1-6.8C1.4 21.6-6.6 9.1 11.5 3.5zm7.3 6c-1 0-1.9.8-1.9 1.8a2 2 0 0 0 2 1.9c1 0 1.8-.9 1.8-1.9 0-1-.8-1.9-1.9-1.9zm-9.4.9a1.9 1.9 0 0 0-1.9 1.9 2 2 0 0 0 2 1.8 2 2 0 0 0 1.8-1.8c0-1.1-.9-2-1.9-2zM7 17.8s7.7 9.8 18.2-1.8c0 0-12.1 7.2-18.2 1.8z'%3E%3C/path%3E%3C/svg%3E", '49.3' );
[200] Fix | Delete
[201] Fix | Delete
/**
[202] Fix | Delete
* Add Themify settings page
[203] Fix | Delete
* @since 2.0.2
[204] Fix | Delete
*/
[205] Fix | Delete
if($can_manage_option){
[206] Fix | Delete
add_submenu_page( 'themify', $name, __('Themify Settings', 'themify'), 'manage_options', 'themify', 'themify_page' );
[207] Fix | Delete
}
[208] Fix | Delete
if ( class_exists('Themify_Builder_Model',false) && Themify_Builder_Model::builder_check() ) {
[209] Fix | Delete
/**
[210] Fix | Delete
* Add Themify Builder Layouts page
[211] Fix | Delete
* @since 2.0.2
[212] Fix | Delete
*/
[213] Fix | Delete
add_submenu_page ( 'themify', __( 'Saved Layouts', 'themify' ), __( 'Saved Layouts', 'themify' ), 'edit_posts', 'edit.php?post_type=tbuilder_layout' );
[214] Fix | Delete
/**
[215] Fix | Delete
* Add Themify Builder Layout Parts page
[216] Fix | Delete
* @since 2.0.2
[217] Fix | Delete
*/
[218] Fix | Delete
add_submenu_page( 'themify', __( 'Layout Parts', 'themify' ), __( 'Layout Parts', 'themify' ), 'edit_posts', 'edit.php?post_type=tbuilder_layout_part' );
[219] Fix | Delete
/**
[220] Fix | Delete
* Add Themify Global Styles page
[221] Fix | Delete
* @since 4.5.0
[222] Fix | Delete
*/
[223] Fix | Delete
add_submenu_page ( 'themify', __( 'Global Styles', 'themify' ), __( 'Global Styles', 'themify' ), 'edit_posts', 'themify-global-styles', 'themify_global_styles_page' );
[224] Fix | Delete
}
[225] Fix | Delete
/**
[226] Fix | Delete
* Add Themify Custom Fonts page
[227] Fix | Delete
* @since 4.6.3
[228] Fix | Delete
*/
[229] Fix | Delete
add_submenu_page( 'themify', __( 'Custom Fonts', 'themify' ), __( 'Custom Fonts', 'themify' ), 'edit_posts', 'edit.php?post_type=tb_cf' );
[230] Fix | Delete
/**
[231] Fix | Delete
* Add Themify Customize submenu entry
[232] Fix | Delete
* @since 2.0.2
[233] Fix | Delete
*/
[234] Fix | Delete
add_submenu_page( 'themify', 'themify_customize', __( 'Customize', 'themify' ), 'manage_options', 'customize.php?themify=1' );
[235] Fix | Delete
if ( is_plugin_active( 'themify-updater/themify-updater.php' ) ) {
[236] Fix | Delete
/**
[237] Fix | Delete
* Add Themify Updater License page link
[238] Fix | Delete
* @since 4.2.2
[239] Fix | Delete
*/
[240] Fix | Delete
add_submenu_page ( 'themify', __( 'Themify License', 'themify' ), __( 'Themify License', 'themify' ), 'manage_options', 'index.php?page=themify-license' );
[241] Fix | Delete
}
[242] Fix | Delete
/**
[243] Fix | Delete
* Add submenu entry that redirects to Themify documentation site
[244] Fix | Delete
* @since 2.0.2
[245] Fix | Delete
*/
[246] Fix | Delete
$submenu['themify'][] = array( __( 'Documentation', 'themify' ), 'manage_options', 'https://themify.me/docs/' . str_replace( 'themify-', '', $theme->get_template() ) );
[247] Fix | Delete
$submenu['themify'][] = array( __( 'Contact Support', 'themify' ), 'manage_options', 'https://themify.me/new-topic/' );
[248] Fix | Delete
[249] Fix | Delete
if(!$can_manage_option){
[250] Fix | Delete
remove_submenu_page('themify','themify');
[251] Fix | Delete
}
[252] Fix | Delete
}
[253] Fix | Delete
[254] Fix | Delete
function themify_get_theme_required_plugins() {
[255] Fix | Delete
$info = get_file_data( trailingslashit( get_template_directory() ) . 'style.css', array( 'Required Plugins' ) );
[256] Fix | Delete
return isset( $info[0] )?$info[0]:'';
[257] Fix | Delete
}
[258] Fix | Delete
[259] Fix | Delete
/* Pages
[260] Fix | Delete
/***************************************************************************/
[261] Fix | Delete
[262] Fix | Delete
function themify_sort_config($themify_config) {
[263] Fix | Delete
$themify_config['panel']['settings']['tab']['theme_settings']['custom-module'][] = array(
[264] Fix | Delete
'title' => __('Accessibility', 'themify'),
[265] Fix | Delete
'function' => 'accessibility_options'
[266] Fix | Delete
);
[267] Fix | Delete
$defaultModules=array(
[268] Fix | Delete
'general'=>array(
[269] Fix | Delete
array(
[270] Fix | Delete
'title' => __('Favicon', 'themify'),
[271] Fix | Delete
'function' => 'favicon',
[272] Fix | Delete
'target' => 'uploads/favicon/'
[273] Fix | Delete
),
[274] Fix | Delete
array(
[275] Fix | Delete
'title' => __('Header Code', 'themify'),
[276] Fix | Delete
'function' => 'header_html'
[277] Fix | Delete
),
[278] Fix | Delete
array(
[279] Fix | Delete
'title' => __('Footer Code', 'themify'),
[280] Fix | Delete
'function' => 'footer_html'
[281] Fix | Delete
),
[282] Fix | Delete
array(
[283] Fix | Delete
'title' => __('Google Analytics', 'themify'),
[284] Fix | Delete
'function' => 'themify_google_analytics_settings'
[285] Fix | Delete
),
[286] Fix | Delete
array(
[287] Fix | Delete
'title' => __('Search Settings', 'themify'),
[288] Fix | Delete
'function' => 'search_settings'
[289] Fix | Delete
),
[290] Fix | Delete
array(
[291] Fix | Delete
'title' => __('Error 404 Page', 'themify'),
[292] Fix | Delete
'function' => 'page_404_settings'
[293] Fix | Delete
),
[294] Fix | Delete
array(
[295] Fix | Delete
'title' => __('Google Fonts', 'themify'),
[296] Fix | Delete
'function' => 'themify_webfonts_subsets'
[297] Fix | Delete
),
[298] Fix | Delete
array(
[299] Fix | Delete
'title' => __('Schema Microdata', 'themify'),
[300] Fix | Delete
'function' => 'themify_framework_theme_microdata_config_callback'
[301] Fix | Delete
),
[302] Fix | Delete
array(
[303] Fix | Delete
'title' => __('Maintenance Mode', 'themify'),
[304] Fix | Delete
'function' => 'themify_maintenance_mode_settings'
[305] Fix | Delete
),
[306] Fix | Delete
array(
[307] Fix | Delete
'title' => __('Feed Settings', 'themify'),
[308] Fix | Delete
'function' => 'feed_settings'
[309] Fix | Delete
),
[310] Fix | Delete
array(
[311] Fix | Delete
'title' => __('Custom Feed URL', 'themify'),
[312] Fix | Delete
'function' => 'custom_feed_url'
[313] Fix | Delete
),
[314] Fix | Delete
),
[315] Fix | Delete
'performance'=>array(
[316] Fix | Delete
array(
[317] Fix | Delete
'title' => '',
[318] Fix | Delete
'function' => 'performance_settings'
[319] Fix | Delete
)
[320] Fix | Delete
),
[321] Fix | Delete
'social_links'=>array(
[322] Fix | Delete
array(
[323] Fix | Delete
'title' => __('Manage Social Links', 'themify'),
[324] Fix | Delete
'function' => 'themify_manage_links'
[325] Fix | Delete
)
[326] Fix | Delete
),
[327] Fix | Delete
'image_script'=> array(
[328] Fix | Delete
array(
[329] Fix | Delete
'title' => __('Image Script Settings', 'themify'),
[330] Fix | Delete
'function' => 'img_settings'
[331] Fix | Delete
)
[332] Fix | Delete
),
[333] Fix | Delete
'integration-api'=>array(
[334] Fix | Delete
array(
[335] Fix | Delete
'title' => __('Google Map API Settings', 'themify'),
[336] Fix | Delete
'function' => 'themify_google_map_key'
[337] Fix | Delete
),
[338] Fix | Delete
array(
[339] Fix | Delete
'title' => __('Bing Map API Settings', 'themify'),
[340] Fix | Delete
'function' => 'themify_bing_map_key'
[341] Fix | Delete
),
[342] Fix | Delete
array(
[343] Fix | Delete
'title' => __('Cloudflare API Settings', 'themify'),
[344] Fix | Delete
'function' => 'themify_cloudflare_setting'
[345] Fix | Delete
),
[346] Fix | Delete
array(
[347] Fix | Delete
'title' => __('reCaptcha API Settings', 'themify'),
[348] Fix | Delete
'function' => 'themify_recaptcha_setting'
[349] Fix | Delete
),
[350] Fix | Delete
array(
[351] Fix | Delete
'title' => __( 'hCaptcha API Settings', 'themify' ),
[352] Fix | Delete
'function' => 'themify_hcaptcha_setting'
[353] Fix | Delete
),
[354] Fix | Delete
// array(
[355] Fix | Delete
//'title' => __('Youtube/Vimeo GDPR', 'themify'),
[356] Fix | Delete
//'function' => 'themify_video_gdpr'
[357] Fix | Delete
// ),
[358] Fix | Delete
),
[359] Fix | Delete
'custom-icon-font'=>array(
[360] Fix | Delete
array(
[361] Fix | Delete
'title' => __('Custom Icon Font', 'themify'),
[362] Fix | Delete
'function' => 'themify_fontello_input_callback',
[363] Fix | Delete
),
[364] Fix | Delete
)
[365] Fix | Delete
);
[366] Fix | Delete
foreach($defaultModules as $k=>$def){
[367] Fix | Delete
if(isset($themify_config['panel']['settings']['tab'][$k]['custom-module'])){
[368] Fix | Delete
$defaultModules[$k]=array_merge($def,$themify_config['panel']['settings']['tab'][$k]['custom-module']);
[369] Fix | Delete
}
[370] Fix | Delete
}
[371] Fix | Delete
$themify_config['panel']['settings']['tab']['general'] = array(
[372] Fix | Delete
'title' => __('General', 'themify'),
[373] Fix | Delete
'id' => 'general',
[374] Fix | Delete
'custom-module' =>$defaultModules['general']
[375] Fix | Delete
);
[376] Fix | Delete
[377] Fix | Delete
[378] Fix | Delete
$themify_config['panel']['settings']['tab']['performance'] = array(
[379] Fix | Delete
'title' => __('Performance', 'themify'),
[380] Fix | Delete
'id' => 'performance',
[381] Fix | Delete
'custom-module' => $defaultModules['performance']
[382] Fix | Delete
);
[383] Fix | Delete
$themify_config['panel']['settings']['tab']['social_links'] = array(
[384] Fix | Delete
'title' => __('Social Links', 'themify'),
[385] Fix | Delete
'id' => 'social_links',
[386] Fix | Delete
'custom-module' => $defaultModules['social_links']
[387] Fix | Delete
);
[388] Fix | Delete
$themify_config['panel']['settings']['tab']['image_script'] = array(
[389] Fix | Delete
'title' => __('Image Script', 'themify'),
[390] Fix | Delete
'id' => 'image_script',
[391] Fix | Delete
'custom-module' =>$defaultModules['image_script']
[392] Fix | Delete
);
[393] Fix | Delete
$themify_config['panel']['settings']['tab']['integration-api'] = array(
[394] Fix | Delete
'title' => __('Integration API', 'themify'),
[395] Fix | Delete
'id' => 'integration-api',
[396] Fix | Delete
'custom-module' => $defaultModules['integration-api']
[397] Fix | Delete
);
[398] Fix | Delete
[399] Fix | Delete
[400] Fix | Delete
$themify_config['panel']['settings']['tab']['custom-icon-font'] = array(
[401] Fix | Delete
'title' => __('Custom Icon Font', 'themify'),
[402] Fix | Delete
'id' => 'custom-icon-font',
[403] Fix | Delete
'custom-module' => $defaultModules['custom-icon-font']
[404] Fix | Delete
);
[405] Fix | Delete
unset($defaultModules);
[406] Fix | Delete
$ordered=array();
[407] Fix | Delete
$sort=array('general','default_layouts','performance','theme_settings','shop_settings','portfolio_layouts','page_builder','social_links','hook-content','image_script','integration-api','role_access','custom-icon-font');
[408] Fix | Delete
foreach($sort as $v){
[409] Fix | Delete
if(isset($themify_config['panel']['settings']['tab'][$v])){
[410] Fix | Delete
$ordered['panel']['settings']['tab'][$v]=$themify_config['panel']['settings']['tab'][$v];
[411] Fix | Delete
unset($themify_config['panel']['settings']['tab'][$v]);
[412] Fix | Delete
}
[413] Fix | Delete
}
[414] Fix | Delete
if(!empty($themify_config['panel']['settings']['tab'])){
[415] Fix | Delete
foreach($themify_config['panel']['settings']['tab'] as $k=>$v){
[416] Fix | Delete
$ordered['panel']['settings']['tab'][$k]=$v;
[417] Fix | Delete
}
[418] Fix | Delete
}
[419] Fix | Delete
return apply_filters('themify_theme_config_sort',$ordered);
[420] Fix | Delete
}
[421] Fix | Delete
[422] Fix | Delete
///////////////////////////////////////////
[423] Fix | Delete
// Themify Page
[424] Fix | Delete
///////////////////////////////////////////
[425] Fix | Delete
function themify_page() {
[426] Fix | Delete
[427] Fix | Delete
if ( ! current_user_can( 'manage_options' ) )
[428] Fix | Delete
wp_die( __( 'You do not have sufficient permissions to update this site.', 'themify' ) );
[429] Fix | Delete
[430] Fix | Delete
if (isset($_GET['action'])) {
[431] Fix | Delete
$action = 'upgrade';
[432] Fix | Delete
themify_updater();
[433] Fix | Delete
}
[434] Fix | Delete
[435] Fix | Delete
[436] Fix | Delete
/**
[437] Fix | Delete
* Load themify_config
[438] Fix | Delete
*/
[439] Fix | Delete
$themify_theme_config=array();
[440] Fix | Delete
include locate_template(array('custom-config.php', 'theme-config.php'));
[441] Fix | Delete
$themify_config = apply_filters('themify_theme_config_setup', $themify_theme_config);
[442] Fix | Delete
unset($themify_theme_config);
[443] Fix | Delete
$themify_config=themify_sort_config($themify_config);
[444] Fix | Delete
[445] Fix | Delete
// check theme information
[446] Fix | Delete
$theme = wp_get_theme();
[447] Fix | Delete
$is_child = is_child_theme();
[448] Fix | Delete
$check_theme_name = $is_child? $theme->parent()->Name : $theme->display('Name');
[449] Fix | Delete
$check_theme_version = $is_child ? $theme->parent()->Version : $theme->display('Version');
[450] Fix | Delete
[451] Fix | Delete
/**
[452] Fix | Delete
* Markup for Themify skins. It's empty if there are no skins
[453] Fix | Delete
* @since 2.1.8
[454] Fix | Delete
* @var string
[455] Fix | Delete
*/
[456] Fix | Delete
$themify_skins = themify_get_skins();
[457] Fix | Delete
[458] Fix | Delete
/* special admin tab that shows available skins with option to import demo separately for each */
[459] Fix | Delete
$skins_and_demos = current_theme_supports( 'themify-skins-and-demos' );
[460] Fix | Delete
?>
[461] Fix | Delete
<!-- alerts -->
[462] Fix | Delete
<div class="tb_alert"></div>
[463] Fix | Delete
<!-- /alerts -->
[464] Fix | Delete
[465] Fix | Delete
<div id="tf_message" data-dismiss="<?php _e( 'Dismiss', 'themify' ); ?>"></div>
[466] Fix | Delete
[467] Fix | Delete
<!-- gzip issue detection -->
[468] Fix | Delete
<script>document.body.classList.add( 'tf_litespeed' );</script>
[469] Fix | Delete
<style>
[470] Fix | Delete
.tf_litespeed #wpbody-content > * { display: none; }
[471] Fix | Delete
.tf_litespeed #tf_gz_message { margin: 2em; display: block !important; }
[472] Fix | Delete
</style>
[473] Fix | Delete
<div id="tf_gz_message" style="display: none"><?php printf( __( 'It appears your server doesn\'t load .gz file correctly. Please contact your host provide to fix the issue. As a temporary solution, you may <a href="%s">install this plugin</a> or delete all gz files packed in the theme (which it would load the original scripts).', 'themify' ), 'https://themify.me/files/themify-gzip-cleaner.zip' ); ?> <a class="button button-primary" href="<?php echo add_query_arg( 'tf_clean_gz', 1 ); ?>"><?php _e( 'Remove all GZIP files', 'themify' ); ?></a></div>
[474] Fix | Delete
<script async src="<?php echo THEMIFY_URI . '/js/admin/litespeed-gzip.min.js'; ?>"></script>
[475] Fix | Delete
[476] Fix | Delete
<!-- html -->
[477] Fix | Delete
<form id="themify" method="post" action="" enctype="multipart/form-data">
[478] Fix | Delete
<p id="theme-title"><?php echo esc_html( $check_theme_name ); ?> <em><?php echo esc_html( $check_theme_version ); ?> (<a href="<?php echo themify_https_esc( 'https://themify.org/changelogs/' ); ?><?php echo get_template(); ?>.txt" class="themify_changelogs" target="_blank" rel="noopener" data-changelog="<?php echo themify_https_esc( 'https://themify.org/changelogs/' ); ?><?php echo get_template(); ?>.txt"><?php _e('changelogs', 'themify'); ?></a>)</em></p>
[479] Fix | Delete
<p class="top-save-btn">
[480] Fix | Delete
<a href="#" class="save-button"><?php _e('Save', 'themify'); ?></a>
[481] Fix | Delete
</p>
[482] Fix | Delete
<div id="content">
[483] Fix | Delete
[484] Fix | Delete
<!-- nav -->
[485] Fix | Delete
<ul id="maintabnav">
[486] Fix | Delete
<li class="setting"><a href="#setting"><?php _e( 'Settings', 'themify' ); ?></a></li>
[487] Fix | Delete
<?php if( $skins_and_demos ) : ?>
[488] Fix | Delete
<li class="skins"><a href="#skins"><?php _e( 'Skins & Demos', 'themify' ); ?></a></li>
[489] Fix | Delete
<?php elseif ( ! empty( $themify_skins ) ) : ?>
[490] Fix | Delete
<li class="skins"><a href="#skins"><?php _e( 'Skins', 'themify' ); ?></a></li>
[491] Fix | Delete
<?php endif; ?>
[492] Fix | Delete
[493] Fix | Delete
<li class="transfer"><a href="#transfer"><?php _e( 'Transfer', 'themify' ); ?></a></li>
[494] Fix | Delete
<?php if( ! $skins_and_demos ) : ?>
[495] Fix | Delete
<li class="demo-import"><a href="#demo-import"><?php _e( 'Demo Import', 'themify' ); ?></a></li>
[496] Fix | Delete
<?php endif;?>
[497] Fix | Delete
<?php if ( themify_allow_update() ) : ?>
[498] Fix | Delete
<li class="update-check"><a href="#update-check"><?php _e( 'Update', 'themify' ); ?></a></li>
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function