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
/**
[2000] Fix | Delete
* Footer Text Settings
[2001] Fix | Delete
* @return string
[2002] Fix | Delete
*/
[2003] Fix | Delete
function footer_text_settings() {
[2004] Fix | Delete
return '<div class="themify-info-link">' . __( 'Enter your text to replace the copyright and credit links in the footer. HTML tags allowed. Type %year% to display the current year.', 'themify' ) . '</div>' . themify_footer_text_left() . themify_footer_text_right();
[2005] Fix | Delete
}
[2006] Fix | Delete
}
[2007] Fix | Delete
[2008] Fix | Delete
if ( ! function_exists( 'themify_footer_text_left' ) ) {
[2009] Fix | Delete
/**
[2010] Fix | Delete
* Footer Text Left Function
[2011] Fix | Delete
* @return string
[2012] Fix | Delete
*/
[2013] Fix | Delete
function themify_footer_text_left() {
[2014] Fix | Delete
return '<h4>' . __('Footer Text One', 'themify') . '</h4><div data-show-if-element="[name=setting-footer_text_left_hide]" data-show-if-value="false"><textarea class="widthfull" rows="4" name="setting-footer_text_left">' . esc_textarea( themify_get( 'setting-footer_text_left','',true ) ) . '</textarea></div><div><label><input type="checkbox" name="setting-footer_text_left_hide" value="hide" ' . checked( themify_get( 'setting-footer_text_left_hide','',true ), 'hide', false ) . ' />' . __( 'Hide Footer Text One', 'themify' ) . '</label></div>';
[2015] Fix | Delete
}
[2016] Fix | Delete
}
[2017] Fix | Delete
[2018] Fix | Delete
if ( ! function_exists( 'themify_footer_text_right' ) ) {
[2019] Fix | Delete
/**
[2020] Fix | Delete
* Footer Text Right Function
[2021] Fix | Delete
* @return string
[2022] Fix | Delete
*/
[2023] Fix | Delete
function themify_footer_text_right(){
[2024] Fix | Delete
return '<h4>' . __('Footer Text Two', 'themify') . '</h4><div data-show-if-element="[name=setting-footer_text_right_hide]" data-show-if-value="false"><textarea class="widthfull" rows="4" name="setting-footer_text_right">' . esc_textarea( themify_get( 'setting-footer_text_right','',true ) ) . '</textarea></div><div><label><input type="checkbox" name="setting-footer_text_right_hide" value="hide" ' . checked( themify_get( 'setting-footer_text_right_hide','',true ), 'hide', false ) . ' />' . __( 'Hide Footer Text Two', 'themify' ) . '</label></div>';
[2025] Fix | Delete
}
[2026] Fix | Delete
}
[2027] Fix | Delete
[2028] Fix | Delete
if(!function_exists('themify_homepage_widgets')){
[2029] Fix | Delete
/**
[2030] Fix | Delete
* Widgets module function
[2031] Fix | Delete
* @return string Module markup
[2032] Fix | Delete
*/
[2033] Fix | Delete
function themify_homepage_widgets(){
[2034] Fix | Delete
$val = themify_get( 'setting-homepage_widgets',false,true );
[2035] Fix | Delete
$options = array(
[2036] Fix | Delete
array(
[2037] Fix | Delete
'value' => 'homewidget-4col',
[2038] Fix | Delete
'img' => 'themify/img/sidebars/4col.png',
[2039] Fix | Delete
'title' => __('Widgets 4 Columns', 'themify')),
[2040] Fix | Delete
array(
[2041] Fix | Delete
'value' => 'homewidget-3col',
[2042] Fix | Delete
'img' => 'themify/img/sidebars/3col.png',
[2043] Fix | Delete
'title' => __('Widgets 3 Columns', 'themify'),
[2044] Fix | Delete
'selected' => true),
[2045] Fix | Delete
array(
[2046] Fix | Delete
'value' => 'homewidget-2col',
[2047] Fix | Delete
'img' => 'themify/img/sidebars/2col.png',
[2048] Fix | Delete
'title' => __('Widgets 3 Columns', 'themify')),
[2049] Fix | Delete
array(
[2050] Fix | Delete
'value' => 'homewidget-1col',
[2051] Fix | Delete
'img' => 'themify/img/sidebars/1col.png',
[2052] Fix | Delete
'title' => __('Widgets 1 Column', 'themify')),
[2053] Fix | Delete
array(
[2054] Fix | Delete
'value' => 'none',
[2055] Fix | Delete
'img' => 'themify/img/sidebars/none.png',
[2056] Fix | Delete
'title' => __('No Widgets', 'themify'))
[2057] Fix | Delete
);
[2058] Fix | Delete
$output = '';
[2059] Fix | Delete
foreach($options as $option){
[2060] Fix | Delete
if(!$val && !empty($option['selected'])){
[2061] Fix | Delete
$val = $option['value'];
[2062] Fix | Delete
}
[2063] Fix | Delete
$class = $val === $option['value']?' selected':'';
[2064] Fix | Delete
$output .= '<a href="#" class="preview-icon' . $class . '" title="' . esc_attr( $option['title'] ) . '"><img src="' . THEME_URI.'/'.$option['img']. '" alt="' . esc_attr( $option['value'] ) . '" loading="lazy" decoding="async" width="46" height="35"/></a>';
[2065] Fix | Delete
}
[2066] Fix | Delete
$output .= '<input type="hidden" name="setting-homepage_widgets" class="val" value="' . esc_attr( $val ) . '" />';
[2067] Fix | Delete
return $output;
[2068] Fix | Delete
}
[2069] Fix | Delete
}
[2070] Fix | Delete
[2071] Fix | Delete
if(!function_exists('themify_footer_widgets')){
[2072] Fix | Delete
/**
[2073] Fix | Delete
* Widgets module function
[2074] Fix | Delete
* @return string Module markup
[2075] Fix | Delete
*/
[2076] Fix | Delete
function themify_footer_widgets(){
[2077] Fix | Delete
$val = themify_get( 'setting-footer_widgets',false,true );
[2078] Fix | Delete
$options = array(
[2079] Fix | Delete
array(
[2080] Fix | Delete
'value' => 'footerwidget-4col',
[2081] Fix | Delete
'img' => 'themify/img/sidebars/4col.png',
[2082] Fix | Delete
'title' => __('Widgets 4 Columns', 'themify')),
[2083] Fix | Delete
array(
[2084] Fix | Delete
'value' => 'footerwidget-3col',
[2085] Fix | Delete
'img' => 'themify/img/sidebars/3col.png',
[2086] Fix | Delete
'title' => __('Widgets 3 Columns', 'themify'),
[2087] Fix | Delete
'selected' => true),
[2088] Fix | Delete
array(
[2089] Fix | Delete
'value' => 'footerwidget-2col',
[2090] Fix | Delete
'img' => 'themify/img/sidebars/2col.png',
[2091] Fix | Delete
'title' => __('Widgets 2 Columns', 'themify')),
[2092] Fix | Delete
array(
[2093] Fix | Delete
'value' => 'footerwidget-1col',
[2094] Fix | Delete
'img' => 'themify/img/sidebars/1col.png',
[2095] Fix | Delete
'title' => __('Widgets 1 Column', 'themify')),
[2096] Fix | Delete
array(
[2097] Fix | Delete
'value' => 'none',
[2098] Fix | Delete
'img' => 'themify/img/sidebars/none.png',
[2099] Fix | Delete
'title' => __('No Widgets', 'themify'))
[2100] Fix | Delete
);
[2101] Fix | Delete
$output = '';
[2102] Fix | Delete
foreach($options as $option){
[2103] Fix | Delete
if(!$val &&!empty($option['selected'])){
[2104] Fix | Delete
$val = $option['value'];
[2105] Fix | Delete
}
[2106] Fix | Delete
$class = $val === $option['value']?' selected':'';
[2107] Fix | Delete
$output .= '<a href="#" class="preview-icon' . $class. '" title="' . esc_attr( $option['title'] ) . '"><img src="' . THEME_URI.'/'.$option['img']. '" alt="' . esc_attr( $option['value'] ) . '" loading="lazy" decoding="async" width="46" height="35" /></a>';
[2108] Fix | Delete
}
[2109] Fix | Delete
$output .= '<input type="hidden" name="setting-footer_widgets" class="val" value="' . esc_attr( $val ) . '" />';
[2110] Fix | Delete
return $output;
[2111] Fix | Delete
}
[2112] Fix | Delete
}
[2113] Fix | Delete
[2114] Fix | Delete
if ( ! function_exists( 'themify_entries_navigation' ) ) {
[2115] Fix | Delete
/**
[2116] Fix | Delete
* Display module to select numbered pagination or links to previous and next posts.
[2117] Fix | Delete
* @param array $data
[2118] Fix | Delete
* @return string $html Module markup.
[2119] Fix | Delete
* @since 1.6.0
[2120] Fix | Delete
*/
[2121] Fix | Delete
function themify_entries_navigation( $data = array() ) {
[2122] Fix | Delete
$key = 'setting-entries_nav';
[2123] Fix | Delete
$v= themify_get( $key,'numbered',true );
[2124] Fix | Delete
$html = '<p>';
[2125] Fix | Delete
// Numbered pagination
[2126] Fix | Delete
$html .= '<label for="' . $key . '_numbered">';
[2127] Fix | Delete
$html .= '<input ' . checked( $v, 'numbered', false) . ' type="radio" id="' . $key . '_numbered" name="' . $key . '" value="numbered" /> ';
[2128] Fix | Delete
$html .= __( 'Numbered Pagination (page 1, 2, 3, etc.)', 'themify' ) . '</label>';
[2129] Fix | Delete
$html .= '<br/>';
[2130] Fix | Delete
[2131] Fix | Delete
// Previous / Next links
[2132] Fix | Delete
$html .= '<label for="' . $key . '_prevnext">';
[2133] Fix | Delete
$html .= '<input ' . checked( $v, 'prevnext', false ) . ' type="radio" id="' . $key . '_prevnext" name="' . $key . '" value="prevnext" /> ';
[2134] Fix | Delete
$html .= __( 'Previous Posts and Next Posts Links', 'themify' ) . '</label>';
[2135] Fix | Delete
$html .= '</p>';
[2136] Fix | Delete
return $html;
[2137] Fix | Delete
}
[2138] Fix | Delete
}
[2139] Fix | Delete
[2140] Fix | Delete
[2141] Fix | Delete
/**
[2142] Fix | Delete
* Renders Accessibility options
[2143] Fix | Delete
*
[2144] Fix | Delete
* @return string
[2145] Fix | Delete
*/
[2146] Fix | Delete
function themify_accessibility_options( $data = array() ) {
[2147] Fix | Delete
$key = 'setting-acc_';
[2148] Fix | Delete
$out = '<p>
[2149] Fix | Delete
<span class="label">' . __( 'Link Focus Outline', 'themify' ) . '</span>
[2150] Fix | Delete
<select name="' . $key.'lfo' . '">' . themify_options_module( array(
[2151] Fix | Delete
array( 'name' => __( 'Light', 'themify' ), 'value' => '' ),
[2152] Fix | Delete
array( 'name' => __( 'Heavy', 'themify' ), 'value' => 'h' ),
[2153] Fix | Delete
array( 'name' => __( 'None', 'themify' ), 'value' => 'n' )
[2154] Fix | Delete
), $key.'lfo' ) . '
[2155] Fix | Delete
</select>
[2156] Fix | Delete
</p>';
[2157] Fix | Delete
$out .= '<p>
[2158] Fix | Delete
<span class="label">' . __( 'General Font Size', 'themify' ) . '</span>
[2159] Fix | Delete
<select name="' . $key.'fs' . '">' . themify_options_module( array(
[2160] Fix | Delete
array( 'name' => __( 'Normal', 'themify' ), 'value' => '' ),
[2161] Fix | Delete
array( 'name' => __( 'Large', 'themify' ), 'value' => 'l' ),
[2162] Fix | Delete
), $key . 'fs' ) . '
[2163] Fix | Delete
</select>
[2164] Fix | Delete
</p>';
[2165] Fix | Delete
return $out;
[2166] Fix | Delete
}
[2167] Fix | Delete
[2168] Fix | Delete
/**
[2169] Fix | Delete
* Render the input field to allow uploading font packages
[2170] Fix | Delete
*
[2171] Fix | Delete
* @return string
[2172] Fix | Delete
*/
[2173] Fix | Delete
function themify_fontello_input_callback( $data = array() ) {
[2174] Fix | Delete
return '
[2175] Fix | Delete
<div class="themify_field_row">
[2176] Fix | Delete
<span class="label">'. __('Fontello Icon Package', 'themify') . '</span>
[2177] Fix | Delete
<input id="setting-fontello" type="text" class="width10" name="setting-fontello" value="' . esc_attr( themify_get( 'setting-fontello','',true ) ) . '" /> <br />
[2178] Fix | Delete
<div class="pushlabel" style="display:block;">
[2179] Fix | Delete
<div class="themify_medialib_wrapper">
[2180] Fix | Delete
<a href="#" class="themify-media-lib-browse" data-submit=\'' . json_encode( array( 'action' => 'themify_handle_fontello_upload', 'field_name' => 'setting-fontello' ) ) . '\' data-uploader-title="' . __( 'Upload package', 'themify' ) .'" data-uploader-button-text="'. __( 'Upload package', 'themify' ) .'" data-fields="setting-fontello" data-type="application/zip">'. __( 'Browse Library', 'themify' ) . '</a>
[2181] Fix | Delete
</div>
[2182] Fix | Delete
<small class="description">' . __( 'Go to <a target="_blank" rel="noopener" href="http://fontello.com">fontello.com</a>, pick your icons, download the webfont zip, upload and insert the zip URL here. The icon package will be auto detected on Themify\'s icon library where you click "Insert Icon".', 'themify' ) . '</small>
[2183] Fix | Delete
<small class="description">' . sprintf( __( '<a href="%s">Full Tutorial</a>' ), 'https://themify.me/blog/how-to-add-custom-icon-fonts' ) . '</small>
[2184] Fix | Delete
</div>
[2185] Fix | Delete
</div>';
[2186] Fix | Delete
}
[2187] Fix | Delete
[2188] Fix | Delete
if(!function_exists('themify_performance_settings')) {
[2189] Fix | Delete
/**
[2190] Fix | Delete
* Script Minification Settings
[2191] Fix | Delete
* @param array Themify data
[2192] Fix | Delete
* @return string Module markup
[2193] Fix | Delete
* @since 1.3.9
[2194] Fix | Delete
*/
[2195] Fix | Delete
function themify_performance_settings($data = array()){
[2196] Fix | Delete
$server=themify_get_server();
[2197] Fix | Delete
$htaccess_file=$server==='nginx'?null:Themify_Enqueue_Assets::getHtaccessFile();
[2198] Fix | Delete
$isMultiSite=is_multisite();
[2199] Fix | Delete
$cache_dir=TFCache::get_wp_content_dir();
[2200] Fix | Delete
if ($htaccess_file!==null && Themify_Filesystem::is_file($htaccess_file) && Themify_Filesystem::is_writable($htaccess_file)) {
[2201] Fix | Delete
$message= sprintf(__('Enabling Gzip will add code to your .htaccess file (%s)','themify'),$htaccess_file);
[2202] Fix | Delete
$gzip=themify_check( 'setting-cache_gzip',true );
[2203] Fix | Delete
$browser_cache=themify_check( 'setting-cache_browser',true );
[2204] Fix | Delete
}
[2205] Fix | Delete
else{
[2206] Fix | Delete
$message= $server!=='apache'?sprintf(__('It looks like you are using Nginx server. Please <a href="%s" target="_blank" rel="noopener">follow</a> this tutorial to enable this feature.','themify'),'https://themify.me/docs/enable-gzip-nginx-servers'):sprintf(__('The htaccess file %s isn`t writable. Please allow to write to enable this feauture','themify'),$htaccess_file);
[2207] Fix | Delete
$gzip=$browser_cache=null;
[2208] Fix | Delete
}
[2209] Fix | Delete
$cache_plugins=false!==TFCache::get_cache_plugins();
[2210] Fix | Delete
$menuCache='data-show-if-element="[name$=setting-cache-html]" data-show-if-value="false"';
[2211] Fix | Delete
$warning=$tmp='';
[2212] Fix | Delete
if($cache_plugins===true){
[2213] Fix | Delete
$menuCache='style="display:none"';
[2214] Fix | Delete
$warning=__('Themify Cache can not be enabled due to another cache plugin is activated.','themify');
[2215] Fix | Delete
}
[2216] Fix | Delete
elseif(!Themify_Filesystem::is_writable($cache_dir)){
[2217] Fix | Delete
$warning=sprintf(__('The directory %s isn`t writable. Please allow to write to enable this feauture','themify'),$cache_dir);
[2218] Fix | Delete
}
[2219] Fix | Delete
elseif(!WP_CACHE){
[2220] Fix | Delete
$tmp='<div class="pushlabel themify_warning note">'.__('WP_CACHE is not enabled. Please enable it on wp-config.php file. ','themify');
[2221] Fix | Delete
$tmp.=' <a href="https://wordpress.org/support/article/editing-wp-config-php/#cache" target="_blank" rel="noopener">'.__('Read details','themify').'</a>.';
[2222] Fix | Delete
if(Themify_Filesystem::is_writable(ABSPATH . 'wp-config.php' )){
[2223] Fix | Delete
$tmp.='<br/><br/><a href="#" data-action="themify_write_config" data-send="all" data-clearing-text="'.__('Writing...','themify').'" data-done-text="'.__('Done','themify').'" data-default-text="'.__('Try to fix it','themify').'" data-default-icon="ti-eraser" class="button button-outline js-clear-cache"> <span>'.__('Try to fix it','themify').'</span></a>';
[2224] Fix | Delete
}
[2225] Fix | Delete
$tmp.='</div>';
[2226] Fix | Delete
}
[2227] Fix | Delete
[2228] Fix | Delete
[2229] Fix | Delete
$ignore_cache=array(
[2230] Fix | Delete
'is_single'=>__('Exclude Single Posts','themify'),
[2231] Fix | Delete
'is_page'=>__('Exclude Pages','themify'),
[2232] Fix | Delete
'is_front_page'=>__('Exclude Front Page','themify'),
[2233] Fix | Delete
'is_home'=>__('Exclude Home','themify'),
[2234] Fix | Delete
'is_archives'=>__('Exclude Archives','themify'),
[2235] Fix | Delete
'is_tags'=>__('Exclude Tags','themify'),
[2236] Fix | Delete
'is_category'=>__('Exclude Category','themify'),
[2237] Fix | Delete
'is_feed'=>__('Exclude Feeds','themify'),
[2238] Fix | Delete
'is_author'=>__('Exclude Author Pages','themify')
[2239] Fix | Delete
);
[2240] Fix | Delete
if(themify_is_woocommerce_active()){
[2241] Fix | Delete
$ignore_cache['is_shop']=__('Exclude Shop Page','themify');
[2242] Fix | Delete
$ignore_cache['is_product']=__('Exclude Single Products','themify');
[2243] Fix | Delete
$ignore_cache['is_product_category']=__('Exclude Product Categories','themify');
[2244] Fix | Delete
$ignore_cache['is_product_tag']=__('Exclude Product Tags','themify');
[2245] Fix | Delete
}
[2246] Fix | Delete
$key='setting-cache-live';
[2247] Fix | Delete
$tmp.='<p><span class="label">' . __( 'Cache Expires', 'themify' ) . '</span><label class="pushlabel"><input type="text" name="'.$key.'" value="'.themify_get($key,(WEEK_IN_SECONDS/60),true).'" class="width4"> '.__('Minutes (default 1 week)','themify').'</label></p>';
[2248] Fix | Delete
[2249] Fix | Delete
$key='setting-cache-ignore';
[2250] Fix | Delete
$tmp.='<span class="label">' . __( 'Exclude Caching On', 'themify' ) . '</span><div class="pushlabel">';
[2251] Fix | Delete
foreach($ignore_cache as $k=>$v){
[2252] Fix | Delete
$tmp.='<label>';
[2253] Fix | Delete
$tmp.='<input type="checkbox" value="'.$k.'" id="'.$key.'" name="'.$key.'_'.$k.'" '. checked( themify_check($key.'_'.$k,true ),true,false ) .'/> ' . $v . '</label>';
[2254] Fix | Delete
$tmp.='</label><br/>';
[2255] Fix | Delete
}
[2256] Fix | Delete
$tmp.='</div>';
[2257] Fix | Delete
$ignore_cache=null;
[2258] Fix | Delete
$pageCache=$warning==='' && Themify_Filesystem::is_file(TFCache::get_cache_config_file());
[2259] Fix | Delete
$key = 'setting-disable-lazy';
[2260] Fix | Delete
$output='<div>
[2261] Fix | Delete
<div class="themify-info-link">To maximize your pagespeeed performance, please follow <a href="https://themify.me/blog/get-90-score-google-pagespeed-insights" target="_blank">this tutorial</a> to setup your theme and content.</div>
[2262] Fix | Delete
<span class="label">' . __( 'Themify Lazy Load', 'themify' ) .themify_help(__('Lazy load can speed up pagespeed by loading media (image, audio, video, iframe, etc.) when they are visible in the viewport.','themify')) . '</span>';
[2263] Fix | Delete
[2264] Fix | Delete
$output.='<label for="'.$key.'"><input type="checkbox" id="'.$key.'" name="'.$key.'" '. checked( themify_check($key,true ),true, false ) .'/> ' . __('Disable lazy load', 'themify') . '</label><br/>';
[2265] Fix | Delete
[2266] Fix | Delete
$output.='<div data-show-if-element="[name$='.$key.']" data-show-if-value="false" class="tf_clearfix">';
[2267] Fix | Delete
$output .= sprintf( '<div class="label">%s</div><div class="label input-range width10"><div class="range-slider width8"></div><input type="text" name="%s" value="%s" data-min="0" data-max="100" data-default-min="0" data-default-max="100" class="width4" readonly> px</div>',
[2268] Fix | Delete
esc_html__( 'Blur Image', 'themify' ),
[2269] Fix | Delete
'setting-lazy-blur',
[2270] Fix | Delete
themify_get('setting-lazy-blur',25,true )
[2271] Fix | Delete
);
[2272] Fix | Delete
[2273] Fix | Delete
$output.='</div>';
[2274] Fix | Delete
[2275] Fix | Delete
$key = 'setting-dev-mode';
[2276] Fix | Delete
$disabled = defined( 'THEMIFY_DEV' ) && THEMIFY_DEV ? ' disabled' : '';
[2277] Fix | Delete
$output.='<hr><p><span class="label">' . __( 'Development Mode', 'themify' ) .themify_help(__('Warning: the following will be disabled: Themify cache, menu cache, concate CSS caching, Gzip scripts. Only enable this for development purposes (eg. preview child theme CSS/script changes).','themify')) . '</span>';
[2278] Fix | Delete
[2279] Fix | Delete
$output.='<label for="'.$key.'"><input type="checkbox"' . $disabled . ' id="'.$key.'" name="'.$key.'" '. checked(themify_check($key,true ),true, false ) .'/> ' . __('Enable development mode', 'themify') . '</label><br/>';
[2280] Fix | Delete
if ( $disabled ) {
[2281] Fix | Delete
$output .= '<p class="description">' . __( 'This option is being overriden due to THEMIFY_DEV constant being defined. Try checking wp-config.php.', 'themify' ) . '</p>';
[2282] Fix | Delete
}
[2283] Fix | Delete
unset( $disabled );
[2284] Fix | Delete
[2285] Fix | Delete
$output.='<span data-show-if-element="[name$='.$key.']" data-show-if-value="true">';
[2286] Fix | Delete
[2287] Fix | Delete
$output.='<label for="'.$key.'-concate" class="pushlabel"><input type="checkbox" id="'.$key.'-concate" name="'.$key.'-concate" '. checked(themify_check($key.'-concate',true ),true, false ) .'/> ' . __('Disable Concate CSS', 'themify') . '</label><br/>';
[2288] Fix | Delete
[2289] Fix | Delete
$output.='<span class="themify_warning">'.__('Warning: the following will be disabled: Themify cache, menu cache, concate CSS caching, Gzip scripts. Only enable this for development purposes (eg. preview child theme CSS/script changes).','themify').'</span></span>';
[2290] Fix | Delete
[2291] Fix | Delete
$output.='</p>';
[2292] Fix | Delete
$output.='<div data-show-if-element="[name$='.$key.']" data-show-if-value="false">';//dev mode
[2293] Fix | Delete
[2294] Fix | Delete
$key = 'setting-cache-html';
[2295] Fix | Delete
$output.='<hr><p>
[2296] Fix | Delete
<span class="label">' . __( 'Themify Cache', 'themify' ) .themify_help(__('Caching can reduce page size and server responses (only frontend public viewing will be cached). Themify Cache can not be used with third party cache plugins to avoid conflicts.','themify')) . '</span>
[2297] Fix | Delete
<label for="'.$key.'"'.($warning!==''?' class="themify_field_disable"':'').'><input type="checkbox"'.($warning!==''?' disabled="disabled"':'').' id="'.$key.'" name="'.$key.'" '. checked( ($pageCache===true ?themify_check($key,true ):false),true,false ) .'/> ' . __('Enable Themify Cache (recommended)', 'themify') . '</label>
[2298] Fix | Delete
<small class="pushlabel'.($warning!==''?' themify_warning':'').'" style="margin:20px 0;">'.$warning.'</small></p>';
[2299] Fix | Delete
[2300] Fix | Delete
$output.='<div data-show-if-element="[name$='.$key.']" data-show-if-value="true">
[2301] Fix | Delete
'.$tmp.'
[2302] Fix | Delete
<span class="label">'. __( 'Excluding Caching URLs', 'themify' ) .'</span>
[2303] Fix | Delete
<div class="pushlabel">
[2304] Fix | Delete
<textarea class="widthfull" rows="5" name="setting-cache-rule" id="setting-cache-rule">'. esc_html( themify_get( 'setting-cache-rule','',true ) ).'</textarea>'
[2305] Fix | Delete
.'<small>'.__('Enter the URLs to exclude caching (supports regular expressions). Separate each rule with a line break.','themify').'</small>';
[2306] Fix | Delete
$output.='<br/><br/><a href="#" data-action="themify_clear_all_html" data-send="all" data-clearing-text="'.__('Clearing...','themify').'" data-done-text="'.__('Done','themify').'" data-default-text="'.__('Clear Themify Cache','themify').'" data-default-icon="ti-eraser" class="button button-outline js-clear-cache"><i class="ti-eraser"></i> <span>'.__('Clear Themify Cache','themify').'</span></a>';
[2307] Fix | Delete
if($isMultiSite){
[2308] Fix | Delete
$output.='<br/><label><input type="checkbox" value="1" id="tmp_cache_network" name="tmp_cache_network"/>'.__('Clear all network sites','themify').'</label>';
[2309] Fix | Delete
}
[2310] Fix | Delete
$output.='</div></div>';
[2311] Fix | Delete
$tmp=null;
[2312] Fix | Delete
$output.='<hr><p>
[2313] Fix | Delete
<span class="label">' . __( 'Browser Caching', 'themify' ) .themify_help(__("Cache static assets (CSS, JS, images, etc.) on user's browser. HTML is not cached",'themify')) . '</span>
[2314] Fix | Delete
<label for="setting-cache_browser"'.($browser_cache===null?' class="themify_field_disable"':'').'><input type="checkbox"'.($browser_cache===null?' disabled="disabled"':'').'id="setting-cache_browser" name="setting-cache_browser" '.checked( $browser_cache, true, false ).'/> ' . __('Enable Browser Caching (recommended)', 'themify').'</label>
[2315] Fix | Delete
</p>';
[2316] Fix | Delete
$output.='<hr><p>
[2317] Fix | Delete
<span class="label">' . __( 'Gzip Scripts', 'themify' ) .themify_help(__('Using Gzip version of scripts can reduce script file size by 60-80%.','themify')) . '</span>
[2318] Fix | Delete
<label for="setting-cache_gzip"'.($gzip===null?' class="themify_field_disable"':'').'><input type="checkbox"'.($gzip===null?' disabled="disabled"':'').'id="setting-cache_gzip" name="setting-cache_gzip" '.checked( $gzip, true, false ).'/> ' . __('Enable Gzip scripts (recommended)', 'themify').'</label>
[2319] Fix | Delete
<small class="pushlabel'.($gzip===null?' themify_warning':'').'" >'.$message.'</small>
[2320] Fix | Delete
</p>';
[2321] Fix | Delete
if ( ! wp_image_editor_supports() ) {
[2322] Fix | Delete
$message=__('The GD library or Imagick extensions are not installed. Ask your host provider to enable them to use this feature.','themify');
[2323] Fix | Delete
$webp=null;
[2324] Fix | Delete
}
[2325] Fix | Delete
else{
[2326] Fix | Delete
$message='';
[2327] Fix | Delete
$webp=themify_check( 'setting-webp',true );
[2328] Fix | Delete
if ( $server === 'litespeed' ) {
[2329] Fix | Delete
$message = sprintf( __( 'It looks like you are using LiteSpeed server. Please follow <a href="%s" target="_blank" rel="noopener">this tutorial</a> to enable WebP images on your server.', 'themify' ), 'https://docs.litespeedtech.com/lscache/lscwp/imageopt/' );
[2330] Fix | Delete
$webp = null;
[2331] Fix | Delete
} else if ( $server !== 'apache' ) {
[2332] Fix | Delete
$message=sprintf(__('It looks like you are using %s server. Please <a href="%s" target="_blank" rel="noopener">follow</a> this tutorial to enable this feature.','themify'), ucfirst($server),'https://themify.me/docs/enable-webp-nginx-servers');
[2333] Fix | Delete
}
[2334] Fix | Delete
}
[2335] Fix | Delete
$webp_quality = (int) themify_get( 'setting-webp-quality', '5', true );
[2336] Fix | Delete
$output.='</p>';
[2337] Fix | Delete
$output.='<hr><p>
[2338] Fix | Delete
<span class="label">' . __( 'Concate CSS', 'themify' ) . '</span>
[2339] Fix | Delete
<a href="#" data-action="themify_clear_all_concate" data-send="all" data-clearing-text="'.__('Clearing...','themify').'" data-done-text="'.__('Done','themify').'" data-default-text="'.__('Clear Concate CSS Cache','themify').'" data-default-icon="ti-eraser" class="button button-outline js-clear-cache"><i class="ti-eraser"></i> <span>'.__('Clear Concate CSS Cache','themify').'</span></a>
[2340] Fix | Delete
';
[2341] Fix | Delete
if(!Themify_Enqueue_Assets::createDir()){
[2342] Fix | Delete
$output.='<span class="pushlabel themify_warning">'.__('It looks like the WordPress upload folder path is set wrong or have file permission issue. Please check the upload path on WP Settings > Media. Make sure the folder is set correctly and it has correct file permission.','themify').'</span>';
[2343] Fix | Delete
}
[2344] Fix | Delete
elseif($isMultiSite){
[2345] Fix | Delete
$output.='<br/><label class="pushlabel"><input type="checkbox" value="1" id="tmp_cache_concte_network" name="tmp_cache_concte_network"/>'.__('Clear Concate cache in the whole network site','themify').'</label>';
[2346] Fix | Delete
}
[2347] Fix | Delete
$output.='</p>';
[2348] Fix | Delete
$key='setting-cache-menu';
[2349] Fix | Delete
$output.='<div '.$menuCache.'><hr><p>
[2350] Fix | Delete
<span class="label">' . __( 'WordPress Menus Cache', 'themify' ) .themify_help(__('Caching WordPress menus can reduce queries. Will only work when there is no active cache plugin. If you have server cache, you can disable this feature.', 'themify')) . '</span>';
[2351] Fix | Delete
if ( defined( 'POLYLANG_VERSION' ) ) {
[2352] Fix | Delete
$output .= '<small class="pushlabel themify_warning">' . __( 'Themify menu cache has been disabled because Polylang is detected and it can not work with menu caching.', 'themify' ) . '</small>';
[2353] Fix | Delete
} else {
[2354] Fix | Delete
$output .= '<label for="'. $key.'"><input type="checkbox" id="'. $key.'" name="'. $key.'" '.checked(themify_check( $key,true ), true, false ).'/> ' . __('Disable menu cache', 'themify').'</label>';
[2355] Fix | Delete
}
[2356] Fix | Delete
$output .= '</p></div>';
[2357] Fix | Delete
[2358] Fix | Delete
$output.='</div>';//end of dev mode
[2359] Fix | Delete
[2360] Fix | Delete
$output.='<hr><p>
[2361] Fix | Delete
<span class="label">' . __( 'WebP Image', 'themify' ) .themify_help(__('Using WebP image format can reduce file size by 50-90%. Only local images will be converted. The CDN and external images can not be converted. For background images of Themify Builder, you have to regenerate CSS and .htaccess file must be writeable.','themify')) . '</span>
[2362] Fix | Delete
<label for="setting-webp"'.($webp===null?' class="themify_field_disable"':'').'><input type="checkbox"'.($webp===null?' disabled="disabled"':'').'id="setting-webp" name="setting-webp" '.checked( $webp, true, false ).'/> ' . __('Enable WebP image (recommended)', 'themify').'</label>
[2363] Fix | Delete
</p>
[2364] Fix | Delete
<p>
[2365] Fix | Delete
<span class="label">' . __( 'WebP Image Quality', 'themify' ) . themify_help( __( 'Lower quality has smaller file size, but image might appear pixelated/blurry.', 'themify' ) ) . '</span> <select' . ($webp===null ? ' disabled="disabled"' : '' ) . ' id="setting-webp-quality" name="setting-webp-quality">'
[2366] Fix | Delete
. '<option value="1" ' . selected( $webp_quality, 1, false ) . '>' . __( 'Lowest', 'themify' ) . '</option>'
[2367] Fix | Delete
. '<option value="2" ' . selected( $webp_quality, 2, false ) . '>' . __( 'Low', 'themify' ) . '</option>'
[2368] Fix | Delete
. '<option value="3" ' . selected( $webp_quality, 3, false ) . '>' . __( 'Medium', 'themify' ) . '</option>'
[2369] Fix | Delete
. '<option value="4" ' . selected( $webp_quality, 4, false ) . '>' . __( 'Good', 'themify' ) . '</option>'
[2370] Fix | Delete
. '<option value="5" ' . selected( $webp_quality, 5, false ) . '>' . __( 'High', 'themify' ) . '</option>'
[2371] Fix | Delete
. '<option value="6" ' . selected( $webp_quality, 6, false ) . '>' . __( 'Highest', 'themify' ) . '</option>'
[2372] Fix | Delete
. '</select>
[2373] Fix | Delete
</p>
[2374] Fix | Delete
<span class="pushlabel"><a href="#" data-action="themify_clear_all_webp" data-clearing-text="'.__('Clearing...','themify').'" data-done-text="'.__('Done','themify').'" data-default-text="'.__('Clear WebP Images','themify').'" data-default-icon="ti-eraser" class="button button-outline js-clear-cache"><i class="ti-eraser"></i> <span>'.__('Clear WebP Images','themify').'</span></a></span>';
[2375] Fix | Delete
if($message!==''){
[2376] Fix | Delete
$output.='<small class="pushlabel themify_warning" >'.$message.'</small>';
[2377] Fix | Delete
}
[2378] Fix | Delete
$key='setting-jquery';
[2379] Fix | Delete
$output.='<hr><p>
[2380] Fix | Delete
<span class="label">' . __( 'jQuery Script', 'themify' ) .themify_help(__('Defer jQuery and all scripts can prevent render blocking. If your site/plugin(s) have inline jQuery code conflicting it, disable this option.','themify')) . '</span>
[2381] Fix | Delete
<label for="'. $key.'"><input type="checkbox" id="'. $key.'" name="'. $key.'" '.checked(themify_check( $key,true ), true, false ).'/> ' . __('Defer jQuery script loading', 'themify').'</label>
[2382] Fix | Delete
</p>';
[2383] Fix | Delete
$key = 'setting-jquery-migrate';
[2384] Fix | Delete
$output.='<p>
[2385] Fix | Delete
<span class="label">' . __( 'jQuery Migrate', 'themify' ) .themify_help(__('Only enable this if your plugin(s) use the deprecated jQuery versions.','themify')) . '</span>
[2386] Fix | Delete
<label for="'. $key.'"><input type="checkbox" id="'. $key.'" name="'. $key.'" '.checked(themify_check( $key,true ), true, false ).'/> ' . __('Enable jQuery Migrate', 'themify').'</label>
[2387] Fix | Delete
</p>';
[2388] Fix | Delete
[2389] Fix | Delete
if(themify_is_woocommerce_active()){
[2390] Fix | Delete
$key='setting-optimize-wc';
[2391] Fix | Delete
$output.='<hr><p>
[2392] Fix | Delete
<span class="label">' . __( 'WooCommerce Script Optimization', 'themify' ) .themify_help(__('Themify loads WooCommerce scripts on demand for faster page load. If you are encountering issues with third party WooCommerce extensions, try to disable WooCommerce script optimization.','themify')) . '</span>
[2393] Fix | Delete
<label for="'. $key.'"><input type="checkbox" id="'. $key.'" name="'. $key.'" '.checked(themify_check( $key,true ), true, false ).'/> ' . __('Disable WooCommerce script loading optimization', 'themify').'</label>
[2394] Fix | Delete
</p>';
[2395] Fix | Delete
$key='setting-defer-wc';
[2396] Fix | Delete
$output.='<div data-show-if-element="[name$=setting-jquery]" data-show-if-value="false"><p data-show-if-element="[name$=setting-optimize-wc]" data-show-if-value="false">
[2397] Fix | Delete
<span class="label">' . __( 'WooCommerce Script Defer', 'themify' ) .themify_help(__('WooCommerce scripts are deferred for faster page load. If you are encountering issues with third party WooCommerce extensions, try to disable script defer.','themify')) . '</span>
[2398] Fix | Delete
<label for="'. $key.'"><input type="checkbox" id="'. $key.'" name="'. $key.'" '.checked(themify_check( $key,true ), true, false ).'/> ' . __('Disable WooCommerce script defer', 'themify').'</label>
[2399] Fix | Delete
</p></div>';
[2400] Fix | Delete
}
[2401] Fix | Delete
$key='setting-emoji';
[2402] Fix | Delete
$output.='<hr><p>
[2403] Fix | Delete
<span class="label">' . __( 'WordPress Emoji', 'themify' ) .themify_help(__('If you are not using WordPress Emoji icons, keep it disabled to reduce script load.','themify')) . '</span>
[2404] Fix | Delete
<label for="'. $key.'"><input type="checkbox" id="'. $key.'" name="'. $key.'" '.checked(themify_check( $key,true ), true, false ).'/> ' . __('Enable Emoji script loading', 'themify').'</label>
[2405] Fix | Delete
</p>';
[2406] Fix | Delete
return $output;
[2407] Fix | Delete
}
[2408] Fix | Delete
}
[2409] Fix | Delete
[2410] Fix | Delete
if(!function_exists('themify_webfonts_subsets')) {
[2411] Fix | Delete
/**
[2412] Fix | Delete
* Module to specify additional characters subsets
[2413] Fix | Delete
* @param array Themify data
[2414] Fix | Delete
* @return string Module markup
[2415] Fix | Delete
* @since 1.3.9
[2416] Fix | Delete
*/
[2417] Fix | Delete
function themify_webfonts_subsets($data = array()){
[2418] Fix | Delete
[2419] Fix | Delete
$html='';
[2420] Fix | Delete
// List of fonts, recommended or full
[2421] Fix | Delete
if(!defined('THEMIFY_GOOGLE_FONTS') || THEMIFY_GOOGLE_FONTS == true){
[2422] Fix | Delete
$key = 'setting-gf';
[2423] Fix | Delete
$html='<p>
[2424] Fix | Delete
<span class="label">' . __( 'Download Google Fonts', 'themify' ) .'</span>
[2425] Fix | Delete
<label for="'.$key.'"><input type="checkbox" id="'.$key.'" name="'.$key.'" '. checked( themify_check($key,true ),true, false ) .'/> ' . __('Download Google Fonts to Local', 'themify') . '</label>
[2426] Fix | Delete
<small class="pushlabel">'.__('Downloads all Google Fonts used in the theme and Builder to your local server. Note: Google Maps, YouTube and any embeds loaded in iframe are excluded as they are loaded in the iframe.','themify').'</small>
[2427] Fix | Delete
';
[2428] Fix | Delete
$html.='<br/><span class="pushlabel"><a href="#" data-action="themify_clear_gfonts" data-send="all" data-clearing-text="'.__('Clearing...','themify').'" data-done-text="'.__('Done','themify').'" data-default-text="'.__('Clear Google Fonts Cache','themify').'" data-default-icon="ti-eraser" class="button button-outline js-clear-cache"><i class="ti-eraser"></i> <span>'.__('Clear Google Fonts Cache','themify').'</span></a></span></p><hr>';
[2429] Fix | Delete
}
[2430] Fix | Delete
$key = 'setting-webfonts_list';
[2431] Fix | Delete
$html.= '<p>
[2432] Fix | Delete
<span class="label">' . __('Google Fonts List', 'themify') . '</span>';
[2433] Fix | Delete
[2434] Fix | Delete
// Disable Google fonts
[2435] Fix | Delete
$html .= '<label for="' . esc_attr( $key . '_disabled' ) . '">
[2436] Fix | Delete
<input ' . checked( themify_check( $key ) ? themify_get( $key ) : '', 'disabled', false ) . ' type="radio" id="' . esc_attr( $key . '_disabled' ) . '" name="' . esc_attr( $key ) . '" value="disabled" /> ' . __( 'Disable Google fonts', 'themify' ) . '</label><br/>';
[2437] Fix | Delete
[2438] Fix | Delete
// Recommended list
[2439] Fix | Delete
$html .= '<span class="pushlabel">
[2440] Fix | Delete
<label for="' . esc_attr( $key . '_recommended' ) . '">
[2441] Fix | Delete
<input ' . checked( themify_check( $key )? themify_get( $key ) : 'recommended', 'recommended', false) . ' type="radio" id="' . esc_attr( $key . '_recommended' ) . '" name="' . esc_attr( $key ) . '" value="recommended" /> ' . __( 'Show recommended Google Fonts only', 'themify' ) . '</label><br/>';
[2442] Fix | Delete
[2443] Fix | Delete
// Full list
[2444] Fix | Delete
$html .= '
[2445] Fix | Delete
<label for="' . esc_attr( $key . '_full' ) . '">
[2446] Fix | Delete
<input ' . checked( themify_check( $key )? themify_get( $key ) : '', 'full', false ) . ' type="radio" id="' . esc_attr( $key . '_full' ) . '" name="' . esc_attr( $key ) . '" value="full" /> ' . __( 'Show all Google Fonts (showing all fonts will take longer to load)', 'themify' ) . '</label>
[2447] Fix | Delete
</span>
[2448] Fix | Delete
</p>';
[2449] Fix | Delete
return $html;
[2450] Fix | Delete
}
[2451] Fix | Delete
}
[2452] Fix | Delete
[2453] Fix | Delete
[2454] Fix | Delete
/**
[2455] Fix | Delete
* Renders the option to responsive design
[2456] Fix | Delete
*
[2457] Fix | Delete
* @since 2.1.5
[2458] Fix | Delete
* @return string
[2459] Fix | Delete
*/
[2460] Fix | Delete
function themify_disable_responsive_design_option( $data = array() ) {
[2461] Fix | Delete
$out = sprintf( '<p class="tf_clearfix"><span class="label width10">%s</span></p>', esc_html__( 'Responsive Breakpoints:', 'themify' ) );
[2462] Fix | Delete
[2463] Fix | Delete
$opt_data = themify_get_data();
[2464] Fix | Delete
$break_points = themify_get_breakpoints('',true);
[2465] Fix | Delete
$pre = 'setting-customizer_responsive_design_';
[2466] Fix | Delete
$bp_tablet_landscape = !empty( $opt_data[ $pre . 'tablet_landscape'] ) ? $opt_data[ $pre . 'tablet_landscape'] : 1024;
[2467] Fix | Delete
$bp_tablet = !empty( $opt_data[ $pre . 'tablet'] ) ? $opt_data[ $pre . 'tablet'] : 768;
[2468] Fix | Delete
$bp_mobile =!empty( $opt_data[ $pre . 'mobile'] ) ? $opt_data[ $pre . 'mobile'] : 600;
[2469] Fix | Delete
[2470] Fix | Delete
$out .= sprintf( '<div class="tf_clearfix"><div class="label">%s</div><div class="label input-range width10"><div class="range-slider width8"></div><input type="text" name="%s" value="%s" data-min="%d" data-max="%d" data-default-min="%d" data-default-max="%d" class="width4"> px</div></div>',
[2471] Fix | Delete
esc_html__( 'Tablet Landscape', 'themify' ),
[2472] Fix | Delete
$pre . 'tablet_landscape',
[2473] Fix | Delete
$bp_tablet_landscape,
[2474] Fix | Delete
$bp_tablet_landscape < $break_points['tablet_landscape'][0] ? $bp_tablet_landscape : $break_points['tablet_landscape'][0],//min
[2475] Fix | Delete
$bp_tablet_landscape > $break_points['tablet_landscape'][1] ? $bp_tablet_landscape : $break_points['tablet_landscape'][1],//max
[2476] Fix | Delete
$break_points['tablet_landscape'][0],// default min
[2477] Fix | Delete
$break_points['tablet_landscape'][1]// default max
[2478] Fix | Delete
);
[2479] Fix | Delete
$out .= sprintf( '<div class="tf_clearfix"><div class="label">%s</div><div class="label input-range width10"><div class="range-slider width8"></div><input type="text" name="%s" value="%s" data-min="%d" data-max="%d" data-default-min="%d" data-default-max="%d" class="width4"> px</div></div>',
[2480] Fix | Delete
esc_html__( 'Tablet Portrait', 'themify' ),
[2481] Fix | Delete
$pre . 'tablet',
[2482] Fix | Delete
$bp_tablet,
[2483] Fix | Delete
$bp_tablet < $break_points['tablet'][0] ? $bp_tablet : $break_points['tablet'][0],//min
[2484] Fix | Delete
$bp_tablet > $break_points['tablet'][1] ? $bp_tablet : $break_points['tablet'][1],//max
[2485] Fix | Delete
$break_points['tablet'][0],
[2486] Fix | Delete
$break_points['tablet'][1]
[2487] Fix | Delete
);
[2488] Fix | Delete
$out .= sprintf( '<div class="tf_clearfix"><div class="label">%s</div><div class="label input-range width10"><div class="range-slider width8"></div><input type="text" name="%s" value="%s" data-min="%d" data-max="%d" data-default-min="%d" data-default-max="%d" class="width4"> px</div></div>',
[2489] Fix | Delete
esc_html__( 'Mobile', 'themify' ),
[2490] Fix | Delete
$pre . 'mobile',
[2491] Fix | Delete
$bp_mobile,
[2492] Fix | Delete
$bp_mobile < 320 ? $bp_mobile : 320,//min
[2493] Fix | Delete
$bp_mobile > $break_points['mobile'] ? $bp_mobile : $break_points['mobile'],//max
[2494] Fix | Delete
320,
[2495] Fix | Delete
$break_points['mobile']
[2496] Fix | Delete
);
[2497] Fix | Delete
$out .= '
[2498] Fix | Delete
<p>
[2499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function