Skip to content

Instantly share code, notes, and snippets.

@keeneyemedia
Last active September 19, 2017 19:17
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 keeneyemedia/3a34f20fc62693876c03 to your computer and use it in GitHub Desktop.
Save keeneyemedia/3a34f20fc62693876c03 to your computer and use it in GitHub Desktop.
[Add admin messages to dashboard] Yellow = 'notice-warning'; Green = 'updated'; Red = 'error' #wordpress #tutorials #dashboard
function kem_theme_admin_notice(){
global $pagenow;
if ( $pagenow == 'themes.php' ) {
echo '<div class="notice notice-warning">
<p><strong>Before updating the "Spacing" theme, please note the following files have been modified:</strong></p>
<ul>
<li>-footer.php</li>
<li>-header.php (modified by the Wordpress SEO plugin)</li>
</ul>
</div>';
}
}
add_action('admin_notices', 'kem_theme_admin_notice');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment