定制 koko-ng/admin-notice 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

koko-ng/admin-notice

最新稳定版本:1.1.0

Composer 安装命令:

composer create-project koko-ng/admin-notice

包简介

Simply set notices from various save_post hooks

README 文档

README

Simply add admin notices for all post saving hooks. You can either set the notice using set_notice_status or wrap your hook with with_error_notice, then all the errors will be catched and send displayed as a notice on the admin UI.

Features

  • Gutenberg notices
  • Classic editor notices

Installation

composer require koko-ng/admin-notice

Examples

require 'vendor/autoload.php';

add_action('acf/save_post', \Admin_Notice\with_error_notice( 'my_acf_save_post') );
function my_acf_save_post( $post_id ) {

  // You can use `\Admin_Notice\Exception` to set a notice level.
  throw new \Admin_Notice\Exception("Error message", 0, \Admin_Notice\NoticeLevels::Warning);
}

统计信息

  • 总下载量: 72
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2023-08-16