Hide all Admin Notices and move on a separate page

I want to hide all 'admin_notices' from dashboard means everywhere. I've a separate Menu name Admin Notice. I want to move all notices there so I can manage them separately by user roles. There will be 2 columns-

  1. Display the full Notice
  2. User roles dropdown

I'm struggling to find out with Codex Documentation. If Someone can help me I will be greatful.

Topic notices plugin-development admin plugins Wordpress

Category Web


As far as I can see, you can run the action elsewhere on a different template or via a shortcode using do_action( 'admin_notices' ); however the only way to remove them from the default area (as far as I can see) is to hide them via CSS.

Below is a helpful code to remove all admin notices for all other users except the administrator:

if( ! is_super_admin() ) {

    remove_all_actions( 'admin_notices' );

}

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.