定制 underpin/admin-notice-loader 二次开发

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

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

underpin/admin-notice-loader

Composer 安装命令:

composer require underpin/admin-notice-loader

包简介

Admin notice Loader for Underpin

README 文档

README

Loader That assists with adding admin notices to a WordPress website.

Installation

Using Composer

composer require underpin/admin-notice-loader

Manually

This plugin uses a built-in autoloader, so as long as it is required before Underpin, it should work as-expected.

require_once(__DIR__ . '/underpin-admin-notices/admin-notices.php');

Setup

  1. Install Underpin. See Underpin Docs
  2. Register new admin notices as-needed.

Example

A very basic example could look something like this. This example would always display a notice on the settings page.

\Underpin\underpin()->admin_notices()->add( 'example-notice', [
	'name'                    => 'Example notice',
	'description'             => 'This notice displays all the time.',
	'type'                    => 'notice',
	'is_dismissible'          => false,
	'wrapper_classes'         => [ 'class-1', 'class-2' ],
	'id'                      => 'example-notice',
	'message'                 => 'This will display all the time.',
	'should_display_callback' => '__return_true',
] );

This would display: image

Alternatively, you can extend Admin_Notice and reference the extended class directly, like so:

underpin()->admin_notices()->add('key','Namespace\To\Class');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-05-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固