Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active January 15, 2019 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/9113a2d6016fb018b3afba0715a635bb to your computer and use it in GitHub Desktop.
Save deckerweb/9113a2d6016fb018b3afba0715a635bb to your computer and use it in GitHub Desktop.
Plugin: Toolbar Extras - Completely remove Admin notices.
<?php
/** Do NOT include the opening php tag */
/**
* Plugin: Toolbar Extras - Completely remove Admin notices.
*
* @author David Decker - DECKERWEB
* @link https://gist.github.com/deckerweb/9113a2d6016fb018b3afba0715a635bb
*/
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment