• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / de02bf963cc5dccc7d0626d716b174c004504910

08 Dec 2025 03:32PM UTC coverage: 52.541% (-0.5%) from 53.045%
de02bf963cc5dccc7d0626d716b174c004504910

Pull #22807

github

web-flow
Merge 1efce9b50 into 395376412
Pull Request #22807: Update debug marker presentation to include correct product URLs

8327 of 15638 branches covered (53.25%)

Branch coverage included in aggregate %.

8 of 8 new or added lines in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

31845 of 60821 relevant lines covered (52.36%)

47408.08 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.65
/src/presenters/debug/marker-open-presenter.php
1
<?php
2

3
namespace Yoast\WP\SEO\Presenters\Debug;
4

5
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Presenter;
6

7
/**
8
 * Presenter class for the debug open marker.
9
 */
10
final class Marker_Open_Presenter extends Abstract_Indexable_Presenter {
11

12
        /**
13
         * Returns the debug close marker.
14
         *
15
         * @return string The debug close marker.
16
         */
17
        public function present() {
6✔
18
                /**
19
                 * Filter: 'wpseo_debug_markers' - Allow disabling the debug markers.
20
                 *
21
                 * @param bool $show_markers True when the debug markers should be shown.
22
                 */
23
                if ( ! \apply_filters( 'wpseo_debug_markers', true ) ) {
6✔
24
                        return '';
2✔
25
                }
26
                $product_name = \esc_html( $this->helpers->product->get_name() );
4✔
27
                $is_premium   = $this->helpers->product->is_premium();
4✔
28

29
                $version = $is_premium
4✔
30
                        ? $this->construct_version_info()
2✔
31
                        : 'v' . \WPSEO_VERSION;
3✔
32

33
                $url = $is_premium
4✔
34
                        ? 'https://yoast.com/product/yoast-seo-premium-wordpress/'
2✔
35
                        : 'https://yoast.com/product/yoast-seo-wordpress/';
3✔
36

37
                return \sprintf(
4✔
38
                        '<!-- This site is optimized with the %1$s %2$s - %3$s -->',
4✔
39
                        $product_name,
4✔
40
                        $version,
4✔
41
                        $url
4✔
42
                );
4✔
43
        }
44

45
        /**
46
         * Gets the plugin version information, including the free version if Premium is used.
47
         *
48
         * @return string The constructed version information.
49
         */
50
        private function construct_version_info() {
2✔
51
                /**
52
                 * Filter: 'wpseo_hide_version' - can be used to hide the Yoast SEO version in the debug marker (only available in Yoast SEO Premium).
53
                 *
54
                 * @param bool $hide_version
55
                 */
56
                if ( \apply_filters( 'wpseo_hide_version', false ) ) {
2✔
UNCOV
57
                        return '';
×
58
                }
59

60
                return 'v' . \WPSEO_PREMIUM_VERSION . ' (Yoast SEO v' . \WPSEO_VERSION . ')';
2✔
61
        }
62

63
        /**
64
         * Gets the raw value of a presentation.
65
         *
66
         * @return string The raw value.
67
         */
68
        public function get() {
2✔
69
                return '';
2✔
70
        }
71
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc