Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[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>
<li>-header.php (modified by the Wordpress SEO plugin)</li>
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