Skip to content

Instantly share code, notes, and snippets.

Embed
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>
<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