wordpruss/notices

WordPress管理页面上方显示的通知的面向对象包装。

dev-master 2017-09-06 05:48 UTC

This package is not auto-updated.

Last update: 2024-09-26 08:28:08 UTC


README

WordPress管理页面上方显示的通知的面向对象包装。

安装

composer require wordpruss/notices

基本用法

通知用于向用户展示信息。它们有四种类型:successwarninginfoerror。这些消息将在WordPress管理区域的顶部显示。可以通过引用Notify在插件中的任何地方使用通知。

<?php
use WordPruss\Notices\Notify;

Notify::error('Test an error notice');
Notify::info('Test an info notice');
Notify::warning('Test a warning notice');
Notify::success('Test a success notice');

// Hook up all the notices
Notify::hook();