piotrpress/wordpress-notice
最新稳定版本:v1.1.0
Composer 安装命令:
composer require piotrpress/wordpress-notice
包简介
This library simplifies the displaying of Notices in the WordPress dashboard.
README 文档
README
This library simplifies the displaying of Notices in the WordPress dashboard.
Installation
$ composer require piotrpress/wordpress-notice
Example
require __DIR__ . '/vendor/autoload.php'; namespace PiotrPress\WordPress; // Example #1 echo new Notice( 'This is an example notice message', Notice::ERROR ); // Example #2 Hooks::add( new Notice( 'This is an example notice message', Notice::ERROR ) );
Arguments
string$message - The notice message.string$type - The notice type. Possible values areNotice::INFO,Notice::SUCCESS,Notice::WARNING,Notice::ERROR. Default isnull.bool$dismissible - Whether the notice is dismissible. Possible values aretrue,false. Default isfalse.bool$alt - The alternative notice display style (with filled-in background). Possible values aretrue,false. Default isfalse.
Requirements
PHP >= 7.4 version.
License
统计信息
- 总下载量: 63
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2024-08-27