Title: Notifications
Author: Chris Reynolds
Published: <strong>2013 年 2 月 4 日</strong>
Last modified: 2014 年 6 月 4 日

---

搜尋外掛

![](https://ps.w.org/notifications/assets/banner-772x250.png?rev=663010)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

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

# Notifications

 由 [Chris Reynolds](https://profiles.wordpress.org/jazzs3quence/) 開發

[下載](https://downloads.wordpress.org/plugin/notifications.1.1.3.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/notifications/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/notifications/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/notifications/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/notifications/#developers)

 [技術支援](https://wordpress.org/support/plugin/notifications/)

## 外掛說明

How many times have you needed to display a notice across your site? Too many, if
you ask me. I wrote this plugin because many of the notification bar plugins out
there leave much to be desired. Either there are too many options or not enough 
or not the ones that I want. Plus, it’s not easy to create a notice — you have to
go to some crazy screen and set options unique to that plugin.

This plugin uses custom post types, so notifications are set up like mini-posts 
that we all know and love. Multiple controls, as well as a built-in filter, enable
developers and casual users alike to easily customize the notification bar to your
heart’s content.

**Update:** This plugin now supports the [Theme Hook Alliance](https://github.com/zamoose/themehookalliance)`
tha_body_top` action. If you are using the `body_open` action in your child theme,
please change this to `tha_body_top`, e.g.

    ```
    do_action( 'tha_body_top' );
    ```

#### Usage

Notifications looks for the `body_open` hook. This hook was first [proposed on Trac](https://core.trac.wordpress.org/ticket/12563#comment:10)
by [Andrew Nacin](https://twitter.com/nacin) as a way to hook into an action that
fires immediately after the `<body>` tag in the code.

Want to filter the output to customize how the notification gets displayed? Use 
the `notf_notification_filter` filter in your plugin or theme, like this:

    ```
         function my_test_filter( $output ) {
            $output = '<span class="whoops-i-did-it-again" style="color: red;">'.notf_message().'</span>';
            return $output;
         }
         add_filter( 'notf_notification_filter', 'my_test_filter' );
    ```

**Important:** Use the `notf_message` function in your filter to return the actual
notification.

## 螢幕擷圖

 * [[
 * Default style
 * [[
 * Something cool
 * [[
 * Metallic
 * [[
 * Any color, as long as it’s gray
 * [[
 * A real hot one
 * [[
 * Getting warmer
 * [[
 * Lemon
 * [[
 * Orange
 * [[
 * Plain Jane
 * [[
 * Press’d!
 * [[
 * Another admin bar
 * [[
 * Tax Return
 * [[
 * Bright idea
 * [[
 * Alert!
 * [[
 * Something bad
 * [[
 * You should know…
 * [[
 * Success!!
 * [[
 * No styles

## 安裝方式

 1. Upload the plugin via FTP or the plugin uploader to your `/wp-content/plugins/`
    directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. If your theme does not natively support the `tha_body_top` hook, open your `header.
    php` and add the following immediately after the `<body>` tag:

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Notifications〉的開發相關工作。

參與者

 *   [ Chris Reynolds ](https://profiles.wordpress.org/jazzs3quence/)

[將〈Notifications〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/notifications)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/notifications/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/notifications/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/notifications/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/notifications/)。

## 變更記錄

#### 1.1.3

 * Checks for messages before trying to output them (thanks Daron Spence!)

#### 1.1.2

 * Updates support for [Theme Hook Alliance](https://github.com/zamoose/themehookalliance)
   action hook instead of arbitrary, theme-specific hooks.

#### 1.1.1

 * fixes validation _doing_it_wrong()

#### 1.1

 * added sticky option, to stick the notification to the top of the page, rather
   than scrolling with the page.

#### 1.0.1

 * removes menu order (can conflict with other post types with same menu order)

#### 1.0

 * first public release

## 中繼資料

 *  版本 **1.1.3**
 *  最後更新 **12 年前**
 *  啟用安裝數 **30+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.9.40**
 *  語言
 * [English (US)](https://wordpress.org/plugins/notifications/)
 *  [進階檢視](https://tw.wordpress.org/plugins/notifications/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  2 個 5 星使用者評論     ](https://wordpress.org/support/plugin/notifications/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/notifications/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/notifications/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/notifications/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/notifications/reviews/?filter=1)

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

[查看全部使用者評論](https://wordpress.org/support/plugin/notifications/reviews/)

## 參與者

 *   [ Chris Reynolds ](https://profiles.wordpress.org/jazzs3quence/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/notifications/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AWM2TG3D4HYQ6)