Remove the Plugin’s Admin Notices

Due to plugin conflicts that may appear here and there once in a while it can lead to non-disappearing Admin Notices of the Toolbar Extras plugin. The plugin has two of these: one on the regular WordPress Plugins page and one on its own settings page.

To completely remove them just use the code snippet below. This will remove the whole code loading these notices it is way more than to dismiss them.

This code snippet goes into a core functionality plugin, or into Code Snippets.

 * Plugin: Toolbar Extras - Completely remove Admin notices.
 * @author David Decker - DECKERWEB
 * @link
if ( ! function_exists( 'tbex_remove_admin_notices' ) ) :

  add_action( 'admin_head', 'tbex_remove_admin_notices', 50 );
  function tbex_remove_admin_notices() {

    remove_action( 'load-toolbar-extras', 'ddw_tbex_settings_page_welcome', 5 );
    remove_action( 'admin_notices', 'ddw_tbex_notice_settings_welcome' );
    remove_action( 'admin_notices', 'ddw_tbex_notice_plugins_welcome' );
    remove_action( 'network_admin_notices', 'ddw_tbex_notice_plugins_welcome' );
    remove_action( 'admin_notices', 'ddw_tbex_register_notice_plugin_review' );
    remove_action( 'admin_enqueue_scripts', 'ddw_tbex_enqueue_notice_review_styles' );

  }  // end function

endif;Code language: PHP (php)

Some plugins, especially in the caching sphere seem to make some issues sometimes. For example WP Rocket in a Multisite context as well as another user reporting this one: SiteGround Memcached drop-in, placed by the SG Optimizer plugin. If you are one of those users suffering with this issue, just use the code snippet above. – Where Do I Put Code Snippets?