notices[] = [ 'message' => $message, 'type' => $type, ]; return $this; } /** * Output the registered notices */ public function admin_notices(): void { $allowed_html = [ 'strong' => [], 'em' => [], 'a' => [ 'href' => [] ] ]; foreach ($this->notices as $notice) { echo "
", wp_kses($notice['message'], $allowed_html), "