| @@ -9,19 +9,19 @@ | ||
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Passed health check. |
| 12 | 12 | */ |
| 13 | - const STATUS_GOOD = 'good'; | |
| 13 | + public const STATUS_GOOD = 'good'; | |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Changes are recommended but not necessary. |
| 17 | 17 | */ |
| 18 | - const STATUS_RECOMMENDED = 'recommended'; | |
| 18 | + public const STATUS_RECOMMENDED = 'recommended'; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Significant issues that the user should consider fixing. |
| 22 | 22 | */ |
| 23 | - const STATUS_CRITICAL = 'critical'; | |
| 23 | + public const STATUS_CRITICAL = 'critical'; | |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * The user-facing label. |
| 27 | 27 | * |
| @@ -133,9 +133,9 @@ | ||
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | 135 | * Builds an array of strings in the format that WordPress uses to display health checks (https://developer.wordpress.org/reference/hooks/site_status_test_result/). |
| 136 | 136 | * |
| 137 | - * @return string[] The report in WordPress' site status report format. | |
| 137 | + * @return array The report in WordPress' site status report format. | |
| 138 | 138 | */ |
| 139 | 139 | public function build() { |
| 140 | 140 | return [ |
| 141 | 141 | 'label' => $this->label, |
| @@ -164,9 +164,9 @@ | ||
| 164 | 164 | * |
| 165 | 165 | * @return string The badge label. |
| 166 | 166 | */ |
| 167 | 167 | private function get_badge_label() { |
| 168 | - return __( 'SEO', 'wordpress-seo' ); | |
| 168 | + return \__( 'SEO', 'wordpress-seo' ); | |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | 172 | * Generates the color for the badge using the current status. |
| @@ -195,13 +195,13 @@ | ||
| 195 | 195 | * |
| 196 | 196 | * @return string Yoast's signature as an HTML string. |
| 197 | 197 | */ |
| 198 | 198 | private function get_signature() { |
| 199 | - return sprintf( | |
| 199 | + return \sprintf( | |
| 200 | 200 | /* translators: 1: Start of a paragraph beginning with the Yoast icon, 2: Expands to 'Yoast SEO', 3: Paragraph closing tag. */ |
| 201 | - esc_html__( '%1$sThis was reported by the %2$s plugin%3$s', 'wordpress-seo' ), | |
| 202 | - '<p class="yoast-site-health__signature"><img src="' . esc_url( plugin_dir_url( WPSEO_FILE ) . 'packages/js/images/Yoast_SEO_Icon.svg' ) . '" alt="" height="20" width="20" class="yoast-site-health__signature-icon">', | |
| 201 | + \esc_html__( '%1$sThis was reported by the %2$s plugin%3$s', 'wordpress-seo' ), | |
| 202 | + '<p class="yoast-site-health__signature"><img src="' . \esc_url( \plugin_dir_url( \WPSEO_FILE ) . 'packages/js/images/Yoast_SEO_Icon.svg' ) . '" alt="" height="20" width="20" class="yoast-site-health__signature-icon">', | |
| 203 | 203 | 'Yoast SEO', |
| 204 | - '</p>' | |
| 204 | + '</p>', | |
| 205 | 205 | ); |
| 206 | 206 | } |
| 207 | 207 | } |