Title: Notices API
Author: danielbitzer
Published: <strong>2014年8月9日</strong>
Last modified: 2014年8月9日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

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

# Notices API

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

[ダウンロード](https://downloads.wordpress.org/plugin/notices-api.zip)

 * [詳細](https://ja.wordpress.org/plugins/notices-api/#description)
 * [レビュー](https://ja.wordpress.org/plugins/notices-api/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/notices-api/#installation)
 * [開発](https://ja.wordpress.org/plugins/notices-api/#developers)

 [サポート](https://wordpress.org/support/plugin/notices-api/)

## 説明

This is a very simple WordPress plugin for creating frontend notices server side
or client side. There are 4 notice types by default _success, error, warning, general_
or you can create custom notice types. Server side notices are stored in the session
until displayed.

This plugin hopes to one day solve the problem of complex WordPress sites with multiple
plugins all having their own Notices that all require styling.

But for now, the Notices API is useful tool for developers creating custom functionality
in their theme.

**Server Side Usage**

    ```
    <?php
        WP_Notices::success( $title, $message, $timer, $priority ); 
        WP_Notices::warning( 'Login Failed', 'You have entered an incorrect Username or password, please try again.'); 
        WP_Notices::error(  $title, $message, $timer, $priority ); 
        WP_Notices::general(  $title, $message, $timer, $priority ); 
        WP_Notices::custom( $type, $title, $message, $timer, $priority );
    ?>
    ```

**Client Side Usage**

    ```
    jQuery(document).ready(function($){

        $.WP_Notices.success( title,message, scroll_to, timer, callback );
        $.WP_Notices.error( title, message, scroll_to, timer, callback );
        $.WP_Notices.general( title, message, scroll_to, timer, callback );
        $.WP_Notices.warning( title, message, scroll_to, timer, callback );

        // Custom type
        $.WP_Notices.render_notice( type, title, message, scroll_to, timer, callback );

        // Using the callback parameter
        $.WP_Notices.warning( 'Form Error', 'Invalid form input.', false, 3000, function( $notice ) {
            console.log( $notice );
        });

    });
    ```

**Options**

    ```
    add_filter( 'notice_api_options', 'customize_notice_options' );

    function customize_notice_options( $options )
    {
        $options = array(
            'prepend_selector' => '#content',
            'container_class' => 'notices-container',
            'before_title' => '<strong>',
            'after_title' => ':</strong> ',
            'scrolling_speed' => 500,
        );
        return $options;
    }
    ```

## インストール

This section describes how to install the plugin and get it working.

e.g.

 1. Upload the plugin directory to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Create some notices in your code!

## 評価

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

### 󠀁[Easy to install](https://wordpress.org/support/topic/easy-to-install-15/)󠁿

 [jokari4242](https://profiles.wordpress.org/jokari4242/) 2016年9月3日

Easy to install and setup!

 [ 1件のレビューをすべて表示 ](https://wordpress.org/support/plugin/notices-api/reviews/)

## 貢献者と開発者

Notices API はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献し
ています。

貢献者

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

[“Notices API” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/notices-api)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/notices-api/)するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/notices-api/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/notices-api/)
を [RSS](https://plugins.trac.wordpress.org/log/notices-api/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 1.0

 * First version pushed to WordPress plugin repository.

## メタ

 *  バージョン **1.0**
 *  最終更新日 **12年前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 3.0またはそれ以降 **
 *  検証済み最新バージョン: **3.9.40**
 *  言語
 * [English (US)](https://wordpress.org/plugins/notices-api/)
 * タグ
 * [alerts](https://ja.wordpress.org/plugins/tags/alerts/)[notices](https://ja.wordpress.org/plugins/tags/notices/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/notices-api/advanced/)

## 評価

 5つ星中5つ星

 *  [  1 5-星レビュー     ](https://wordpress.org/support/plugin/notices-api/reviews/?filter=5)
 *  [  0 4-星レビュー     ](https://wordpress.org/support/plugin/notices-api/reviews/?filter=4)
 *  [  0 3-星レビュー     ](https://wordpress.org/support/plugin/notices-api/reviews/?filter=3)
 *  [  0 2-星レビュー     ](https://wordpress.org/support/plugin/notices-api/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/notices-api/reviews/?filter=1)

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

[すべてのレビューを見る](https://wordpress.org/support/plugin/notices-api/reviews/)

## 貢献者

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

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/notices-api/)