PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.2
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.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 / auto-update-notification-presenter.php

auto-update-notification-presenter.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.2, at src/presenters/admin/auto-update-notification-presenter.php

54 lines 1.7 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 Auto_Update_Notification_Presenter.
9 */
10 class Auto_Update_Notification_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 if ( \is_multisite() ) {
32 return \sprintf(
33 /* Translators: %1$s expands to 'Yoast SEO', %2$s to an opening anchor tag for a link leading to the Plugins page, and %3$s to a closing anchor tag. */
34 \esc_html__(
35 'We see that you enabled automatic updates for WordPress. We recommend that you do this for %1$s as well. This way we can guarantee that WordPress and %1$s will continue to run smoothly together. Please contact your network admin to enable auto-updates for %1$s.',
36 'wordpress-seo'
37 ),
38 'Yoast SEO'
39 );
40 }
41
42 return \sprintf(
43 /* Translators: %1$s expands to 'Yoast SEO', %2$s to an opening anchor tag for a link leading to the Plugins page, and %3$s to a closing anchor tag. */
44 \esc_html__(
45 'We see that you enabled automatic updates for WordPress. We recommend that you do this for %1$s as well. This way we can guarantee that WordPress and %1$s will continue to run smoothly together. %2$sGo to your plugins overview to enable auto-updates for %1$s.%3$s',
46 'wordpress-seo'
47 ),
48 'Yoast SEO',
49 '<a href="' . \esc_url( \get_admin_url( null, 'plugins.php' ) ) . '">',
50 '</a>'
51 );
52 }
53 }
54