PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
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 / woocommerce-beta-editor-presenter.php

woocommerce-beta-editor-presenter.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI trunk, at src/presenters/admin/woocommerce-beta-editor-presenter.php

61 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\Helpers\Short_Link_Helper;
6 use Yoast\WP\SEO\Presenters\Abstract_Presenter;
7
8 /**
9 * Class Woocommerce_Beta_Editor_Presenter.
10 */
11 class Woocommerce_Beta_Editor_Presenter extends Abstract_Presenter {
12
13 /**
14 * The short link helper.
15 *
16 * @var Short_Link_Helper
17 */
18 protected $short_link_helper;
19
20 /**
21 * Woocommerce_Beta_Editor_Presenter constructor.
22 *
23 * @param Short_Link_Helper $short_link_helper The short link helper.
24 */
25 public function __construct( Short_Link_Helper $short_link_helper ) {
26 $this->short_link_helper = $short_link_helper;
27 }
28
29 /**
30 * Returns the notification as an HTML string.
31 *
32 * @return string The notification in an HTML string representation.
33 */
34 public function present() {
35 $notification_text = '<p>';
36 $notification_text .= $this->get_message();
37 $notification_text .= '</p>';
38
39 return $notification_text;
40 }
41
42 /**
43 * Returns the message to show.
44 *
45 * @return string The message.
46 */
47 protected function get_message() {
48 return \sprintf(
49 '<strong>%1$s</strong> %2$s',
50 \esc_html__( 'Compatibility issue: Yoast SEO is incompatible with the beta WooCommerce product editor.', 'wordpress-seo' ),
51 \sprintf(
52 /* translators: 1: Yoast SEO, 2: Link start tag to the Learn more link, 3: Link closing tag. */
53 \esc_html__( 'The %1$s interface is currently unavailable in the beta WooCommerce product editor. To resolve any issues, please disable the beta editor. %2$sLearn how to disable the beta WooCommerce product editor.%3$s', 'wordpress-seo' ),
54 'Yoast SEO',
55 '<a href="' . \esc_url( $this->short_link_helper->get( 'https://yoa.st/learn-how-disable-beta-woocommerce-product-editor' ) ) . '" target="_blank">',
56 '</a>',
57 ),
58 );
59 }
60 }
61