heron69
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
/** * Remove WP Optimize from WP Rocket's list of plugins to deactivate. * * @param array $plugins List of plugins that WP Rocket recommends to deactivate. * @return array Modified list of plugins. */ function remove_wp_optimize_from_rocket_warning( $plugins ) { if ( isset( $plugins['wp-optimize'] ) ) { unset( $plugins['wp-optimize'] ); } return $plugins; } add_filter( 'rocket_plugins_to_deactivate', 'remove_wp_optimize_from_rocket_warning' );
Here is the updated code to supress the warning. Add it to the bottom of your function.php file. Works best if you’re running a child theme with an extra function.php file. This prevents it from being overwritten on theme updates.
Add the code below to your function.php of your child theme. To silence the message without modifying the actual plugin.
/**
- Remove WP Optimize from WP Rocket’s list of plugins to deactivate.
* - @param array $plugins List of plugins that WP Rocket recommends to deactivate.
- @return array Modified list of plugins.
*/
function remove_wp_optimize_from_rocket_warning( $plugins ) {
if ( isset( $plugins[‘wp-optimize’] ) ) {
unset( $plugins[‘wp-optimize’] );
}
return $plugins;
}
add_filter( ‘rocket_plugins_to_deactivate’, ‘remove_wp_optimize_from_rocket_warning’ );
- Remove WP Optimize from WP Rocket’s list of plugins to deactivate.
Viewing 2 replies - 1 through 2 (of 2 total)