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