wp-admin-notices

Installation
SKILL.md

WordPress Admin Notices

The colored banner panels that appear above plugin admin pages. WP 6.4 added a proper helper (wp_admin_notice() / wp_get_admin_notice()) so you don't have to hand-write the <div class="notice notice-X is-dismissible"> markup anymore. Most plugins still do. This skill is the modern recipe + the dismissal-persistence pattern that's the hard part.

When to use this skill

Trigger when ANY of the following is true:

  • A plugin needs an admin banner: post-save success flash, integration warning, missing-config nag, version-bump tour, or first-run instructions.
  • Code references admin_notices, network_admin_notices, user_admin_notices, all_admin_notices, wp_admin_notice, wp_get_admin_notice, notice-error, notice-warning, notice-info, notice-success, is-dismissible, wp_admin_notice_args.
  • The user wants a "dismiss forever" button on a notice and is reaching for cookies / localStorage when user-meta is the right place.
  • The user complains: "my notice shows on every admin page" / "I dismissed it but it came back".

The four hooks — pick by audience

Core's admin header uses if ( is_network_admin() ) / elseif ( is_user_admin() ) / else to fire exactly one of the three context-specific hooks, then fires all_admin_notices in addition. So a normal rendered admin screen runs one context hook plus the all-context hook.

Installs
1
GitHub Stars
22
First Seen
1 day ago
wp-admin-notices — lonsdale201/wp-agent-skills