You’re a Tenant, Not the Owner: 6 Doors in Someone Else’s wp-admin, and How Not to Be a Bad Neighbor
Rules of a Good Neighbor — One Per Hook `admin_init` — move in quietly Don’t run heavy code or checks without a reason — this hook fires on…

Action Hook since 3.1.0
Fires to print admin notices at the top of admin pages
admin_notices runs on every admin screen — always check current_user_can() or a specific screen ID so your notice doesn't nag every user on every page.
On every wp-admin page render, after the admin menu but before the page's own content.
do_action( 'admin_notices' );add_action( 'admin_notices', function() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
echo '<div class="notice notice-warning"><p>Please configure My Plugin.</p></div>';
} );Show a warning banner only to admins.
Rules of a Good Neighbor — One Per Hook `admin_init` — move in quietly Don’t run heavy code or checks without a reason — this hook fires on…
Add the is-dismissible CSS class to the notice div and enqueue wp-admin's built-in dismiss script, or track dismissal yourself via user meta.
Source: wp-admin/admin-header.php
One session: this hook, then each related_hooks entry. Walk it and tell us what to change.
admin_notices → admin_init
Practice the admin_notices WordPress action hook in our interactive sandbox — a VS Code-style editor with a step-by-step admin_notices tutorial, add_action exercises, and instant feedback. No local WordPress install required.