Skip to content

Instantly share code, notes, and snippets.

@mustafaslk
Forked from Shelob9/remove-all.js
Created February 16, 2020 18:38
Show Gist options
  • Save mustafaslk/7e1d559ec60cab41332d0a8b9fe9d8e0 to your computer and use it in GitHub Desktop.
Save mustafaslk/7e1d559ec60cab41332d0a8b9fe9d8e0 to your computer and use it in GitHub Desktop.
Remove all notices in WP Admin, maybe.
jQuery('.error,.notice,.notice-error').remove();
<?php
add_action( 'admin_head', function(){
remove_all_actions( 'admin_notices' );
remove_all_actions( 'network_admin_notices' );
remove_all_actions( 'user_admin_notices' );
remove_all_actions( 'all_admin_notices' );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment