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
← All changes | src/services/health-check/page-comments-reports.php +12 -9 18.5 → trunk View file →
@@ -5,14 +5,17 @@
5 5 /**
6 6 * Presents a set of different messages for the Page_Comments health check.
7 7 */
8 8 class Page_Comments_Reports {
9 +
9 10 use Reports_Trait;
10 11
11 12 /**
12 13 * Constructor.
13 14 *
14 - * @param Report_Builder_Factory $report_builder_factory The factory for result builder objects. This class uses the report builder to generate WordPress-friendly health check results.
15 + * @param Report_Builder_Factory $report_builder_factory The factory for result builder objects.
16 + * This class uses the report builder to generate WordPress-friendly
17 + * health check results.
15 18 */
16 19 public function __construct( Report_Builder_Factory $report_builder_factory ) {
17 20 $this->report_builder_factory = $report_builder_factory;
18 21 }
@@ -23,11 +26,11 @@
23 26 * @return string[] The message as a WordPress site status report.
24 27 */
25 28 public function get_success_result() {
26 29 return $this->get_report_builder()
27 - ->set_label( esc_html__( 'Comments are displayed on a single page', 'wordpress-seo' ) )
30 + ->set_label( \esc_html__( 'Comments are displayed on a single page', 'wordpress-seo' ) )
28 31 ->set_status_good()
29 - ->set_description( __( 'Comments on your posts are displayed on a single page. This is just like we\'d suggest it. You\'re doing well!', 'wordpress-seo' ) )
32 + ->set_description( \__( 'Comments on your posts are displayed on a single page. This is just like we\'d suggest it. You\'re doing well!', 'wordpress-seo' ) )
30 33 ->build();
31 34 }
32 35
33 36 /**
@@ -36,11 +39,11 @@
36 39 * @return string[] The message as a WordPress site status report.
37 40 */
38 41 public function get_has_comments_on_multiple_pages_result() {
39 42 return $this->get_report_builder()
40 - ->set_label( __( 'Comments break into multiple pages', 'wordpress-seo' ) )
43 + ->set_label( \__( 'Comments break into multiple pages', 'wordpress-seo' ) )
41 44 ->set_status_recommended()
42 - ->set_description( __( 'Comments on your posts break into multiple pages. As this is not needed in 999 out of 1000 cases, we recommend you disable it. To fix this, uncheck "Break comments into pages..." on the Discussion Settings page.', 'wordpress-seo' ) )
45 + ->set_description( \__( 'Comments on your posts break into multiple pages. As this is not needed in 999 out of 1000 cases, we recommend you disable it. To fix this, uncheck "Break comments into pages..." on the Discussion Settings page.', 'wordpress-seo' ) )
43 46 ->set_actions( $this->get_has_comments_on_multiple_pages_actions() )
44 47 ->build();
45 48 }
46 49
@@ -49,12 +52,12 @@
49 52 *
50 53 * @return string The actions as a string.
51 54 */
52 55 private function get_has_comments_on_multiple_pages_actions() {
53 - return sprintf(
56 + return \sprintf(
54 57 /* translators: 1: Opening tag of the link to the discussion settings page, 2: Link closing tag. */
55 - esc_html__( '%1$sGo to the Discussion Settings page%2$s', 'wordpress-seo' ),
56 - '<a href="' . esc_url( admin_url( 'options-discussion.php' ) ) . '">',
57 - '</a>'
58 + \esc_html__( '%1$sGo to the Discussion Settings page%2$s', 'wordpress-seo' ),
59 + '<a href="' . \esc_url( \admin_url( 'options-discussion.php' ) ) . '">',
60 + '</a>',
58 61 );
59 62 }
60 63 }