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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../themify
File: themify-admin.php
<span class="label">' . __( 'Mobile Menu', 'themify' ) .themify_help(__( 'Main menu will toggle to mobile menu style when viewport width meets the entered value.', 'themify' )) . '</span>
[2500] Fix | Delete
<input type="text" name="setting-mobile_menu_trigger_point" value="' . esc_attr( Themify_Enqueue_Assets::$mobileMenuActive ) . '" class="width2">' . __( 'Mobile menu viewport (px)', 'themify' ) .'
[2501] Fix | Delete
</p>';
[2502] Fix | Delete
[2503] Fix | Delete
return $out;
[2504] Fix | Delete
}
[2505] Fix | Delete
[2506] Fix | Delete
[2507] Fix | Delete
if ( ! function_exists( 'themify_generic_slider_controls' ) ) {
[2508] Fix | Delete
/**
[2509] Fix | Delete
* Creates a general module to setup slider parameters
[2510] Fix | Delete
* @param $prefix
[2511] Fix | Delete
* @return string
[2512] Fix | Delete
*/
[2513] Fix | Delete
function themify_generic_slider_controls( $prefix ) {
[2514] Fix | Delete
/**
[2515] Fix | Delete
* Associative array containing theme settings
[2516] Fix | Delete
* @var array
[2517] Fix | Delete
*/
[2518] Fix | Delete
[2519] Fix | Delete
$auto_options = apply_filters( 'themify_generic_slider_auto',
[2520] Fix | Delete
array(
[2521] Fix | Delete
__('4 Secs (default)', 'themify') => 4000,
[2522] Fix | Delete
__('Off', 'themify') => 'off',
[2523] Fix | Delete
__('1 Sec', 'themify') => 1000,
[2524] Fix | Delete
__('2 Secs', 'themify') => 2000,
[2525] Fix | Delete
__('3 Secs', 'themify') => 3000,
[2526] Fix | Delete
__('4 Secs', 'themify') => 4000,
[2527] Fix | Delete
__('5 Secs', 'themify') => 5000,
[2528] Fix | Delete
__('6 Secs', 'themify') => 6000,
[2529] Fix | Delete
__('7 Secs', 'themify') => 7000,
[2530] Fix | Delete
__('8 Secs', 'themify') => 8000,
[2531] Fix | Delete
__('9 Secs', 'themify') => 9000,
[2532] Fix | Delete
__('10 Secs', 'themify')=> 10000
[2533] Fix | Delete
)
[2534] Fix | Delete
);
[2535] Fix | Delete
$speed_options = apply_filters( 'themify_generic_slider_speed',
[2536] Fix | Delete
array(
[2537] Fix | Delete
__('Fast', 'themify') => 500,
[2538] Fix | Delete
__('Normal', 'themify') => 1000,
[2539] Fix | Delete
__('Slow', 'themify') => 1500
[2540] Fix | Delete
)
[2541] Fix | Delete
);
[2542] Fix | Delete
$effect_options = array(
[2543] Fix | Delete
array('name' => __('Slide', 'themify'), 'value' => 'slide'),
[2544] Fix | Delete
array('name' => __('Fade', 'themify'), 'value' =>'fade')
[2545] Fix | Delete
);
[2546] Fix | Delete
[2547] Fix | Delete
/**
[2548] Fix | Delete
* Auto Play
[2549] Fix | Delete
*/
[2550] Fix | Delete
$output = '<p>
[2551] Fix | Delete
<span class="label">' . __('Auto Play', 'themify') . '</span>
[2552] Fix | Delete
<select name="' . $prefix . 'autoplay">';
[2553] Fix | Delete
foreach ( $auto_options as $name => $val ) {
[2554] Fix | Delete
$v=themify_get( $prefix . 'autoplay' );
[2555] Fix | Delete
$output .= '<option value="' . $val . '" ' . selected( $v, $v ? $val : 4000, false ) . '>' . esc_html( $name ) . '</option>';
[2556] Fix | Delete
}
[2557] Fix | Delete
$output .= ' </select>
[2558] Fix | Delete
</p>';
[2559] Fix | Delete
[2560] Fix | Delete
/**
[2561] Fix | Delete
* Effect
[2562] Fix | Delete
*/
[2563] Fix | Delete
$output .= '<p>
[2564] Fix | Delete
<span class="label">' . __( 'Effect', 'themify' ) . '</span>
[2565] Fix | Delete
<select name="' . $prefix. 'effect">' .
[2566] Fix | Delete
themify_options_module( $effect_options, $prefix . 'effect' ) . '
[2567] Fix | Delete
</select>
[2568] Fix | Delete
</p>';
[2569] Fix | Delete
[2570] Fix | Delete
/**
[2571] Fix | Delete
* Transition Speed
[2572] Fix | Delete
*/
[2573] Fix | Delete
$output .= '<p>
[2574] Fix | Delete
<span class="label">' . __( 'Transition Speed', 'themify' ) . '</span>
[2575] Fix | Delete
<select name="' . $prefix . 'transition_speed">';
[2576] Fix | Delete
$transition=themify_get( $prefix . 'transition_speed' );
[2577] Fix | Delete
foreach ( $speed_options as $name => $val ) {
[2578] Fix | Delete
$output .= '<option value="' . $val . '" ' . selected( $transition, $transition? $val : 500, false ) . '>' . esc_html( $name ) . '</option>';
[2579] Fix | Delete
}
[2580] Fix | Delete
$output .= ' </select>
[2581] Fix | Delete
</p>';
[2582] Fix | Delete
[2583] Fix | Delete
return apply_filters( 'themify_generic_slider_controls', $output );
[2584] Fix | Delete
}
[2585] Fix | Delete
}
[2586] Fix | Delete
[2587] Fix | Delete
/**
[2588] Fix | Delete
* Display select element with featured image sizes + blank slot
[2589] Fix | Delete
* @param String $key setting name
[2590] Fix | Delete
* @return String
[2591] Fix | Delete
* @since 1.1.5
[2592] Fix | Delete
*/
[2593] Fix | Delete
function themify_feature_image_sizes_select($key = ''){
[2594] Fix | Delete
/** Define WP Featured Image sizes + blank + Themify's image script
[2595] Fix | Delete
* @var array */
[2596] Fix | Delete
$themify_layout_feature_sizes = themify_get_image_sizes_list();
[2597] Fix | Delete
[2598] Fix | Delete
$output = '<p class="show_if_disabled_img_php">
[2599] Fix | Delete
<span class="label">' . __('Featured Image Size', 'themify') . '</span>
[2600] Fix | Delete
<select name="setting-' . $key . '">';
[2601] Fix | Delete
$val=themify_get('setting-'.$key,false,true);
[2602] Fix | Delete
foreach($themify_layout_feature_sizes as $option){
[2603] Fix | Delete
$sel=$option['value']===$val?' selected="selected"':'';
[2604] Fix | Delete
$output .= '<option'.$sel.' value="' . $option['value'] . '">' . esc_html( $option['name'] ) . '</option>';
[2605] Fix | Delete
}
[2606] Fix | Delete
$output .= '</select></p>';
[2607] Fix | Delete
[2608] Fix | Delete
return $output;
[2609] Fix | Delete
}
[2610] Fix | Delete
[2611] Fix | Delete
if ( ! function_exists( 'themify_theme_mega_menu_controls' ) ) {
[2612] Fix | Delete
/**
[2613] Fix | Delete
* Mega Menu Controls
[2614] Fix | Delete
* @param array $data Theme settings data
[2615] Fix | Delete
* @return string Markup for module.
[2616] Fix | Delete
* @since 3.5.8
[2617] Fix | Delete
*/
[2618] Fix | Delete
function themify_theme_mega_menu_controls( $data = array() ) {
[2619] Fix | Delete
/**
[2620] Fix | Delete
* Theme Settings Option Key Prefix
[2621] Fix | Delete
*
[2622] Fix | Delete
* @var string
[2623] Fix | Delete
*/
[2624] Fix | Delete
$key = 'setting-mega_menu';
[2625] Fix | Delete
[2626] Fix | Delete
/**
[2627] Fix | Delete
* Module markup
[2628] Fix | Delete
* @var string
[2629] Fix | Delete
*/
[2630] Fix | Delete
$out = '
[2631] Fix | Delete
<p>
[2632] Fix | Delete
<span class="label">' . __( 'Mega Menu Posts', 'themify' ) .themify_help(__( 'Number of posts to show on mega menu.', 'themify' )) . '</span>
[2633] Fix | Delete
<input type="text" name="'.$key.'_posts" value="' . esc_attr( themify_get( $key.'_posts', 5,true ) ) . '" class="width2">' . __( 'Posts', 'themify' ) .'
[2634] Fix | Delete
</p>';
[2635] Fix | Delete
$out .= '
[2636] Fix | Delete
<p>
[2637] Fix | Delete
<span class="label">' . __( 'Mega Post Image', 'themify' ) .themify_help(__( 'Enter featured image size on mega menu posts.', 'themify' )) . '</span>
[2638] Fix | Delete
<input type="text" name="'.$key.'_image_width" value="' . esc_attr( themify_get( $key.'_image_width', 180,true ) ) . '" class="width2"> X <input type="text" name="'.$key.'_image_height" value="' . esc_attr( themify_get( $key.'_image_height', 120,true ) ) . '" class="width2"> ' . __( 'px', 'themify' ) .'
[2639] Fix | Delete
</p>';
[2640] Fix | Delete
[2641] Fix | Delete
return apply_filters('themify_mega_menu_settings',$out);
[2642] Fix | Delete
}
[2643] Fix | Delete
[2644] Fix | Delete
}
[2645] Fix | Delete
[2646] Fix | Delete
/**
[2647] Fix | Delete
* Display google map api key input
[2648] Fix | Delete
* @return String
[2649] Fix | Delete
* @since 2.7.7
[2650] Fix | Delete
*/
[2651] Fix | Delete
function themify_google_map_key($data=array()){
[2652] Fix | Delete
$value = themify_get( 'setting-google_map_key','',true);
[2653] Fix | Delete
$validate = !empty($value) && strip_tags( $value ) !== $value ? sprintf( '<div class="notice notice-error"><p>%s</p></div>', __( 'This field must not contain HTML tags, please enter just the API key.', 'themify' ) ) : '';
[2654] Fix | Delete
[2655] Fix | Delete
return '
[2656] Fix | Delete
<p>
[2657] Fix | Delete
<span class="label">' . __( 'Google Map Key', 'themify' ) . '</span> <input type="text" class="width10" name="setting-google_map_key" value="' . esc_attr( $value ) . '" /> <br />' .
[2658] Fix | Delete
'<span class="pushlabel"><small>' . sprintf( __( 'Google API key is required to use Builder Map module and Map shortcode. <a href="%s" target="_blank" rel="noopener">Generate an API key</a> and insert it here. Also, please ensure you\'ve setup a <a href="%s" target="_blank" rel="noopener">billing plan</a>.', 'themify' ), '//developers.google.com/maps/documentation/javascript/get-api-key#key', 'https://support.google.com/googleapi/answer/6158867' ) . '</small></span>' .
[2659] Fix | Delete
$validate .
[2660] Fix | Delete
'</p>';
[2661] Fix | Delete
}
[2662] Fix | Delete
[2663] Fix | Delete
/**
[2664] Fix | Delete
* Display bing map api key input
[2665] Fix | Delete
* @return String
[2666] Fix | Delete
* @since 2.8.0
[2667] Fix | Delete
*/
[2668] Fix | Delete
function themify_bing_map_key($data=array()){
[2669] Fix | Delete
$value = themify_get( 'setting-bing_map_key','',true );
[2670] Fix | Delete
$validate = !empty($value) && strip_tags( $value ) !== $value ? sprintf( '<div class="notice notice-error"><p>%s</p></div>', __( 'This field must not contain HTML tags, please enter just the API key.', 'themify' ) ) : '';
[2671] Fix | Delete
[2672] Fix | Delete
return '<p><span class="label">' . __( 'Bing Maps Key', 'themify' ) . '</span> <input type="text" class="width10" name="setting-bing_map_key" value="' . esc_attr( $value ) . '" /> <br />
[2673] Fix | Delete
<span class="pushlabel"><small>' . sprintf( __( 'To use Bing Maps, <a href="%s" target="_blank" rel="noopener">generate an API key</a> and insert it here.', 'themify' ), 'https://msdn.microsoft.com/en-us/library/ff428642.aspx' ) . '</small></span>' . $validate . '</p>';
[2674] Fix | Delete
}
[2675] Fix | Delete
[2676] Fix | Delete
/**
[2677] Fix | Delete
* Display Cloudflare api key input
[2678] Fix | Delete
* @return String
[2679] Fix | Delete
* @since 2.8.0
[2680] Fix | Delete
*/
[2681] Fix | Delete
function themify_cloudflare_setting($data=array()){
[2682] Fix | Delete
$key='setting-clf_email';
[2683] Fix | Delete
$email=themify_get( $key,'',true );
[2684] Fix | Delete
$output = '<p><span class="label">' . __( 'Account Email', 'themify' ) . '</span> <input type="email" class="width8" name="'.$key.'" value="' . esc_attr( $email ) . '" /></p>';
[2685] Fix | Delete
$key='setting-clf_key';
[2686] Fix | Delete
$api=themify_get( $key,'',true );
[2687] Fix | Delete
$validate = !empty($api) && strip_tags( $api ) !== $api ? sprintf( '<div class="notice notice-error"><p>%s</p></div>', __( 'This field must not contain HTML tags, please enter just the API key.', 'themify' ) ) : '';
[2688] Fix | Delete
[2689] Fix | Delete
$output .= '<p><span class="label">' . __( 'API Key', 'themify' ) . '</span> <input type="text" class="width10" name="'.$key.'" value="' . esc_attr( $api ) . '" />' . $validate . '</p>';
[2690] Fix | Delete
$key='setting-clf_z_'.crc32($email.$api);
[2691] Fix | Delete
$zone=themify_get( $key,'',true );
[2692] Fix | Delete
if(!empty($zone)){
[2693] Fix | Delete
$output .= '<input type="hidden" name="'.$key.'" value="' . esc_attr( $zone ) . '" />';
[2694] Fix | Delete
}
[2695] Fix | Delete
$output .= '<p><span class="pushlabel"><small>' . __( 'To clear Cloudflare cache upon theme update or purge Themify cache, please login to your Cloudflare account and insert your information here.', 'themify' ) . '</small></span></p>';
[2696] Fix | Delete
return $output;
[2697] Fix | Delete
}
[2698] Fix | Delete
[2699] Fix | Delete
/**
[2700] Fix | Delete
* Display recaptcha api key input
[2701] Fix | Delete
* @return String
[2702] Fix | Delete
*/
[2703] Fix | Delete
function themify_recaptcha_setting($data=array()){
[2704] Fix | Delete
$version=Themify_Builder_Model::getReCaptchaOption( 'version');
[2705] Fix | Delete
$options='';
[2706] Fix | Delete
for($i=2;$i<4;$i++){
[2707] Fix | Delete
$selected = $version=='v'.$i?' selected="selected"':'';
[2708] Fix | Delete
$options.='<option value="v'.$i.'"'.$selected.'>Version '.$i.'</option>';
[2709] Fix | Delete
}
[2710] Fix | Delete
$public_key = Themify_Builder_Model::getReCaptchaOption( 'public_key' );
[2711] Fix | Delete
$private_key = Themify_Builder_Model::getReCaptchaOption( 'private_key' );
[2712] Fix | Delete
$output='<p><span class="label">' . __( 'ReCaptcha Version', 'themify' ) . '</span><select name="setting-recaptcha_version">'.$options.'</select></p>';
[2713] Fix | Delete
$validate = !empty($public_key) && strip_tags( $public_key ) !== $public_key ? sprintf( '<div class="notice notice-error"><p>%s</p></div>', __( 'This field must not contain HTML tags, please enter just the API key.', 'themify' ) ) : '';
[2714] Fix | Delete
$output.='<p><span class="label">' . __( 'ReCaptcha Site Key', 'themify' ) . '</span> <input type="text" class="width10" name="setting-recaptcha_site_key" value="' . esc_attr( $public_key ) . '" /> ' . $validate . ' </p>';
[2715] Fix | Delete
[2716] Fix | Delete
$validate = !empty($private_key) && strip_tags( $private_key ) !== $private_key ? sprintf( '<div class="notice notice-error"><p>%s</p></div>', __( 'This field must not contain HTML tags, please enter just the API key.', 'themify' ) ) : '';
[2717] Fix | Delete
$output.='<p><span class="label">' . __( 'ReCaptcha Secret Key', 'themify' ) . '</span> <input type="text" class="width10" name="setting-recaptcha_secret_key" value="' . esc_attr( $private_key ) . '" /><br/><span class="pushlabel"><small>'.sprintf( __( 'Go to <a target="_blank" href="%s" rel="noopener">reCAPTCHA Admin Console</a> to create API keys for your domain. A Google account is required.', 'themify' ), 'https://www.google.com/recaptcha/admin' ).'</small></span> ' . $validate . '</p>';
[2718] Fix | Delete
return $output;
[2719] Fix | Delete
}
[2720] Fix | Delete
[2721] Fix | Delete
/**
[2722] Fix | Delete
* Display hcaptcha api key input
[2723] Fix | Delete
* @return String
[2724] Fix | Delete
*/
[2725] Fix | Delete
function themify_hcaptcha_setting($data=array()){
[2726] Fix | Delete
$secret_key = themify_builder_get( 'setting-hcaptcha_secret', 'hcaptcha_secret' );
[2727] Fix | Delete
$site_key = themify_builder_get( 'setting-hcaptcha_site', 'hcaptcha_site' );
[2728] Fix | Delete
$validate = !empty($secret_key) && strip_tags( $secret_key ) !== $secret_key ? sprintf( '<div class="notice notice-error"><p>%s</p></div>', __( 'This field must not contain HTML tags, please enter just the API key.', 'themify' ) ) : '';
[2729] Fix | Delete
$output = '<p><span class="label">' . __( 'hCaptcha Secret Key', 'themify' ) . '</span> <input type="text" class="width10" name="setting-hcaptcha_secret" value="' . esc_attr( $secret_key ) . '" /><br/><span class="pushlabel"><small>' . sprintf( __( 'You can find the secret key on your hCaptcha <a href="%s" target="_blank">profile page</a>.', 'themify' ), 'https://dashboard.hcaptcha.com/settings' ) . '</small></span> ' . $validate . '</p>';
[2730] Fix | Delete
[2731] Fix | Delete
$validate = !empty($site_key) && strip_tags( $site_key ) !== $site_key ? sprintf( '<div class="notice notice-error"><p>%s</p></div>', __( 'This field must not contain HTML tags, please enter just the API key.', 'themify' ) ) : '';
[2732] Fix | Delete
$output .= '<p><span class="label">' . __( 'hCaptcha Site Key', 'themify' ) . '</span> <input type="text" class="width10" name="setting-hcaptcha_site" value="' . esc_attr( $site_key ) . '" /><br/><span class="pushlabel"><small>' . sprintf( __( 'You can find the site key from the <a href="%s" target="_blank">sites page</a> on your hCaptcha profile. Note that you also need to add your site domain(s) in the site key.', 'themify' ), 'https://dashboard.hcaptcha.com/sites' ) . '</small></span> ' . $validate . '</p>';
[2733] Fix | Delete
return $output;
[2734] Fix | Delete
}
[2735] Fix | Delete
[2736] Fix | Delete
[2737] Fix | Delete
/**
[2738] Fix | Delete
* Display video gdpr
[2739] Fix | Delete
* @return String
[2740] Fix | Delete
*/
[2741] Fix | Delete
function themify_video_gdpr($data=array()){
[2742] Fix | Delete
$key='setting-gdpr';
[2743] Fix | Delete
$imgKey=$key.'-img';
[2744] Fix | Delete
$media=array(
[2745] Fix | Delete
'fields' => $imgKey,
[2746] Fix | Delete
'medialib'=>1,
[2747] Fix | Delete
'preview' => true
[2748] Fix | Delete
);
[2749] Fix | Delete
$imgVal=themify_get( $imgKey,'',true );
[2750] Fix | Delete
$output = '
[2751] Fix | Delete
<p>
[2752] Fix | Delete
<label class="label" for="'.$key.'">' . __( 'GDPR', 'themify' ) . '</label>
[2753] Fix | Delete
<select name="'.$key.'" .id="'.$key.'">
[2754] Fix | Delete
<option value="">' . __( 'Disabled', 'themify' ) . '</option>
[2755] Fix | Delete
<option value="1" ' . selected( 'on', themify_get($key,'',true ), false ) . '>' . __( 'Enable', 'themify' ) . '</option>
[2756] Fix | Delete
</select>
[2757] Fix | Delete
<span class="pushlabel">
[2758] Fix | Delete
<small class="description">' . __( 'Once it is enabled, only logged-in users can see your site.', 'themify' ) . '</small>
[2759] Fix | Delete
</span>
[2760] Fix | Delete
</p>';
[2761] Fix | Delete
$output .= '
[2762] Fix | Delete
<div data-show-if-element="[name='.$key.']" data-show-if-value="1">
[2763] Fix | Delete
<label class="label" for="'.$imgKey.'">' . __( 'Show Image', 'themify' ) . '</label>
[2764] Fix | Delete
<div class="icon-preview">
[2765] Fix | Delete
<img id="' . $imgKey . '-preview" src="' . $imgVal . '" loading="lazy" decoding="async" />
[2766] Fix | Delete
</div>
[2767] Fix | Delete
<input id="'.$imgKey.'" type="text" class="width10" name="'.$imgKey.'" value="' . $imgVal . '" />
[2768] Fix | Delete
'.themify_get_uploader($imgKey,$media).'
[2769] Fix | Delete
</div>
[2770] Fix | Delete
';
[2771] Fix | Delete
return $output;
[2772] Fix | Delete
}
[2773] Fix | Delete
[2774] Fix | Delete
/**
[2775] Fix | Delete
* Add Maintenance mode option
[2776] Fix | Delete
* @return string
[2777] Fix | Delete
* @since 4.5.8
[2778] Fix | Delete
*/
[2779] Fix | Delete
function themify_maintenance_mode_settings() {
[2780] Fix | Delete
global $wp_roles;
[2781] Fix | Delete
[2782] Fix | Delete
$pre = 'setting-page_builder_';
[2783] Fix | Delete
$value = themify_builder_get( $pre . 'maintenance_mode', 'tools_maintenance_mode' );
[2784] Fix | Delete
$output = '
[2785] Fix | Delete
<p>
[2786] Fix | Delete
<label class="label" for="tb_maintenance_mode">' . __( 'Maintenance', 'themify' ) . '</label>
[2787] Fix | Delete
<select name="' . $pre . 'maintenance_mode">
[2788] Fix | Delete
<option value="">' . __( 'Disabled', 'themify' ) . '</option>
[2789] Fix | Delete
<option value="on" ' . selected( 'on', $value, false ) . '>' . __( 'Enable and display a page', 'themify' ) . '</option>
[2790] Fix | Delete
<option value="message" ' . selected( 'message', $value, false ) . '>' . __( 'Enable and display a message', 'themify' ) . '</option>
[2791] Fix | Delete
</select>
[2792] Fix | Delete
<span class="pushlabel">
[2793] Fix | Delete
<small class="description">' . __( 'Once it is enabled, only logged-in users can see your site.', 'themify' ) . '</small>
[2794] Fix | Delete
</span>
[2795] Fix | Delete
</p>';
[2796] Fix | Delete
[2797] Fix | Delete
$message = themify_builder_get( 'setting-maintenance_message', 'tools_maintenance_message' );
[2798] Fix | Delete
$output .= '
[2799] Fix | Delete
<div data-show-if-element="[name=setting-page_builder_maintenance_mode]" data-show-if-value="message">
[2800] Fix | Delete
<div class="pushlabel">
[2801] Fix | Delete
<textarea name="setting-maintenance_message" class="width10">' . esc_html( $message ) . '</textarea>
[2802] Fix | Delete
</div>
[2803] Fix | Delete
</div>
[2804] Fix | Delete
';
[2805] Fix | Delete
[2806] Fix | Delete
$selected_value = themify_builder_get( 'setting-page_builder_maintenance_page', 'tools_maintenance_page' );
[2807] Fix | Delete
$selected_page = empty($selected_value) ? '' : get_page_by_path( $selected_value, OBJECT, 'page' );
[2808] Fix | Delete
$output .= sprintf( '<div data-show-if-element="[name=setting-page_builder_maintenance_mode]" data-show-if-value="on"><label class="label" for="%s">%s</label><select id="%s" name="%s">%s<option>%s</option></select><div data-show-if-element="[name=page_builder_maintenance_mode]" data-show-if-value="true" class="pushlabel"><small>%s</small></div></div>',
[2809] Fix | Delete
$pre . 'maintenance_page',
[2810] Fix | Delete
__( 'Maintenance Page', 'themify' ),
[2811] Fix | Delete
$pre . 'maintenance_page',
[2812] Fix | Delete
$pre . 'maintenance_page',
[2813] Fix | Delete
!is_object($selected_page) ? '<option></option>' : sprintf('<option value="%s" selected="selected">%s</option>',$selected_value,$selected_page->post_title),
[2814] Fix | Delete
__( 'Loading...', 'themify' ),
[2815] Fix | Delete
__( 'Select a page to show for public users.', 'themify' )
[2816] Fix | Delete
);
[2817] Fix | Delete
[2818] Fix | Delete
$output .= '<div data-show-if-element="[name=setting-page_builder_maintenance_mode]" data-show-if-value=\'["on", "message"]\'><label class="label">' . __( 'Allow Access', 'themify' ) . themify_help( __('Select the user role(s) to allow viewing when maintenance mode is enabled.', 'themify')) .
[2819] Fix | Delete
'</label><div class="pushlabel">';
[2820] Fix | Delete
$roles = $wp_roles->get_names();
[2821] Fix | Delete
/* administrator role always has access */
[2822] Fix | Delete
unset( $roles['administrator'] );
[2823] Fix | Delete
foreach ( $roles as $key => $label ) {
[2824] Fix | Delete
$selected = themify_builder_get( 'setting-maintenance_access_' . $key, 'maintenance_access_' . $key ) ? ' checked' : '';
[2825] Fix | Delete
$output .= '<label><input name="setting-maintenance_access_' . $key . '" type="checkbox" ' . $selected . ' value="1"> ' . esc_html( $label ) . '</label>';
[2826] Fix | Delete
}
[2827] Fix | Delete
$output .= '</div></div>';
[2828] Fix | Delete
[2829] Fix | Delete
return $output;
[2830] Fix | Delete
}
[2831] Fix | Delete
[2832] Fix | Delete
/**
[2833] Fix | Delete
* Add Google Analytics option
[2834] Fix | Delete
* @return string
[2835] Fix | Delete
* @since 5.5.5
[2836] Fix | Delete
*/
[2837] Fix | Delete
function themify_google_analytics_settings() {
[2838] Fix | Delete
$m_id = themify_get( 'setting-ga_m_id','',true );
[2839] Fix | Delete
return '<p><span class="label">' . __( 'Measurement ID', 'themify' ) . '</span> <input type="text" name="setting-ga_m_id" value="' . esc_attr( $m_id ) . '" /> <br />
[2840] Fix | Delete
<span class="pushlabel"><small>' .
[2841] Fix | Delete
sprintf( __( '<a href="%s">Set up Analytics for your website</a>. Afterwards, go to your <a href="%s">Analytics admin dashboard</a> and select Data Streams, click on the item you want, then copy the Measurement ID (starts with "G-") and paste it here.', 'themify' ), 'https://support.google.com/analytics/answer/9304153', 'https://support.google.com/analytics/answer/6132368' )
[2842] Fix | Delete
. '</small></span></p>';
[2843] Fix | Delete
}
[2844] Fix | Delete
[2845] Fix | Delete
[2846] Fix | Delete
/**
[2847] Fix | Delete
* Callback for themify_framework_theme_microdata_config(), to display the options
[2848] Fix | Delete
*
[2849] Fix | Delete
* @return string
[2850] Fix | Delete
*/
[2851] Fix | Delete
function themify_framework_theme_microdata_config_callback() {
[2852] Fix | Delete
return '<p><span class="label">' . __('Schema Microdata', 'themify') . '</span> <label for="setting-disable_microdata"><input type="checkbox" id="setting-disable_microdata" name="setting-disable_microdata" '. checked( 'on', themify_get( 'setting-disable_microdata','',true ), false ) .'/> ' . __('Disable schema.org microdata output.', 'themify') . '</label></p>';
[2853] Fix | Delete
}
[2854] Fix | Delete
[2855] Fix | Delete
[2856] Fix | Delete
/**
[2857] Fix | Delete
* Display Builder Styles page content
[2858] Fix | Delete
* @return String
[2859] Fix | Delete
* @since 4.5.0
[2860] Fix | Delete
*/
[2861] Fix | Delete
function themify_global_styles_page(){
[2862] Fix | Delete
[2863] Fix | Delete
if ( ! current_user_can( 'edit_posts' ) )
[2864] Fix | Delete
wp_die( __( 'You do not have sufficient permissions to update this site.', 'themify' ) );
[2865] Fix | Delete
[2866] Fix | Delete
return Themify_Global_Styles::page_content();
[2867] Fix | Delete
}
[2868] Fix | Delete
[2869] Fix | Delete
[2870] Fix | Delete
///////////////////////////////////////////
[2871] Fix | Delete
// Scrub Function
[2872] Fix | Delete
///////////////////////////////////////////
[2873] Fix | Delete
function themify_scrub_func($string=''){
[2874] Fix | Delete
return str_replace(array(' ', '/', ','), array('_', '_', '-'), strtolower($string));
[2875] Fix | Delete
}
[2876] Fix | Delete
[2877] Fix | Delete
///////////////////////////////////////////
[2878] Fix | Delete
// Scrub
[2879] Fix | Delete
///////////////////////////////////////////
[2880] Fix | Delete
function themify_scrub($string=''){
[2881] Fix | Delete
return str_replace(array('#','-',' ','.',':',',','[',']','=','<','>'), array('_id_','_dash_','_space_','_class_','_colon_','_comma_','_opensquare_','_closesquare_','_equal_','_openbracket_','_closebracket_'), $string);
[2882] Fix | Delete
}
[2883] Fix | Delete
/**
[2884] Fix | Delete
* Check if multiple plugins are active, returns true only if all of them are
[2885] Fix | Delete
*
[2886] Fix | Delete
* @return bool
[2887] Fix | Delete
* @since 2.8.6
[2888] Fix | Delete
*/
[2889] Fix | Delete
function themify_are_plugins_active( $plugins ) {
[2890] Fix | Delete
foreach( $plugins as $plugin ) {
[2891] Fix | Delete
if( ! is_plugin_active( $plugin ) ) {
[2892] Fix | Delete
return false;
[2893] Fix | Delete
}
[2894] Fix | Delete
}
[2895] Fix | Delete
[2896] Fix | Delete
return true;
[2897] Fix | Delete
}
[2898] Fix | Delete
[2899] Fix | Delete
if ( ! function_exists( 'themify_lightbox_link_field' ) ) {
[2900] Fix | Delete
/**
[2901] Fix | Delete
* Returns Lightbox Link field definition for themify custom panel
[2902] Fix | Delete
* @return array
[2903] Fix | Delete
*/
[2904] Fix | Delete
function themify_lightbox_link_field( $args = array() ) {
[2905] Fix | Delete
[2906] Fix | Delete
$defaults = array(
[2907] Fix | Delete
'name' => 'multi_lightbox_link',
[2908] Fix | Delete
'title' => __('Lightbox Link', 'themify'),
[2909] Fix | Delete
'description' => '',
[2910] Fix | Delete
'type' => 'multi',
[2911] Fix | Delete
'meta' => array(
[2912] Fix | Delete
'fields' => array(
[2913] Fix | Delete
// Lightbox link field
[2914] Fix | Delete
array(
[2915] Fix | Delete
'name' => 'lightbox_link',
[2916] Fix | Delete
'label' => '',
[2917] Fix | Delete
'description' => __('Link Featured Image and Post Title to lightbox image, video or iframe URL <br/>(<a href="https://themify.me/docs/lightbox" target="_blank" rel="noopener">learn more</a>)', 'themify'),
[2918] Fix | Delete
'type' => 'textbox',
[2919] Fix | Delete
'meta' => array(),
[2920] Fix | Delete
'before' => '',
[2921] Fix | Delete
'after' => '',
[2922] Fix | Delete
),
[2923] Fix | Delete
array(
[2924] Fix | Delete
'name' => 'iframe_url',
[2925] Fix | Delete
'label' => __('iFrame URL', 'themify'),
[2926] Fix | Delete
'description' => '',
[2927] Fix | Delete
'type' => 'checkbox',
[2928] Fix | Delete
'before' => '',
[2929] Fix | Delete
'after' => '',
[2930] Fix | Delete
),
[2931] Fix | Delete
array(
[2932] Fix | Delete
'name' => 'lightbox_icon',
[2933] Fix | Delete
'label' => __('Add zoom icon on lightbox link', 'themify'),
[2934] Fix | Delete
'description' => '',
[2935] Fix | Delete
'type' => 'checkbox',
[2936] Fix | Delete
'before' => '',
[2937] Fix | Delete
'after' => '',
[2938] Fix | Delete
)
[2939] Fix | Delete
),
[2940] Fix | Delete
'description' => '',
[2941] Fix | Delete
'before' => '',
[2942] Fix | Delete
'after' => '',
[2943] Fix | Delete
'separator' => ''
[2944] Fix | Delete
)
[2945] Fix | Delete
);
[2946] Fix | Delete
[2947] Fix | Delete
$field = wp_parse_args( $args, $defaults );
[2948] Fix | Delete
[2949] Fix | Delete
return apply_filters( 'themify_lightbox_link_field', $field );
[2950] Fix | Delete
}
[2951] Fix | Delete
}
[2952] Fix | Delete
[2953] Fix | Delete
if( ! function_exists( 'themify_image_dimensions_field' ) ) {
[2954] Fix | Delete
/**
[2955] Fix | Delete
* Multi field: Image dimensions fields to enter width and height.
[2956] Fix | Delete
* @param array $args
[2957] Fix | Delete
* @param string $prefix
[2958] Fix | Delete
* @return mixed|void
[2959] Fix | Delete
* @since 1.5.2
[2960] Fix | Delete
*/
[2961] Fix | Delete
function themify_image_dimensions_field( $args = array(), $prefix = 'image' ) {
[2962] Fix | Delete
if(!themify_is_image_script_disabled()){
[2963] Fix | Delete
$defaults = array(
[2964] Fix | Delete
'type' => 'multi',
[2965] Fix | Delete
'name' => $prefix . '_dimensions',
[2966] Fix | Delete
'title' => __('Featured Image Size', 'themify'),
[2967] Fix | Delete
'meta' => array(
[2968] Fix | Delete
'fields' => array(
[2969] Fix | Delete
// Image Width
[2970] Fix | Delete
array(
[2971] Fix | Delete
'name' => $prefix . '_width',
[2972] Fix | Delete
'label' => __('width', 'themify'),
[2973] Fix | Delete
'description' => '',
[2974] Fix | Delete
'type' => 'textbox',
[2975] Fix | Delete
'meta' => array('size' => 'small')
[2976] Fix | Delete
),
[2977] Fix | Delete
// Image Height
[2978] Fix | Delete
array(
[2979] Fix | Delete
'name' => $prefix . '_height',
[2980] Fix | Delete
'label' => __('height', 'themify'),
[2981] Fix | Delete
'type' => 'textbox',
[2982] Fix | Delete
'meta' => array( 'size' => 'small')
[2983] Fix | Delete
),
[2984] Fix | Delete
),
[2985] Fix | Delete
'description' => __('Enter height = 0 to disable vertical cropping with image script enabled', 'themify'),
[2986] Fix | Delete
'before' => '',
[2987] Fix | Delete
'after' => '',
[2988] Fix | Delete
'separator' => ''
[2989] Fix | Delete
)
[2990] Fix | Delete
);
[2991] Fix | Delete
} else {
[2992] Fix | Delete
$defaults = array( 'name'=>'','type'=>'' );
[2993] Fix | Delete
}
[2994] Fix | Delete
$field = wp_parse_args( $args, $defaults );
[2995] Fix | Delete
[2996] Fix | Delete
return apply_filters( 'themify_image_dimensions_field', $field );
[2997] Fix | Delete
}
[2998] Fix | Delete
}
[2999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function