PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.2
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.2
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
wordpress-seo / src / presenters / admin / search-engines-discouraged-presenter.php

search-engines-discouraged-presenter.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.2, at src/presenters/admin/search-engines-discouraged-presenter.php

45 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Presenters\Admin;
4
5 use Yoast\WP\SEO\Presenters\Abstract_Presenter;
6
7 /**
8 * Class Search_Engines_Discouraged_Presenter.
9 */
10 class Search_Engines_Discouraged_Presenter extends Abstract_Presenter {
11
12 /**
13 * Returns the notification as an HTML string.
14 *
15 * @return string The notification in an HTML string representation.
16 */
17 public function present() {
18 $notification_text = '<p>';
19 $notification_text .= $this->get_message();
20 $notification_text .= '</p>';
21
22 return $notification_text;
23 }
24
25 /**
26 * Returns the message to show.
27 *
28 * @return string The message.
29 */
30 protected function get_message() {
31 return \sprintf(
32 '<strong>%1$s</strong> %2$s <button type="button" id="robotsmessage-dismiss-button" class="button-link hide-if-no-js" data-nonce="%3$s">%4$s</button>',
33 \esc_html__( 'Huge SEO Issue: You\'re blocking access to robots.', 'wordpress-seo' ),
34 \sprintf(
35 /* translators: 1: Link start tag to the WordPress Reading Settings page, 2: Link closing tag. */
36 \esc_html__( 'If you want search engines to show this site in their results, you must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility.', 'wordpress-seo' ),
37 '<a href="' . \esc_url( \admin_url( 'options-reading.php' ) ) . '">',
38 '</a>',
39 ),
40 \esc_js( \wp_create_nonce( 'wpseo-ignore' ) ),
41 \esc_html__( 'I don\'t want this site to show in the search results.', 'wordpress-seo' ),
42 );
43 }
44 }
45