| @@ -17,23 +17,25 @@ | ||
| 17 | 17 | public function present() { |
| 18 | 18 | /** |
| 19 | 19 | * Filter: 'wpseo_debug_markers' - Allow disabling the debug markers. |
| 20 | 20 | * |
| 21 | - * @api bool $show_markers True when the debug markers should be shown. | |
| 21 | + * @param bool $show_markers True when the debug markers should be shown. | |
| 22 | 22 | */ |
| 23 | 23 | if ( ! \apply_filters( 'wpseo_debug_markers', true ) ) { |
| 24 | 24 | return ''; |
| 25 | 25 | } |
| 26 | - $version_info = 'v' . \WPSEO_VERSION; | |
| 26 | + $product_name = \esc_html( $this->helpers->product->get_name() ); | |
| 27 | + $is_premium = $this->helpers->product->is_premium(); | |
| 27 | 28 | |
| 28 | - if ( $this->helpers->product->is_premium() ) { | |
| 29 | - $version_info = $this->construct_version_info(); | |
| 30 | - } | |
| 29 | + $version = ( $is_premium ) ? $this->construct_version_info() : 'v' . \WPSEO_VERSION; | |
| 31 | 30 | |
| 31 | + $url = ( $is_premium ) ? 'https://yoast.com/product/yoast-seo-premium-wordpress/' : 'https://yoast.com/product/yoast-seo-wordpress/'; | |
| 32 | + | |
| 32 | 33 | return \sprintf( |
| 33 | - '<!-- This site is optimized with the %1$s %2$s - https://yoast.com/wordpress/plugins/seo/ -->', | |
| 34 | - \esc_html( $this->helpers->product->get_name() ), | |
| 35 | - $version_info | |
| 34 | + '<!-- This site is optimized with the %1$s %2$s - %3$s -->', | |
| 35 | + $product_name, | |
| 36 | + $version, | |
| 37 | + $url, | |
| 36 | 38 | ); |
| 37 | 39 | } |
| 38 | 40 | |
| 39 | 41 | /** |
| @@ -44,9 +46,9 @@ | ||
| 44 | 46 | private function construct_version_info() { |
| 45 | 47 | /** |
| 46 | 48 | * Filter: 'wpseo_hide_version' - can be used to hide the Yoast SEO version in the debug marker (only available in Yoast SEO Premium). |
| 47 | 49 | * |
| 48 | - * @api bool | |
| 50 | + * @param bool $hide_version | |
| 49 | 51 | */ |
| 50 | 52 | if ( \apply_filters( 'wpseo_hide_version', false ) ) { |
| 51 | 53 | return ''; |
| 52 | 54 | } |