Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/patrik-csak/fa-wp-admin-menu-icons. Font Awesome icons for WordPress custom post types and custom m wordpress.org/plugins/fa-wp-admin-menu-icons
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940<?php
namespace Fawpami;
use function get_plugin_data;
require_once 'AdminNotice.php';
class AdminNotices{ /** @var AdminNotice[] */ private static array $notices = [];
/** * @param string $message * @param string $style 'error', 'info', 'success', 'warning', or '' * * @return void */ public static function add(string $message, string $style = ''): void { self::$notices[] = new AdminNotice($message, $style); }
public static function print(): void { $pluginName = get_plugin_data( __DIR__ . '/../fa-wp-admin-menu-icons.php' )['Name'];
foreach (self::$notices as $notice) { echo <<< HTML<div class='notice notice-$notice->style'> <p><b>$pluginName:</b> $notice->message</p></div>HTML; } }}