Last active
January 15, 2019 13:58
-
-
Save deckerweb/9113a2d6016fb018b3afba0715a635bb to your computer and use it in GitHub Desktop.
Plugin: Toolbar Extras - Completely remove Admin notices.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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