Yoast\WP\SEO\Presenters\Admin
Notice_Presenter::present
Presents the Notice.
Метод класса: Notice_Presenter{}
Хуков нет.
Возвращает
Строку. The styled Notice.
Использование
$Notice_Presenter = new Notice_Presenter(); $Notice_Presenter->present();
Код Notice_Presenter::present() Notice Presenter::present Yoast 26.3
public function present() {
$dismissible = ( $this->is_dismissible ) ? ' is-dismissible' : '';
$id = ( $this->id ) ? ' id="' . $this->id . '"' : '';
// WordPress admin notice.
$out = '<div' . $id . ' class="notice notice-yoast yoast' . $dismissible . '">';
$out .= '<div class="notice-yoast__container">';
// Header.
$out .= '<div>';
$out .= '<div class="notice-yoast__header">';
$out .= '<span class="yoast-icon"></span>';
$out .= \sprintf(
'<h2 class="notice-yoast__header-heading yoast-notice-migrated-header">%s</h2>',
\esc_html( $this->title )
);
$out .= '</div>';
$out .= '<div class="notice-yoast-content">';
$out .= '<p>' . $this->content . '</p>';
if ( $this->button !== null ) {
$out .= '<p>' . $this->button . '</p>';
}
$out .= '</div>';
$out .= '</div>';
if ( $this->image_filename !== null ) {
$out .= '<img src="' . \esc_url( \plugin_dir_url( \WPSEO_FILE ) . 'images/' . $this->image_filename ) . '" alt="" height="60" width="75"/>';
}
$out .= '</div>';
$out .= '</div>';
return $out;
}