public function enqueue($markup, array $args = [])
    {
        $notice = $args; // As notice.

        // Use `$markup` if not in `$args`.
        if ($markup && empty($notice['markup'])) {
            $notice['markup'] = $markup;
        }
        $notice = $this->normalize($notice);

        if (!$notice['markup']) {
            return; // Nothing to do.
        }
        $key     = $this->key($notice);
        $notices = $this->get();

        if ($notice['push_to_top']) {
            $this->c::arrayUnshiftAssoc($notices, $key, $notice);
        } else {
            $notices[$key] = $notice; // Default behavior.
        }
        $this->update($notices);
    }
public function enqueue($markup, array $args = [])
    {
        $notice = $args; // As notice.

        // Use `$markup` if not in `$args`.
        if ($markup && empty($notice['markup'])) {
            $notice['markup'] = $markup;
        }
        $notice = $this->normalize($notice);

        if (!$notice['markup']) {
            return; // Nothing to do.
        }
        $key     = $this->key($notice);
        $notices = $this->get();

        if ($notice['push_to_top']) {
            $this->c::arrayUnshiftAssoc($notices, $key, $notice);
        } else {
            $notices[$key] = $notice; // Default behavior.
        }
        $this->update($notices);
    }
public function enqueue ( $ markup , array $ args = [ ] ) { $ notice = $ args ; // As notice. // Use `$markup` if not in `$args`. if ( $ markup && empty ( $ notice [ 'markup' ] ) ) { $ notice [ 'markup' ] = $ markup ; } $ notice = $ this -> normalize ( $ notice ) ; if ( ! $ notice [ 'markup' ] ) { return ; // Nothing to do. } $ key = $ this -> key ( $ notice ) ; $ notices = $ this -> get ( ) ; if ( $ notice [ 'push_to_top' ] ) { $ this -> c :: arrayUnshiftAssoc ( $ notices , $ key , $ notice ) ; } else { $ notices [ $ key ] = $ notice ; // Default behavior. } $ this -> update ( $ notices ) ; }
Enqueue an administrative notice.

@since 160524 First documented version.

@param string|\Closure $markup HTML (or closure) containing the notice.
@param array           $args   Additional args; i.e., presentation/style.
Enqueue an administrative notice .