Edit function get_subscribed_events()
on /wp-rocket/inc/classes/subscriber/admin/Settings/class-page-subscriber.php
//[ 'add_imagify_page', 9 ],
Edit function render_page()
on /wp-rocket/inc/classes/admin/settings/class-page.php
/*$this->heartbeat_section();
$this->addons_section();
$this->cloudflare_section();
$this->sucuri_section();*/
Add to functions.php
or wp-rocket.php
/**
* Clean Up WP Rocket.
*/
add_action( 'init', function() {
// Hide account info.
defined( 'WP_ROCKET_WHITE_LABEL_ACCOUNT' ) or define( 'WP_ROCKET_WHITE_LABEL_ACCOUNT', true );
// Hide comment from HTML source code.
defined( 'WP_ROCKET_WHITE_LABEL_FOOTPRINT' ) or define( 'WP_ROCKET_WHITE_LABEL_FOOTPRINT', true );
// Remove "Cache options" metabox.
remove_action( 'add_meta_boxes', 'rocket_cache_options_meta_boxes', 10 );
// Remove "Clear cache" in the post submit area.
remove_action( 'post_submitbox_start', 'rocket_post_submitbox_start', 10 );
// Clean from Admin Bar (top bar).
add_action( 'admin_bar_menu', function( $wp_admin_bar ) {
$wp_admin_bar->remove_node( 'purge-opcache' );
$wp_admin_bar->remove_node( 'docs' );
$wp_admin_bar->remove_node( 'faq' );
$wp_admin_bar->remove_node( 'support' );
}, PHP_INT_MAX );
// Remove "Clear this cache" from Post list.
add_filter( 'post_row_actions', function( $actions ) {
unset( $actions['rocket_purge'] );
return $actions;
});
// Remove "Clear this cache" from Page list.
add_filter( 'page_row_actions', function( $actions ) {
unset( $actions['rocket_purge'] );
return $actions;
});
});