Title: WP247 Extension Notification Server
Author: wescleveland
Published: <strong>2017 年 12 月 12 日</strong>
Last modified: 2017 年 12 月 14 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/wp247-extension-notification-server.
svg)

# WP247 Extension Notification Server

 作者：[wescleveland](https://profiles.wordpress.org/wescleveland/)

[下载](https://downloads.wordpress.org/plugin/wp247-extension-notification-server.1.0.1.zip)

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

 [支持](https://wordpress.org/support/plugin/wp247-extension-notification-server/)

## 描述

#### OVERVIEW

The strength of WordPress is in it’s ability to be customized through the use of
extensions (plugins and themes).

The **WP247 Extension Notification System** provides a standard interface for WordPress
extension developers to communicate important information about their extension 
to their extension users.

The _Settings_ page provides you with complete control over which extensions the**
WP247 Extension Notification System** will communicate with and which notices will
continue to be displayed.

#### NOTICES

The **WP247 Extension Notification System** will display notices until they are 
dismissed. The extension developer assigns one of three dismissibility types to 
each notice they send:

 * **None** indicates that the notice is not dismissible. The _dismiss_ button will
   not appear.
 * **Temporary** indicates that the notice will be temporarily dismissed when you
   click the _dismiss_ button. Once dismissed, the notice will not appear until 
   the next time the Admin page is refreshed.
 * **Permanent** indicates that the notice will be permanently dismissed when you
   click the _dismiss_ button. Once dismissed, the notice will not appear again.

Regardless of the dimissibility setting chosen by the extension developer, you can
permanently dismiss any notice by clicking the _Permanently Dismiss_ link at the
lower right of the notice or by checking the checkbox next to the notice title in
the **WP247 Extension Notification System**‘s _Settings_ section.

#### SETTINGS

The **WP247 Extension Notification Server** Settings page is where you tell the **
WP247 Extension Notification Server** about your extension and notices.

**Extension**

The _Extension_ section is where you identify your extension. This information will
also be used in your extension’s code (see the API help topic for more information)
when polled by the **WP247 Extension Notification Client** plugin to see which extensions
are participating in Extension Notifications. The _Extension_ settings are:

 * _Extension Name_: The name your extension is known as.
 * _Extension Id_: The slug used by your extension. This should match the directory
   name your extension get installed into.
 * _Extension Type_: The type of extention (Plugin or Theme).
 * _Server URL_: The URL that will respond to the **WP247 Extension Notification
   Client** plugin’s notice update inquiries.
 * _Frequency_: How often should the **WP247 Extension Notification Client** plugin’s
   inquire about new notice updates.

**Notice**

The _Notice_ section is where you compose the notification message that is to be
distributed to your extension’s users. The _Notice_ settings are:

 * _Status_ indicates whether or not the notice should currently be distributed 
   when the **WP247 Extension Notification Client** plugin inquires about any notice
   updates.
 * _Notice Title_: The title of your notice. This will appear on the first line 
   when the notice is displayed.
 * _Notice Type_: The type of notice. This will determine where the notice appears
   and what color the side border will be.
 * _Dismissability_: Whether or not the notice is dismissible and if so, temporarily
   or permanently. Regardless of this setting, the WP247 Extension Notification 
   Client plugin will allow the client site to permanently dismiss any notice.
 * _Duration_: Identifies how long should this notice be displayed to the client.
 * _Notice Content_: The message you desire to send.

=API=

In order to use the **WP247 Extension Notification System** you must first configure
your extension information. This will then be used in your extension to tell the**
WP247 Extension Notification System** that your extension is participting in extension
notifications.

You will then need to modify your extension so that it reaponds to the _wp247xns\
_client\_extension\_poll_ filter.

First, you must modify your extension to tell WordPress that you are responding 
to the _wp247xns\_client\_extension\_poll_ filter:

    ```
    add_filter( "wp247xns_client_extension_poll_{extension_type}_{extension_id}", "my_routine" );
    ```

Then you must create a function in your extension to respond to the filter:

    ```
    function my_routine( $extensions ) {
       return array(
                 "name"        => "Your Extension name",
                 "id"          => "your-extension-id",
                 "type"        => "plugin",
                 "version"     => "",          // your extension's version number (not required)
                 "server_url"  => "http://your-extension-wordpress-url/wp-admin/admin-ajax.php",
                 "frequency"   => "1 day",     // (not required) defaults to "1 day"
              );
    }
    ```

That’s it. The **WP247 Extension Notification System** will take care of the rest!

#### Co-requisite

One final note. In order for your users to receive your notices, they must have 
installed and activated the **WP247 Extension Notification Client** plugin. You 
may want to prompt your users to install and activate this plugin if it is not active
at the time your extension is loaded. For your convenience, we have provided a standardized
method for accomplishing this.

First, copy the _/wp-content/plugins/wp247-extension-notification-server/admin/wp247xns-
client-corequisite-notice_ folder to your extension’s Admin folder.

Next, modify your extension to instantiate the **WP247XNS_Client_Corequisite_Notice**
class. Something like:

    ```
    require_once 'wp247xns-client-corequisite-notice/wp247xns-client-corequisite-notice.php';
    $my_wp247xns_client_corequisite_notice
        = new WP247XNS_Client_Corequisite_Notice( 'Your extension name' );
    ```

The **WP247XNS_Client_Corequisite_Notice** class constructor takes from one to three
parameters:

    ```
    WP247XNS_Client_Corequisite_Notice(
        $extension_name,
        $nag_frequency = '30 days',
        $text_domain = 'wp247xns-client-corequisite-notice'
    );
    ```

This will result in a notice being displayed to your extension’s users when either
the **WP247 Extension Notification Client** plugin is not activated or your particular
extension is not enabled to participate in the **WP247 Extension Notification System**.
They will be able to dismiss the nottice, but it will be re-displayed after the 
nag frequency has passed.

#### Privacy Policy

Rest assured that the **WP247 Extension Notification System** does not capture any
information about your site and does not send any information about your site when
servers are polled for new notices.

In addition, the **WP247 Extension Notification System** does not capture any information
from the client’s site.

## 安装

In the WordPress backend:

 * Go to Plugins->Add New
 * Search for the plugin ‘**WP247 Extension Notification Server**‘
 * Click the “Install” button
 * Click on “Activate”

That’s it. You’re now ready to build and send extension notification messages.

## 常见问题

  Installation Instructions

In the WordPress backend:

 * Go to Plugins->Add New
 * Search for the plugin ‘**WP247 Extension Notification Server**‘
 * Click the “Install” button
 * Click on “Activate”

That’s it. You’re now ready to build and send extension notification messages.

## 评价

此插件暂无评价。

## 贡献者及开发者

「WP247 Extension Notification Server」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ wescleveland ](https://profiles.wordpress.org/wescleveland/)

[帮助将「WP247 Extension Notification Server」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp247-extension-notification-server)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.1

Fix Settings API bug

#### 1.0

Initial release

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**8 年前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  PHP 版本 ** 5.6.31 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp247-extension-notification-server/)
 * 标签
 * [extension](https://cn.wordpress.org/plugins/tags/extension/)[message](https://cn.wordpress.org/plugins/tags/message/)
   [notice](https://cn.wordpress.org/plugins/tags/notice/)[notification](https://cn.wordpress.org/plugins/tags/notification/)
   [theme](https://cn.wordpress.org/plugins/tags/theme/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp247-extension-notification-server/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/wp247-extension-notification-server/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp247-extension-notification-server/reviews/)

## 贡献者

 *   [ wescleveland ](https://profiles.wordpress.org/wescleveland/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/wp247-extension-notification-server/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RM26LBV2K6NAU)