Notice_Presenter::__construct()publicYoast 1.0

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.
The filename of the image of the admin notice, should be inside the 'images' folder.
По умолчанию: null
An HTML string to be displayed after the main content, usually a button.
По умолчанию: null
Whether the admin notice should be dismissible.
По умолчанию: false
The id of the notice.
По умолчанию: ''

Код Notice_Presenter::__construct() Yoast 22.7

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' );