Title: Admin Notice
Author: Adam Walter
Published: <strong>2015 年 4 月 6 日</strong>
Last modified: 2022 年 1 月 25 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/admin-notice.svg)

# Admin Notice

 作者：[Adam Walter](https://profiles.wordpress.org/adamwalter/)

[下载](https://downloads.wordpress.org/plugin/admin-notice.1.2.zip)

 * [详情](https://cn.wordpress.org/plugins/admin-notice/#description)
 * [评价](https://cn.wordpress.org/plugins/admin-notice/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/admin-notice/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/admin-notice/#developers)

 [支持](https://wordpress.org/support/plugin/admin-notice/)

## 描述

Admin Notice is a very simple plugin that allows you to display custom notices in
the WordPress admin that is visible to all users.

Control over the notice text and styling is available from the plugin’s settings
page.

Developers can use the `admin_notice_enable` hook to control the notice’s visibility
on a more granular level. The following example demonstrates how to show the notice
only in the “Posts” area of the admin.

    ```
    add_filter('admin_notice_enable', function($enabled) {

        $screen = get_current_screen();

        if (isset($screen->post_type) && $screen->post_type !== 'post') {
            $enabled = false;
        }

        return $enabled;

    }, 10, 1);
    ```

## 屏幕截图

 * [[
 * Creating your admin notice

## 安装

 1. Upload `admin-notice` to the `/wp-content/plugins/` directory
 2. 通过WordPress的的“Plugins”菜单激活插件
 3. Plugin options will be available under Settings  Admin Notice

## 常见问题

### I have a question

Leave your question in the support tab and I’ll respond!

## 评价

![](https://secure.gravatar.com/avatar/96060e4be435d32b2632a572e1d5662f0cf36671a7a0a92536ac151ffe548a14?
s=60&d=retro&r=g)

### 󠀁[great](https://wordpress.org/support/topic/great-15734/)󠁿

 [sguo996](https://profiles.wordpress.org/sguo996/) 2023 年 8 月 2 日

nice little plugin, will be better if we can allow users to close the notice tho

![](https://secure.gravatar.com/avatar/f35f93ae052b2f5b87df05f5ec7de4d0d05c292007f9d8b57e4e2b45f0534bb4?
s=60&d=retro&r=g)

### 󠀁[Very Useful](https://wordpress.org/support/topic/very-useful-3277/)󠁿

 [Webprom Design](https://profiles.wordpress.org/webprom/) 2023 年 5 月 13 日

Thanks for the plugin!

![](https://secure.gravatar.com/avatar/cd4bf5ad28b1eb36e0cc0c73fda49a08bb6e024e8ee5e743eb0dca0c8e6080b1?
s=60&d=retro&r=g)

### 󠀁[Perfect 🙂](https://wordpress.org/support/topic/perfect-8817/)󠁿

 [pagrob](https://profiles.wordpress.org/pagrob/) 2021 年 10 月 5 日

Just what I was looking for to alert only logged in users

![](https://secure.gravatar.com/avatar/5fa7a2443d74bd12f206d0e120f3241b2d5ac88358e3bf0732ff92c499c2d033?
s=60&d=retro&r=g)

### 󠀁[Excellent, for products entry instructions!](https://wordpress.org/support/topic/excellent-for-products-entry-instructions/)󠁿

 [sevans917](https://profiles.wordpress.org/sevans917/) 2021 年 6 月 30 日

Developer extended to enable visibility on specific post types. Perfect.

![](https://secure.gravatar.com/avatar/44fcf6c88acf4c81e1a3ccbb3717a6eb3136b77a594acb07b26fbcc27865c1c0?
s=60&d=retro&r=g)

### 󠀁[EXCELLENT ! / GOOD !](https://wordpress.org/support/topic/excellent-good-3/)󠁿

 [bgtbbox](https://profiles.wordpress.org/bgtbbox/) 2016 年 11 月 15 日

Super plugin. Installation, rapide et simple. Facile à utiliser. Idéal, pour information,
tableau de bords au admin client. Merci 🙂

![](https://secure.gravatar.com/avatar/75d61c5dda00822a265604f6367f04dd5ecd8ca9a611c209982d346f84212c3a?
s=60&d=retro&r=g)

### 󠀁[Nice Plugin!](https://wordpress.org/support/topic/nice-plugin-669/)󠁿

 [makkal](https://profiles.wordpress.org/makkal/) 2016 年 10 月 24 日

It works perfectly.

 [ 阅读所有8条评价 ](https://wordpress.org/support/plugin/admin-notice/reviews/)

## 贡献者及开发者

「Admin Notice」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Adam Walter ](https://profiles.wordpress.org/adamwalter/)

「Admin Notice」插件已被翻译至 5 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/admin-notice/contributors)
为本插件所做的贡献。

[帮助将「Admin Notice」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/admin-notice)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/admin-notice/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/admin-notice/)，或通过[RSS](https://plugins.trac.wordpress.org/log/admin-notice/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/admin-notice/)。

## 更新日志

#### 1.2

 * Enhancement: Adds `admin_notice_enable` filter. Thanks to @sevans917 for the 
   feature request!

#### 1.1

 * Enhancement: Renames notice styles to be in line with WordPress admin notice 
   classes.
 * Security: Much better input sanitization added.
 * Tweak: Removes old (ugly) notice styles in favor of default WordPress styles.
 * Tweak: Moves plugin settings page to the Settings menu.
 * Tweak: Plugin now cleans up its database options on uninstall.
 * Tweak: Major code refactoring.

#### 1.0

 * First version of the plugin

## 额外信息

 *  版本 **1.2**
 *  最后更新：**4 年前**
 *  活跃安装数量 **600+**
 *  WordPress 版本 ** 5.4.1 或更高版本 **
 *  已测试的最高版本为 **5.9.13**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (Canada)](https://en-ca.wordpress.org/plugins/admin-notice/) 、 [English (US)](https://wordpress.org/plugins/admin-notice/)、
   [Norwegian (Bokmål)](https://nb.wordpress.org/plugins/admin-notice/) 、 [Spanish (Chile)](https://cl.wordpress.org/plugins/admin-notice/)、
   [Spanish (Spain)](https://es.wordpress.org/plugins/admin-notice/) 和 [Swedish](https://sv.wordpress.org/plugins/admin-notice/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/admin-notice)
 * 标签
 * [admin](https://cn.wordpress.org/plugins/tags/admin/)[alert](https://cn.wordpress.org/plugins/tags/alert/)
   [backend](https://cn.wordpress.org/plugins/tags/backend/)[notice](https://cn.wordpress.org/plugins/tags/notice/)
 *  [高级视图](https://cn.wordpress.org/plugins/admin-notice/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  6 条 5 星评价     ](https://wordpress.org/support/plugin/admin-notice/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/admin-notice/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/admin-notice/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/admin-notice/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/admin-notice/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/admin-notice/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/admin-notice/reviews/)

## 贡献者

 *   [ Adam Walter ](https://profiles.wordpress.org/adamwalter/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/admin-notice/)