afragen/wp-dismiss-notice 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

afragen/wp-dismiss-notice

Composer 安装命令:

composer require afragen/wp-dismiss-notice

包简介

Library for time dismissible WordPress admin notices.

README 文档

README

Add time dismissible admin notices to WordPress. Fork of https://github.com/w3guy/persist-admin-notices-dismissal

Instuctions

Initialize the class.

new \WP_Dismiss_Notice(); in your project.

Admin notice format.

You must add data-dismissible='<admin notice identifier>-<timeout>' to the admin notice div class. <timeout> values are from one day '1' to 'forever'. Default timeout is 14 days. The <admin notice identifier> should be some unique value based upon the admin notice that you wish to dismiss.

Example using a 14 day dismissible notice.

<div class="notice-warning notice is-dismissible" data-dismissible="my_admin_notice_<hash>-14">...</div>

Use the filter dismiss_notice_vendor_dir if you have set the composer vendor-dir to a non-standard location.

/**
 * Filter composer.json vendor directory.
 * Some people don't use the standard vendor directory.
 *
 * @param string Composer vendor directory.
 */
$vendor_dir       = apply_filters( 'dismiss_notice_vendor_dir', '/vendor' );

统计信息

  • 总下载量: 35.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 20
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固