PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/presenters/admin/notice-presenter.php +15 -11 18.4.1 → trunk View file →
@@ -61,14 +61,16 @@
61 61
62 62 /**
63 63 * Notice_Presenter constructor.
64 64 *
65 - * @param string $title Title of the admin notice.
66 - * @param string $content Content of the admin notice.
67 - * @param string $image_filename Optional. The filename of the image of the admin notice, should be inside the 'images' folder.
68 - * @param string $button Optional. An HTML string to be displayed after the main content, usually a button.
69 - * @param bool $is_dismissible Optional. Whether the admin notice should be dismissible.
70 - * @param string $id Optional. The id of the notice.
65 + * @param string $title Title of the admin notice.
66 + * @param string $content Content of the admin notice.
67 + * @param string|null $image_filename Optional. The filename of the image of the admin notice,
68 + * should be inside the 'images' folder.
69 + * @param string|null $button Optional. An HTML string to be displayed after the main content,
70 + * usually a button.
71 + * @param bool $is_dismissible Optional. Whether the admin notice should be dismissible.
72 + * @param string $id Optional. The id of the notice.
71 73 */
72 74 public function __construct( $title, $content, $image_filename = null, $button = null, $is_dismissible = false, $id = '' ) {
73 75 $this->title = $title;
74 76 $this->content = $content;
@@ -101,20 +103,22 @@
101 103 $out .= '<div>';
102 104 $out .= '<div class="notice-yoast__header">';
103 105 $out .= '<span class="yoast-icon"></span>';
104 106 $out .= \sprintf(
105 - '<h1 class="notice-yoast__header-heading">%s</h1>',
106 - \esc_html( $this->title )
107 + '<h2 class="notice-yoast__header-heading yoast-notice-migrated-header">%s</h2>',
108 + \esc_html( $this->title ),
107 109 );
108 110 $out .= '</div>';
111 + $out .= '<div class="notice-yoast-content">';
109 112 $out .= '<p>' . $this->content . '</p>';
110 - if ( ! \is_null( $this->button ) ) {
113 + if ( $this->button !== null ) {
111 114 $out .= '<p>' . $this->button . '</p>';
112 115 }
113 116 $out .= '</div>';
117 + $out .= '</div>';
114 118
115 - if ( ! \is_null( $this->image_filename ) ) {
116 - $out .= '<img src="' . \esc_url( plugin_dir_url( WPSEO_FILE ) . 'images/' . $this->image_filename ) . '" alt="" height="60" width="75"/>';
119 + if ( $this->image_filename !== null ) {
120 + $out .= '<img src="' . \esc_url( \plugin_dir_url( \WPSEO_FILE ) . 'images/' . $this->image_filename ) . '" alt="" height="60" width="75"/>';
117 121 }
118 122
119 123 $out .= '</div>';
120 124 $out .= '</div>';