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: awaitingmoderation.php
<?php
[0] Fix | Delete
[1] Fix | Delete
function awaitingmoderation_action( $buffer ) {
[2] Fix | Delete
$buffer = str_replace( __( 'Your comment is awaiting moderation.', 'wp-super-cache' ), '', $buffer );
[3] Fix | Delete
return $buffer;
[4] Fix | Delete
}
[5] Fix | Delete
[6] Fix | Delete
function awaitingmoderation_actions() {
[7] Fix | Delete
global $cache_awaitingmoderation;
[8] Fix | Delete
if ( '1' === $cache_awaitingmoderation ) {
[9] Fix | Delete
add_filter( 'wpsupercache_buffer', 'awaitingmoderation_action' );
[10] Fix | Delete
}
[11] Fix | Delete
}
[12] Fix | Delete
add_cacheaction( 'add_cacheaction', 'awaitingmoderation_actions' );
[13] Fix | Delete
[14] Fix | Delete
// Your comment is awaiting moderation.
[15] Fix | Delete
function wp_supercache_awaitingmoderation_admin() {
[16] Fix | Delete
global $cache_awaitingmoderation, $wp_cache_config_file, $valid_nonce;
[17] Fix | Delete
[18] Fix | Delete
$cache_awaitingmoderation = '' === $cache_awaitingmoderation ? '0' : $cache_awaitingmoderation;
[19] Fix | Delete
[20] Fix | Delete
if ( isset( $_POST['cache_awaitingmoderation'] ) && $valid_nonce ) {
[21] Fix | Delete
$cache_awaitingmoderation = (int) $_POST['cache_awaitingmoderation'];
[22] Fix | Delete
wp_cache_replace_line( '^ *\$cache_awaitingmoderation', "\$cache_awaitingmoderation = '$cache_awaitingmoderation';", $wp_cache_config_file );
[23] Fix | Delete
$changed = true;
[24] Fix | Delete
} else {
[25] Fix | Delete
$changed = false;
[26] Fix | Delete
}
[27] Fix | Delete
$id = 'awaitingmoderation-section';
[28] Fix | Delete
?>
[29] Fix | Delete
<fieldset id="<?php echo $id; ?>" class="options">
[30] Fix | Delete
<h4><?php _e( 'Awaiting Moderation', 'wp-super-cache' ); ?></h4>
[31] Fix | Delete
<form name="wp_manager" action="" method="post">
[32] Fix | Delete
<label><input type="radio" name="cache_awaitingmoderation" value="1" <?php if ( $cache_awaitingmoderation ) { echo 'checked="checked" '; } ?>/> <?php _e( 'Enabled', 'wp-super-cache' ); ?></label>
[33] Fix | Delete
<label><input type="radio" name="cache_awaitingmoderation" value="0" <?php if ( ! $cache_awaitingmoderation ) { echo 'checked="checked" '; } ?>/> <?php _e( 'Disabled', 'wp-super-cache' ); ?></label>
[34] Fix | Delete
<p><?php _e( 'Enables or disables plugin to Remove the text "Your comment is awaiting moderation." when someone leaves a moderated comment.', 'wp-super-cache' ); ?></p>
[35] Fix | Delete
<?php
[36] Fix | Delete
if ( $changed ) {
[37] Fix | Delete
if ( $cache_awaitingmoderation ) {
[38] Fix | Delete
$status = __( 'enabled', 'wp-super-cache' );
[39] Fix | Delete
} else {
[40] Fix | Delete
$status = __( 'disabled', 'wp-super-cache' );
[41] Fix | Delete
}
[42] Fix | Delete
echo '<p><strong>' . sprintf( __( 'Awaiting Moderation is now %s', 'wp-super-cache' ), $status ) . '</strong></p>';
[43] Fix | Delete
}
[44] Fix | Delete
echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
[45] Fix | Delete
wp_nonce_field( 'wp-cache' );
[46] Fix | Delete
?>
[47] Fix | Delete
</form>
[48] Fix | Delete
</fieldset>
[49] Fix | Delete
<?php
[50] Fix | Delete
}
[51] Fix | Delete
add_cacheaction( 'cache_admin_page', 'wp_supercache_awaitingmoderation_admin' );
[52] Fix | Delete
[53] Fix | Delete
function wpsc_awaiting_moderation_list( $list ) {
[54] Fix | Delete
$list['awaitingmoderation'] = array(
[55] Fix | Delete
'key' => 'awaitingmoderation',
[56] Fix | Delete
'url' => '',
[57] Fix | Delete
'title' => __( 'Awaiting Moderation', 'wp-super-cache' ),
[58] Fix | Delete
'desc' => __( 'Enables or disables plugin to Remove the text "Your comment is awaiting moderation." when someone leaves a moderated comment.', 'wp-super-cache' ),
[59] Fix | Delete
);
[60] Fix | Delete
return $list;
[61] Fix | Delete
}
[62] Fix | Delete
add_cacheaction( 'wpsc_filter_list', 'wpsc_awaiting_moderation_list' );
[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