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.../httpdocs/wp-conte.../plugins/wp-super.../partials
File: preload.php
<div class="wpsc-settings-inner">
[0] Fix | Delete
<?php
[1] Fix | Delete
global $wp_cache_preload_posts;
[2] Fix | Delete
[3] Fix | Delete
echo '<a name="preload"></a>';
[4] Fix | Delete
if ( ! $cache_enabled || ! $super_cache_enabled || true === defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
[5] Fix | Delete
wp_admin_notice(
[6] Fix | Delete
esc_html__( 'Preloading of cache disabled. Please make sure simple or expert mode is enabled or talk to your host administrator.', 'wp-super-cache' ),
[7] Fix | Delete
array(
[8] Fix | Delete
'type' => 'warning',
[9] Fix | Delete
)
[10] Fix | Delete
);
[11] Fix | Delete
return;
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
$count = wpsc_post_count();
[15] Fix | Delete
[16] Fix | Delete
$min_refresh_interval = wpsc_get_minimum_preload_interval();
[17] Fix | Delete
[18] Fix | Delete
echo '<div class="wpsc-card">';
[19] Fix | Delete
echo '<p>' . __( 'This will cache every published post and page on your site. It will create supercache static files so unknown visitors (including bots) will hit a cached page. This will probably help your Google ranking as they are using speed as a metric when judging websites now.', 'wp-super-cache' ) . '</p>';
[20] Fix | Delete
echo '<p>' . __( 'Preloading creates lots of files however. Caching is done from the newest post to the oldest so please consider only caching the newest if you have lots (10,000+) of posts. This is especially important on shared hosting.', 'wp-super-cache' ) . '</p>';
[21] Fix | Delete
echo '<p>' . __( 'In &#8217;Preload Mode&#8217; regular garbage collection will be disabled so that old cache files are not deleted. This is a recommended setting when the cache is preloaded.', 'wp-super-cache' ) . '</p>';
[22] Fix | Delete
echo '<form name="cache_filler" action="' . esc_url_raw( add_query_arg( 'tab', 'preload', $admin_url ) ) . '" method="POST">';
[23] Fix | Delete
echo '<input type="hidden" name="action" value="preload" />';
[24] Fix | Delete
echo '<input type="hidden" name="page" value="wpsupercache" />';
[25] Fix | Delete
echo '</div>';
[26] Fix | Delete
echo '<div class="wpsc-card">';
[27] Fix | Delete
echo '<p>' . sprintf( __( 'Refresh preloaded cache files every %s minutes. (0 to disable, minimum %d minutes.)', 'wp-super-cache' ), "<input type='text' size=4 name='wp_cache_preload_interval' value='" . (int) $wp_cache_preload_interval . "' />", $min_refresh_interval ) . '</p>';
[28] Fix | Delete
if ( $count > 100 ) {
[29] Fix | Delete
$step = (int)( $count / 10 );
[30] Fix | Delete
[31] Fix | Delete
$select = "<select name='wp_cache_preload_posts' size=1>";
[32] Fix | Delete
$select .= "<option value='all' ";
[33] Fix | Delete
if ( ! isset( $wp_cache_preload_posts ) || $wp_cache_preload_posts == 'all' ) {
[34] Fix | Delete
$checked = 'selectect=1 ';
[35] Fix | Delete
$best = 'all';
[36] Fix | Delete
} else {
[37] Fix | Delete
$checked = ' ';
[38] Fix | Delete
$best = $wp_cache_preload_posts;
[39] Fix | Delete
}
[40] Fix | Delete
$select .= "{$checked}>" . __( 'all', 'wp-super-cache' ) . "</option>";
[41] Fix | Delete
[42] Fix | Delete
$options = array();
[43] Fix | Delete
for( $c = $step; $c < $count; $c += $step ) {
[44] Fix | Delete
$checked = ' ';
[45] Fix | Delete
if ( $best == $c )
[46] Fix | Delete
$checked = 'selected=1 ';
[47] Fix | Delete
[48] Fix | Delete
$options[ $c ] = "<option value='$c'{$checked}>$c</option>";
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
if ( ! isset( $options[ $wp_cache_preload_posts ] ) ) {
[52] Fix | Delete
$options[ $wp_cache_preload_posts ] = "<option value='$wp_cache_preload_posts' selected=1>$wp_cache_preload_posts</option>";
[53] Fix | Delete
}
[54] Fix | Delete
ksort( $options );
[55] Fix | Delete
$select .= implode( "\n", $options );
[56] Fix | Delete
[57] Fix | Delete
$checked = ' ';
[58] Fix | Delete
if ( $best == $count )
[59] Fix | Delete
$checked = 'selected=1 ';
[60] Fix | Delete
$select .= "<option value='$count'{$checked}>$count</option>";
[61] Fix | Delete
$select .= "</select>";
[62] Fix | Delete
echo '<p>' . sprintf( __( 'Preload %s posts.', 'wp-super-cache' ), $select ) . '</p>';
[63] Fix | Delete
} else {
[64] Fix | Delete
echo '<input type="hidden" name="wp_cache_preload_posts" value="' . $count . '" />';
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
echo '<input type="checkbox" name="wp_cache_preload_on" value="1" ';
[68] Fix | Delete
echo $wp_cache_preload_on == 1 ? 'checked=1' : '';
[69] Fix | Delete
echo ' /> ' . __( 'Preload mode (garbage collection disabled. Recommended.)', 'wp-super-cache' ) . '<br />';
[70] Fix | Delete
echo '<input type="checkbox" name="wp_cache_preload_taxonomies" value="1" ';
[71] Fix | Delete
echo $wp_cache_preload_taxonomies == 1 ? 'checked=1' : '';
[72] Fix | Delete
echo ' /> ' . __( 'Preload tags, categories and other taxonomies.', 'wp-super-cache' ) . '<br />';
[73] Fix | Delete
echo __( 'Send me status emails when files are refreshed.', 'wp-super-cache' ) . '<br />';
[74] Fix | Delete
if ( !isset( $wp_cache_preload_email_volume ) )
[75] Fix | Delete
$wp_cache_preload_email_volume = 'none';
[76] Fix | Delete
echo '<select type="select" name="wp_cache_preload_email_volume">';
[77] Fix | Delete
echo '<option value="none" ' . selected( 'none', $wp_cache_preload_email_volume ) . '>' . esc_html__( 'No Emails', 'wp-super-cache' ) . '</option>';
[78] Fix | Delete
// translators: %d is the number of posts
[79] Fix | Delete
echo '<option value="many" ' . selected( 'many', $wp_cache_preload_email_volume ) . '>' . esc_html( sprintf( __( 'Many emails, 2 emails per %d posts.', 'wp-super-cache' ), WPSC_PRELOAD_POST_COUNT ) ) . '</option>';
[80] Fix | Delete
// translators: %d is the number of posts
[81] Fix | Delete
echo '<option value="medium" ' . selected( 'medium', $wp_cache_preload_email_volume ) . '>' . esc_html( sprintf( __( 'Medium, 1 email per %d posts.', 'wp-super-cache' ), WPSC_PRELOAD_POST_COUNT ) ) . '</option>';
[82] Fix | Delete
echo '<option value="less" ' . selected( 'less', $wp_cache_preload_email_volume ) . '>' . esc_html__( 'Less emails, 1 at the start and 1 at the end of preloading all posts.', 'wp-super-cache' ) . '</option>';
[83] Fix | Delete
echo "</select>";
[84] Fix | Delete
[85] Fix | Delete
if (
[86] Fix | Delete
wp_next_scheduled( 'wp_cache_preload_hook' )
[87] Fix | Delete
|| wp_next_scheduled( 'wp_cache_full_preload_hook' )
[88] Fix | Delete
|| wpsc_is_preload_active()
[89] Fix | Delete
) {
[90] Fix | Delete
$currently_preloading = true;
[91] Fix | Delete
}
[92] Fix | Delete
echo '<div class="submit"><input class="button-primary" type="submit" name="preload" value="' . __( 'Save Settings', 'wp-super-cache' ) . '" />';
[93] Fix | Delete
echo '</div>';
[94] Fix | Delete
wp_nonce_field( 'wp-cache' );
[95] Fix | Delete
echo '</form>';
[96] Fix | Delete
echo '<form name="do_preload" action="' . esc_url_raw( add_query_arg( 'tab', 'preload', $admin_url ) ) . '" method="POST">';
[97] Fix | Delete
echo '<input type="hidden" name="action" value="preload" />';
[98] Fix | Delete
echo '<input type="hidden" name="page" value="wpsupercache" />';
[99] Fix | Delete
echo '<div class="submit">';
[100] Fix | Delete
if ( false == $currently_preloading ) {
[101] Fix | Delete
echo '<input class="button-primary" type="submit" name="preload_now" value="' . __( 'Preload Cache Now', 'wp-super-cache' ) . '" />';
[102] Fix | Delete
} else {
[103] Fix | Delete
echo '<input class="button-primary" type="submit" name="preload_off" value="' . __( 'Cancel Cache Preload', 'wp-super-cache' ) . '" />';
[104] Fix | Delete
}
[105] Fix | Delete
echo '</div>';
[106] Fix | Delete
wp_nonce_field( 'wp-cache' );
[107] Fix | Delete
echo '</form>';
[108] Fix | Delete
echo '</div>';
[109] Fix | Delete
echo '</div>';
[110] Fix | Delete
[111] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function