Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[WordPress][Imagify] Quick and dirty solution to programmatically hides Imagify’s admin bar menu.
<?php
/**
* Quick and dirty solution to programmtically hides Imagify’s admin bar menu. (Sorry, Grégory!)
* Caveats: Visual option on settings page gets overriden; some visual indicator should make this clear for users!
*/
add_action( 'imagify_loaded', function () {
if ( 0 !== get_imagify_option( 'admin_bar_menu' ) ) {
update_imagify_option( 'admin_bar_menu', 0 );
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment