acf_add_admin_notice()
acf_add_admin_notice
Creates and returns a new notice.
Хуков нет.
Возвращает
ACF_Admin_Notice.
Использование
acf_add_admin_notice( $text, $type, $dismissible, $persisted );
- $text(строка)
- The admin notice text.
По умолчанию:'' - $type
- .
По умолчанию:'info' - $dismissible
- .
По умолчанию:true - $persisted(true|false)
- Store once a notice has been dismissed per user and prevent showing it again. (since 6.1.0).
По умолчанию:false
Список изменений
| С версии 5.0.0 | Введена. |
Код acf_add_admin_notice() acf add admin notice ACF 6.4.2
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,
)
);
}