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.../plugins
File: multisite.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( is_multisite() ) {
[2] Fix | Delete
add_cacheaction( 'add_cacheaction', 'wp_super_cache_multisite_init' );
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
function wp_super_cache_multisite_init() {
[6] Fix | Delete
add_filter( 'wpmu_blogs_columns', 'wp_super_cache_blogs_col' );
[7] Fix | Delete
add_action( 'manage_sites_custom_column', 'wp_super_cache_blogs_field', 10, 2 );
[8] Fix | Delete
add_action( 'init', 'wp_super_cache_override_on_flag', 9 );
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
function wp_super_cache_blogs_col( $col ) {
[12] Fix | Delete
$col['wp_super_cache'] = __( 'Cached', 'wp-super-cache' );
[13] Fix | Delete
return $col;
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
function wp_super_cache_blogs_field( $name, $blog_id ) {
[17] Fix | Delete
if ( 'wp_super_cache' !== $name ) {
[18] Fix | Delete
return false;
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
$blog_id = (int) $blog_id;
[22] Fix | Delete
[23] Fix | Delete
if ( isset( $_GET['id'], $_GET['action'], $_GET['_wpnonce'] )
[24] Fix | Delete
&& $blog_id === filter_input( INPUT_GET, 'id', FILTER_VALIDATE_INT )
[25] Fix | Delete
&& wp_verify_nonce( $_GET['_wpnonce'], 'wp-cache' . $blog_id )
[26] Fix | Delete
) {
[27] Fix | Delete
if ( 'disable_cache' === filter_input( INPUT_GET, 'action' ) ) {
[28] Fix | Delete
add_blog_option( $blog_id, 'wp_super_cache_disabled', 1 );
[29] Fix | Delete
} elseif ( 'enable_cache' === filter_input( INPUT_GET, 'action' ) ) {
[30] Fix | Delete
delete_blog_option( $blog_id, 'wp_super_cache_disabled' );
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
if ( 1 === (int) get_blog_option( $blog_id, 'wp_super_cache_disabled' ) ) {
[35] Fix | Delete
echo '<a href="' . wp_nonce_url( add_query_arg( array( 'action' => 'enable_cache', 'id' => $blog_id ) ), 'wp-cache' . $blog_id ) . '">' . __( 'Enable', 'wp-super-cache' ) . '</a>';
[36] Fix | Delete
} else {
[37] Fix | Delete
echo '<a href="' . wp_nonce_url( add_query_arg( array( 'action' => 'disable_cache', 'id' => $blog_id ) ), 'wp-cache' . $blog_id ) . '">' . __( 'Disable', 'wp-super-cache' ) . '</a>';
[38] Fix | Delete
}
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
function wp_super_cache_multisite_notice() {
[42] Fix | Delete
if ( 'wpsupercache' === filter_input( INPUT_GET, 'page' ) ) {
[43] Fix | Delete
echo '<div class="error"><p><strong>' . __( 'Caching has been disabled on this blog on the Network Admin Sites page.', 'wp-super-cache' ) . '</strong></p></div>';
[44] Fix | Delete
}
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
function wp_super_cache_override_on_flag() {
[48] Fix | Delete
global $cache_enabled, $super_cache_enabled;
[49] Fix | Delete
if ( true !== $cache_enabled ) {
[50] Fix | Delete
return false;
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
if ( 1 === (int) get_option( 'wp_super_cache_disabled' ) ) {
[54] Fix | Delete
$cache_enabled = false;
[55] Fix | Delete
$super_cache_enabled = false;
[56] Fix | Delete
define( 'DONOTCACHEPAGE', 1 );
[57] Fix | Delete
define( 'SUBMITDISABLED', 'disabled style="color: #aaa" ' );
[58] Fix | Delete
if ( is_admin() ) {
[59] Fix | Delete
add_action( 'admin_notices', 'wp_super_cache_multisite_notice' );
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function