` web component inside the window's * `after-titlebar` slot, and records the user's dismissal in * `localStorage` so the same notice never reappears. * * Notices are pure declarative data — no JS handle is needed. * * Example: * * ```php * openstation_register_window_notice( array( * 'id' => 'my-plugin/welcome', * 'tone' => 'info', * 'message' => 'Welcome! Read the docs.', * 'match' => array( 'window' => 'edit-php' ), // optional * ) ); * ``` * * @package OpenStation */ defined( 'ABSPATH' ) || exit; /** * Allowed tones — mirror the `` component's `tone` * attribute. * * @return string[] */ function openstation_window_notice_tones() { return array( 'info', 'success', 'warning', 'error', 'danger', 'neutral' ); } /** * Register (or replace) a declarative window notice. * * @param array $args { * @type string $id Required. Persistence + dedupe key. * Recommended format `/`. * @type string $message Required. HTML body. Passed through * `wp_kses_post()` before shipping, so * links + basic formatting are allowed * but `