acf_add_admin_notice()
acf_add_admin_notice
Creates and returns a new notice.
No Hooks.
Returns
ACF_Admin_Notice.
Usage
acf_add_admin_notice( $text, $type, $dismissible, $persisted );
- $text(string)
- The admin notice text.
Default:'' - $type
- .
Default:'info' - $dismissible
- .
Default:true - $persisted(true|false)
- Store once a notice has been dismissed per user and prevent showing it again. (since 6.1.0).
Default:false
Changelog
| Since 5.0.0 | Introduced. |
acf_add_admin_notice() acf add admin notice code ACF 6.8.8
function acf_add_admin_notice( $text = '', $type = 'info', $dismissible = true, $persisted = false ) {
return acf_new_admin_notice(
array(
'text' => $text,
'type' => $type,
'dismissible' => $dismissible,
'persisted' => $persisted,
)
);
}