Created
October 27, 2014 01:23
-
-
Save wpspeak/2862bb0f05014ca2a0dc to your computer and use it in GitHub Desktop.
Conditionally add admin notes
This file contains hidden or 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 | |
//* Conditionally add admin notes | |
function wpspeak_admin_notice(){ | |
global $pagenow; | |
if ( $pagenow == 'plugins.php' ) { | |
echo '<div class="updated"> | |
<p>This notice only appears on the plugins page.</p> | |
</div>'; | |
} | |
} | |
add_action('admin_notices', 'wpspeak_admin_notice'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credit: http://wptheming.com/2011/08/admin-notices-in-wordpress/