Yoast\WP\SEO\Presenters\Admin
Notice_Presenter::__construct()
Notice_Presenter constructor.
Метод класса: Notice_Presenter{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Notice_Presenter = new Notice_Presenter(); $Notice_Presenter->__construct( $title, $content, $image_filename, $button, $is_dismissible, $id );
- $title(строка) (обязательный)
- Title of the admin notice.
- $content(строка) (обязательный)
- Content of the admin notice.
- $image_filename(строка|null)
- The filename of the image of the admin notice, should be inside the 'images' folder.
По умолчанию: null - $button(строка|null)
- An HTML string to be displayed after the main content, usually a button.
По умолчанию: null - $is_dismissible(true|false)
- Whether the admin notice should be dismissible.
По умолчанию: false - $id(строка)
- The id of the notice.
По умолчанию: ''
Код Notice_Presenter::__construct() Notice Presenter:: construct Yoast 22.4
public function __construct( $title, $content, $image_filename = null, $button = null, $is_dismissible = false, $id = '' ) { $this->title = $title; $this->content = $content; $this->image_filename = $image_filename; $this->button = $button; $this->is_dismissible = $is_dismissible; $this->id = $id; if ( ! $this->asset_manager ) { $this->asset_manager = new WPSEO_Admin_Asset_Manager(); } $this->asset_manager->enqueue_style( 'notifications' ); }