| @@ -57,9 +57,12 @@ | ||
| 57 | 57 | * Notice configuration arguments. |
| 58 | 58 | * |
| 59 | 59 | * @type string $id Required. Unique notice identifier. |
| 60 | 60 | * @type string $variant Notice type: 'error', 'warning', 'info', 'success'. Default 'info'. |
| 61 | - * @type string $message Required. Notice message (can contain HTML). | |
| 61 | + * @type string $message Required. Notice message. Plain text only — | |
| 62 | + * AdminNotice.js renders it as a React child, so any | |
| 63 | + * markup shows up as literal characters. Links belong | |
| 64 | + * in `actions`. | |
| 62 | 65 | * @type string $title Optional. Notice title. |
| 63 | 66 | * @type array $actions Optional. Array of action button configurations. |
| 64 | 67 | * @type bool $dismissible Optional. Whether notice can be dismissed. Default true. |
| 65 | 68 | * @type array $pages Optional. Page slugs where notice should appear. Default ['all']. |
| @@ -72,8 +75,14 @@ | ||
| 72 | 75 | * @type string $target Optional. Link target: '_blank' or '_self'. Default '_self'. |
| 73 | 76 | * @type string $variant Optional. Button variant: 'primary', 'secondary', 'link'. Default 'primary'. |
| 74 | 77 | * @type string $size Optional. Button size: 'sm', 'md', 'lg'. Default 'sm'. |
| 75 | 78 | * @type string $className Optional. Additional CSS classes. |
| 79 | + * @type string $action Optional. Opaque identifier that AdminNotice.js resolves | |
| 80 | + * to a local handler, for an action that must call the | |
| 81 | + * server. Deliberately NOT a URL, endpoint or HTTP method: | |
| 82 | + * the server never tells the browser which address to call. | |
| 83 | + * Pair it with `url` so the action still does something if | |
| 84 | + * no handler is registered for the identifier. | |
| 76 | 85 | * } |
| 77 | 86 | * |
| 78 | 87 | * @return void |
| 79 | 88 | * @since 2.5.0 |
| @@ -186,9 +195,9 @@ | ||
| 186 | 195 | * ``` |
| 187 | 196 | * |
| 188 | 197 | * @param string $id Unique notice identifier. |
| 189 | 198 | * @param string $variant Notice type: 'error', 'warning', 'info', 'success'. |
| 190 | - * @param string $message Notice message (HTML allowed). | |
| 199 | + * @param string $message Notice message. Plain text only; see register_notice(). | |
| 191 | 200 | * @param array $actions Optional. Array of action button configurations. |
| 192 | 201 | * @param array $pages Optional. Page slugs where notice should appear. Default ['all']. |
| 193 | 202 | * @return void |
| 194 | 203 | * @since 2.5.0 |