Last active
September 2, 2020 02:53
-
-
Save blogjunkie/7d1d8fc9607192896f8bbe20c9c173e2 to your computer and use it in GitHub Desktop.
WP-Rocket customizations - Code Snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable page caching in WP Rocket. | |
* | |
* @link http://docs.wp-rocket.me/article/61-disable-page-caching | |
*/ | |
add_filter( 'do_rocket_generate_caching_files', '__return_false' ); | |
/** | |
* Remove WP Rockt Admin Bar menu | |
* | |
* @link https://digwp.com/2016/06/remove-toolbar-items/ | |
*/ | |
function child_remove_toolbar_menu() { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_menu('wp-rocket'); | |
} | |
add_action('wp_before_admin_bar_render', 'child_remove_toolbar_menu', 999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment