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' ); } /** * Presents the Notice. * * @return string The styled Notice. */ public function present() { $dismissible = ( $this->is_dismissible ) ? ' is-dismissible' : ''; $id = ( $this->id ) ? ' id="' . $this->id . '"' : ''; // WordPress admin notice. $out = ''; $out .= '
'; // Header. $out .= '
'; $out .= '
'; $out .= ''; $out .= \sprintf( '

%s

', \esc_html( $this->title ) ); $out .= '
'; $out .= '
'; $out .= '

' . $this->content . '

'; if ( $this->button !== null ) { $out .= '

' . $this->button . '

'; } $out .= '
'; $out .= '
'; if ( $this->image_filename !== null ) { $out .= ''; } $out .= '
'; $out .= ''; return $out; } }