wp-admin-notices

Official

Show targeted, dismissible admin notices

Authorvikingokft
Version1.0.0
Installs0

System Documentation

What problem does it solve?

WordPress plugins often need to show admin banners reliably, only on the right screens, with correct markup and (optionally) “dismiss forever” behavior that doesn’t reappear every page load.

Core Features & Use Cases

  • Modern notice rendering for WP 6.4+: Use wp_admin_notice() / wp_get_admin_notice() to generate correctly styled notice panels for notice-error/-warning/-info/-success, including support for is-dismissible.
  • Correct hook choice and screen targeting: Understand the four relevant hooks (admin_notices, network_admin_notices, user_admin_notices, all_admin_notices) and restrict output using get_current_screen() to avoid spamming users across unrelated admin pages.
  • Persisted dismissal pattern: Implement per-user “dismiss forever” by combining user meta storage with a REST endpoint for recording dismissal (instead of relying on is-dismissible alone).
  • Redirect flash messages: Use per-user transients to show a success/error/info notice after POST/redirect flows without leaking messages across users.

Quick Start

Tell the AI to implement a WP 6.4+ admin notice for my plugin settings page that is only shown there and persists dismissal permanently after the user clicks “Got it.”

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: wp-admin-notices
Download link: https://github.com/vikingokft/wp-agent-skills/archive/main.zip#wp-admin-notices

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.