Title: Sewn In Notifications
Author: Jupitercow
Published: <strong>Juny 13, 2015</strong>
Last modified: Juny 13, 2015

---

Search plugins

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

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/sewn-in-notifications/assets/icon-256x256.jpg?rev=1180035)

# Sewn In Notifications

 By [Jupitercow](https://profiles.wordpress.org/jcow/)

[Download](https://downloads.wordpress.org/plugin/sewn-in-notifications.1.1.1.zip)

 * [Details](https://bal.wordpress.org/plugins/sewn-in-notifications/#description)
 * [Reviews](https://bal.wordpress.org/plugins/sewn-in-notifications/#reviews)
 *  [Installation](https://bal.wordpress.org/plugins/sewn-in-notifications/#installation)
 * [Development](https://bal.wordpress.org/plugins/sewn-in-notifications/#developers)

 [Support](https://wordpress.org/support/plugin/sewn-in-notifications/)

## Description

A plugin for WordPress that creates a very pluggable framework to add notifications
on the front end of your application. Notifications can be generated by query variables
or through template functions and actions.

This plugin can be used to create site wide notifications, or you can narrow it 
down to specific pages.

#### Add the Notification Center to Your Template(s)

The most basic way to add notifications is sitewide. You can add the “show” action
to a template like your header.php file. This is the most powerful use for the plugin:
uniform, centralized notifications.

    ```
    <?php do_action( 'sewn/notifications/show' ); ?>
    ```

#### Create Query Variable Notifications

The simplest way to extend the notification center is to add query variable key/
value pairs to generate a new message when url query variables are submitted.

    ```
    <?php
    add_filter( 'sewn/notifications/queries', 'custom_add_query_notifications' );
    function custom_add_query_notifications( $queries )
    {
        $queries[] = array(
            'key' => 'update',
            'value' => 'true',
            'message' => "Updated.",
            'args' => 'fade=true'
        );
        $queries[] = array(
            'key' => 'update',
            'value' => 'failed',
            'message' => "Unable to update.",
            'args' => 'dismiss=true&error=true'
        );
        $queries[] = array(
            'key' => 'update',
            'value' => 'finished',
            'message' => "Finished!",
            'args' => 'fade=10000' // wait ten seconds before fading
        );
        return $queries;
    }
    ?>
    ```

Now whenever a query variable is added to the end of a page, a message can be shown
in the notification center.

So `http://example.com/path/to/page/?update=true` will generate the message: “Updated.”
in the notification center.

#### Arguments for Messages

When adding a message, there are arguments you can use to customize the functionality.

 1. `error` When set to true, this will add the error class to the message. Default:
    false
 2. `fade` When set to true, this will fade the message out after 3 seconds. You can
    change the pause time by setting fade to a number (in milliseconds). Default: false
 3. `dismiss` Allows a message to be dismissed by the user with a close button. Default:
    false
 4. `event` Allows message to be persistent, so that it shows up on each page load 
    unless dismissed. The event tracks the message and updates the user’s meta when
    the message is dismissed, so it will stop showing up. Default: false
 5. `page` Lock a message to a specific page only. When page is set, a `is_page($page)`
    check will be performed before showing the message. Particularly useful when setting
    up query variable pairs. Default: false

#### Maually Generate Notifications

Add notifications manually anywhere before the `show` action.

    ```
    if ( $something_happened ) :
        do_action( 'sewn/notifications/add', $message, $args );
    endif;
    ```

## Screenshots

[⌊A basic example of a notification out of the box.⌉⌊A basic example of a notification
out of the box.⌉[

A basic example of a notification out of the box.

## Installation

 * Install plugin either via the WordPress.org plugin directory, or by uploading
   the files to your server.
 * Activate the plugin via the Plugins admin page.

## FAQ

  None yet.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Sewn In Notifications” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Jupitercow ](https://profiles.wordpress.org/jcow/)
 *   [ Jake Snyder ](https://profiles.wordpress.org/ekaj/)

[Translate “Sewn In Notifications” into your language.](https://translate.wordpress.org/projects/wp-plugins/sewn-in-notifications)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/sewn-in-notifications/),
check out the [SVN repository](https://plugins.svn.wordpress.org/sewn-in-notifications/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/sewn-in-notifications/)
by [RSS](https://plugins.trac.wordpress.org/log/sewn-in-notifications/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.1 – 2015-06-08

 * Launched in the repo

## Meta

 *  Version **1.1.1**
 *  Last updated **11 anys ago**
 *  Active installations **10+**
 *  WordPress version ** 3.6.1 or higher **
 *  Tested up to **4.2.39**
 *  Language
 * [English (US)](https://wordpress.org/plugins/sewn-in-notifications/)
 * Tags
 * [applications](https://bal.wordpress.org/plugins/tags/applications/)[front end](https://bal.wordpress.org/plugins/tags/front-end/)
   [Frontend](https://bal.wordpress.org/plugins/tags/frontend/)[messages](https://bal.wordpress.org/plugins/tags/messages/)
   [Notifications](https://bal.wordpress.org/plugins/tags/notifications/)
 *  [Advanced View](https://bal.wordpress.org/plugins/sewn-in-notifications/advanced/)

## Ratings

No reviews have been submitted yet.

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

[See all reviews](https://wordpress.org/support/plugin/sewn-in-notifications/reviews/)

## Contributors

 *   [ Jupitercow ](https://profiles.wordpress.org/jcow/)
 *   [ Jake Snyder ](https://profiles.wordpress.org/ekaj/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/sewn-in-notifications/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jacobsnyder%40gmail%2ecom&lc=US&item_name=Jacob%20Snyder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)