| 1 |
<?php |
| 2 |
|
| 3 |
namespace Yoast\WP\SEO\Presenters\Admin; |
| 4 |
|
| 5 |
use Yoast\WP\SEO\Helpers\Short_Link_Helper; |
| 6 |
use Yoast\WP\SEO\Presenters\Abstract_Presenter; |
| 7 |
|
| 8 |
/** |
| 9 |
* Class Indexing_List_Item_Presenter. |
| 10 |
* |
| 11 |
* @package Yoast\WP\SEO\Presenters\Admin |
| 12 |
*/ |
| 13 |
class Indexing_List_Item_Presenter extends Abstract_Presenter { |
| 14 |
|
| 15 |
/** |
| 16 |
* The short link helper. |
| 17 |
* |
| 18 |
* @var Short_Link_Helper |
| 19 |
*/ |
| 20 |
protected $short_link_helper; |
| 21 |
|
| 22 |
/** |
| 23 |
* Indexing_List_Item_Presenter constructor. |
| 24 |
* |
| 25 |
* @param Short_Link_Helper $short_link_helper Represents the short link helper. |
| 26 |
*/ |
| 27 |
public function __construct( Short_Link_Helper $short_link_helper ) { |
| 28 |
$this->short_link_helper = $short_link_helper; |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* Presents the list item for the tools menu. |
| 33 |
* |
| 34 |
* @return string The list item HTML. |
| 35 |
*/ |
| 36 |
public function present() { |
| 37 |
$output = \sprintf( '<li><strong>%s</strong><br/>', \esc_html__( 'Optimize SEO Data', 'wordpress-seo' ) ); |
| 38 |
$output .= \sprintf( |
| 39 |
'%1$s <a href="%2$s" target="_blank">%3$s</a>', |
| 40 |
\esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. If you have a lot of content it might take a while, but trust us, it\'s worth it.', 'wordpress-seo' ), |
| 41 |
\esc_url( $this->short_link_helper->get( 'https://yoa.st/3-z' ) ), |
| 42 |
\esc_html__( 'Learn more about the benefits of optimized SEO data.', 'wordpress-seo' ), |
| 43 |
); |
| 44 |
|
| 45 |
$output .= '<div id="yoast-seo-indexing-action" style="margin: 16px 0;"></div>'; |
| 46 |
$output .= '</li>'; |
| 47 |
|
| 48 |
return $output; |
| 49 |
} |
| 50 |
} |
| 51 |
|