Skip to content

Instantly share code, notes, and snippets.

@glueckpress
Created August 16, 2018 09:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glueckpress/aaabd7e76596ba9cc9e3221c90771715 to your computer and use it in GitHub Desktop.
Save glueckpress/aaabd7e76596ba9cc9e3221c90771715 to your computer and use it in GitHub Desktop.
[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