Skip to main content

add_dismissible_message()

public static function add_dismissible_message( $text, $key, $type='warning', $capabilities=false, $sticky=false, $page=null )

Add a dismissible message to the array of dismissible messages.

Since: 2.0

Source: common.php:6080

Parameters

NameTypeDefaultDescription
$textstring
$keystring
$typestring'warning'
$capabilitiesstring | array | boolfalseA string containing a capability. Or an array or capabilities. Or FALSE for no capability check.
$stickyboolfalseWhether to keep displaying the message until it's dismissed.
$pagestring | nullnullThe page on which to display the sticky message. NULL will display on all pages available.