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: lockdown.php
<div class="wpsc-card">
[0] Fix | Delete
<a name='lockdown'></a>
[1] Fix | Delete
<fieldset class="options">
[2] Fix | Delete
<h4><?php _e( 'Lock Down:', 'wp-super-cache' ); ?> <?php echo $wp_lock_down == '0' ? '<span style="color:red">' . __( 'Disabled', 'wp-super-cache' ) . '</span>' : '<span style="color:green">' . __( 'Enabled', 'wp-super-cache' ) . '</span>'; ?></h4>
[3] Fix | Delete
<p><?php _e( 'Prepare your server for an expected spike in traffic by enabling the lock down. When this is enabled, new comments on a post will not refresh the cached static files.', 'wp-super-cache' ); ?></p>
[4] Fix | Delete
<p><?php _e( 'Developers: Make your plugin lock down compatible by checking the "WPLOCKDOWN" constant. The following code will make sure your plugin respects the WPLOCKDOWN setting.', 'wp-super-cache' ); ?>
[5] Fix | Delete
<blockquote><code>if( defined( 'WPLOCKDOWN' ) && constant( 'WPLOCKDOWN' ) ) {
[6] Fix | Delete
&nbsp;&nbsp;&nbsp;&nbsp;echo "<?php _e( 'Sorry. My blog is locked down. Updates will appear shortly', 'wp-super-cache' ); ?>";
[7] Fix | Delete
}</code></blockquote>
[8] Fix | Delete
<?php
[9] Fix | Delete
if( $wp_lock_down == '1' ) {
[10] Fix | Delete
?><p><?php _e( 'WordPress is locked down. Super Cache static files will not be deleted when new comments are made.', 'wp-super-cache' ); ?></p><?php
[11] Fix | Delete
} else {
[12] Fix | Delete
?><p><?php _e( 'WordPress is not locked down. New comments will refresh Super Cache static files as normal.', 'wp-super-cache' ); ?></p><?php
[13] Fix | Delete
}
[14] Fix | Delete
$new_lockdown = $wp_lock_down == '1' ? '0' : '1';
[15] Fix | Delete
$new_lockdown_desc = $wp_lock_down == '1' ? __( 'Disable', 'wp-super-cache' ) : __( 'Enable', 'wp-super-cache' );
[16] Fix | Delete
echo '<form name="wp_lock_down" action="' . esc_url_raw( add_query_arg( 'tab', 'settings', $admin_url ) . '#lockdown' ) . '" method="post">';
[17] Fix | Delete
echo "<input type='hidden' name='wp_lock_down' value='{$new_lockdown}' />";
[18] Fix | Delete
echo '<div class="submit"><input class="button-primary" type="submit" ' . SUBMITDISABLED . ' value="' . esc_attr( $new_lockdown_desc . ' ' . __( 'Lock Down', 'wp-super-cache' ) ) . '" /></div>';
[19] Fix | Delete
wp_nonce_field( 'wp-cache' );
[20] Fix | Delete
echo '</form>';
[21] Fix | Delete
[22] Fix | Delete
?></fieldset><?php
[23] Fix | Delete
if( $cache_enabled == true && $super_cache_enabled == true ) {
[24] Fix | Delete
?><a name='direct'></a>
[25] Fix | Delete
<fieldset class="options">
[26] Fix | Delete
<h4><?php _e( 'Directly Cached Files', 'wp-super-cache' ); ?></h4><?php
[27] Fix | Delete
[28] Fix | Delete
$cached_direct_pages = wpsc_update_direct_pages();
[29] Fix | Delete
[30] Fix | Delete
$readonly = '';
[31] Fix | Delete
if( !is_writeable_ACLSafe( ABSPATH ) ) {
[32] Fix | Delete
$readonly = 'READONLY';
[33] Fix | Delete
?><p style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><strong><?php _e( 'Warning!', 'wp-super-cache' ); ?></strong> <?php printf( __( 'You must make %s writable to enable this feature. As this is a security risk, please make it read-only after your page is generated.', 'wp-super-cache' ), ABSPATH ); ?></p><?php
[34] Fix | Delete
} else {
[35] Fix | Delete
$abspath_stat = stat(ABSPATH . '/');
[36] Fix | Delete
$abspath_mode = decoct( $abspath_stat[ 'mode' ] & 0777 );
[37] Fix | Delete
if ( substr( $abspath_mode, -2 ) == '77' ) {
[38] Fix | Delete
?><p style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><strong><?php _e( 'Warning!', 'wp-super-cache' ); ?></strong> <?php printf( __( '%s is writable. Please make it readonly after your page is generated as this is a security risk.', 'wp-super-cache' ), ABSPATH ); ?></p><?php
[39] Fix | Delete
}
[40] Fix | Delete
}
[41] Fix | Delete
echo '<form name="direct_page" action="' . esc_url_raw( add_query_arg( 'tab', 'settings', $admin_url ) . '#direct' ) . '" method="post">';
[42] Fix | Delete
if( is_array( $cached_direct_pages ) ) {
[43] Fix | Delete
$out = '';
[44] Fix | Delete
foreach( $cached_direct_pages as $page ) {
[45] Fix | Delete
if( $page == '' )
[46] Fix | Delete
continue;
[47] Fix | Delete
$generated = '';
[48] Fix | Delete
if( is_file( ABSPATH . $page . '/index.html' ) )
[49] Fix | Delete
$generated = '<input class="button-secondary" type="Submit" name="deletepage" value="' . $page . '">';
[50] Fix | Delete
$out .= "<tr><td><input type='text' $readonly name='direct_pages[]' size='30' value='$page' /></td><td>$generated</td></tr>";
[51] Fix | Delete
}
[52] Fix | Delete
if( $out != '' ) {
[53] Fix | Delete
?><table><tr><th><?php _e( 'Existing direct page', 'wp-super-cache' ); ?></th><th><?php _e( 'Delete cached file', 'wp-super-cache' ); ?></th></tr><?php
[54] Fix | Delete
echo "$out</table>";
[55] Fix | Delete
}
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
if ( 'READONLY' !== $readonly ) {
[59] Fix | Delete
echo esc_html__( 'Add direct page:', 'wp-super-cache' ) . '<input type="text" name="new_direct_page" size="30" value="" />';
[60] Fix | Delete
}
[61] Fix | Delete
echo '<p>' . sprintf(
[62] Fix | Delete
esc_html__( 'Directly cached files are files created directly off %s where your blog lives. This feature is only useful if you are expecting a major Digg or Slashdot level of traffic to one post or page.', 'wp-super-cache' ),
[63] Fix | Delete
esc_attr( ABSPATH )
[64] Fix | Delete
) . '</p>';
[65] Fix | Delete
if ( 'READONLY' !== $readonly ) {
[66] Fix | Delete
echo '<p>' . sprintf( __( 'For example: to cache <em>%1$sabout/</em>, you would enter %1$sabout/ or /about/. The cached file will be generated the next time an anonymous user visits that page.', 'wp-super-cache' ),
[67] Fix | Delete
esc_attr( trailingslashit( get_option( 'home' ) ) )
[68] Fix | Delete
) . '</p>';
[69] Fix | Delete
echo '<p>' . esc_html__( 'Make the textbox blank to remove it from the list of direct pages and delete the cached file.', 'wp-super-cache' ) . '</p>';
[70] Fix | Delete
[71] Fix | Delete
echo '<div class="submit"><input class="button-primary" type="submit" ' . SUBMITDISABLED . ' value="' . esc_attr__( 'Update Direct Pages', 'wp-super-cache' ) . '" /></div>';
[72] Fix | Delete
}
[73] Fix | Delete
wp_nonce_field( 'wp-cache' );
[74] Fix | Delete
echo '</form>';
[75] Fix | Delete
?>
[76] Fix | Delete
</fieldset>
[77] Fix | Delete
<?php
[78] Fix | Delete
} // if $super_cache_enabled
[79] Fix | Delete
echo '</div>';
[80] Fix | Delete
[81] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function