ACF_Admin_Notice::render() public ACF 5.8.0
Renders the notice HTML.
{} Это метод класса: ACF_Admin_Notice{}
Хуков нет.
Возвращает
null.
Использование
$ACF_Admin_Notice = new ACF_Admin_Notice(); $ACF_Admin_Notice->render();
- (void) (обязательный)
Список изменений
С версии 5.8.0 | Введена. |
Код ACF_Admin_Notice::render() ACF Admin Notice::render ACF 5.9.1
function render() {
// Ensure text contains punctuation.
// todo: Remove this after updating translations.
$text = $this->get('text');
if( substr($text, -1) !== '.' && substr($text, -1) !== '>' ) {
$text .= '.';
}
// Print HTML.
printf('<div class="acf-admin-notice notice notice-%s %s">%s</div>',
// Type class.
$this->get('type'),
// Dismissible class.
$this->get('dismissible') ? 'is-dismissible' : '',
// InnerHTML
$this->has('html') ? $this->get('html') : wpautop($text)
);
}