Created
October 12, 2020 12:57
-
-
Save ajmaurya99/f0f0a3d28b8c457de2906173523692f6 to your computer and use it in GitHub Desktop.
Disable Autoptimize toolbar from frontend pages.
This file contains 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
add_action('admin_bar_menu', function() { | |
if (!is_admin()) { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_node( 'autoptimize' ); | |
} | |
}, 101, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment