WP_Notify.php
public function add_notification( $id, $content, $type = null, $hide_button = null, $cond_func = null ) {
        if ( isset( $this->notices[$id] ) ) {
            return false;
        }

        if ( !$type ) {
            $type = 'success';
        }

        if ( !$hide_button ) {
            $hide_button = true;
        }

        if ( !$cond_func ) {
            $cond_func = false;
        }

        $this->notices[$id] = array(
            'id' => $id,
            'content' => $content,
            'type' => $type,
            'hide_button' => $hide_button,
            'cond_func' => $cond_func,
        );

        $this->save();
    }
public function add_notification( $id, $content, $type = null, $hide_button = null, $cond_func = null ) {
        if ( isset( $this->notices[$id] ) ) {
            return false;
        }

        if ( !$type ) {
            $type = 'success';
        }

        if ( !$hide_button ) {
            $hide_button = true;
        }

        if ( !$cond_func ) {
            $cond_func = false;
        }

        $this->notices[$id] = array(
            'id' => $id,
            'content' => $content,
            'type' => $type,
            'hide_button' => $hide_button,
            'cond_func' => $cond_func,
        );

        $this->save();
    }
public function add_notification ( $ id , $ content , $ type = null , $ hide_button = null , $ cond_func = null ) { if ( isset ( $ this -> notices [ $ id ] ) ) { return false ; } if ( ! $ type ) { $ type = 'success' ; } if ( ! $ hide_button ) { $ hide_button = true ; } if ( ! $ cond_func ) { $ cond_func = false ; } $ this -> notices [ $ id ] = array ( 'id' => $ id , 'content' => $ content , 'type' => $ type , 'hide_button' => $ hide_button , 'cond_func' => $ cond_func , ) ; $ this -> save ( ) ; }
Add a notification to the notices namespace.

@param string $id
@param string $content
@param string $type
@param bool $hide_button

@return void|bool
Add a notification to the notices namespace .