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

Yoast / wordpress-seo / 6987097851

25 Nov 2023 04:49AM UTC coverage: 49.206% (-0.1%) from 49.302%
6987097851

push

github

web-flow
Merge pull request #20878 from Yoast/JRF/ghactions-minor-tweak

GH Actions: update a few links in inline comments

15305 of 31104 relevant lines covered (49.21%)

4.03 hits per line

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

84.62
/src/integrations/third-party/amp.php
1
<?php
2

3
namespace Yoast\WP\SEO\Integrations\Third_Party;
4

5
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
6
use Yoast\WP\SEO\Integrations\Front_End_Integration;
7
use Yoast\WP\SEO\Integrations\Integration_Interface;
8

9
/**
10
 * AMP integration.
11
 */
12
class AMP implements Integration_Interface {
13

14
        /**
15
         * The front end integration.
16
         *
17
         * @var Front_End_Integration
18
         */
19
        protected $front_end;
20

21
        /**
22
         * Returns the conditionals based in which this loadable should be active.
23
         *
24
         * @return array
25
         */
26
        public static function get_conditionals() {
2✔
27
                return [ Front_End_Conditional::class ];
2✔
28
        }
29

30
        /**
31
         * Constructs the AMP integration
32
         *
33
         * @param Front_End_Integration $front_end The front end integration.
34
         */
35
        public function __construct( Front_End_Integration $front_end ) {
×
36
                $this->front_end = $front_end;
×
37
        }
38

39
        /**
40
         * Initializes the integration.
41
         *
42
         * This is the place to register hooks and filters.
43
         *
44
         * @return void
45
         */
46
        public function register_hooks() {
2✔
47
                \add_action( 'amp_post_template_head', [ $this, 'remove_amp_meta_output' ], 0 );
2✔
48
                \add_action( 'amp_post_template_head', [ $this->front_end, 'call_wpseo_head' ], 9 );
2✔
49
        }
1✔
50

51
        /**
52
         * Removes amp meta output.
53
         *
54
         * @return void
55
         */
56
        public function remove_amp_meta_output() {
2✔
57
                \remove_action( 'amp_post_template_head', 'amp_post_template_add_title' );
2✔
58
                \remove_action( 'amp_post_template_head', 'amp_post_template_add_canonical' );
2✔
59
                \remove_action( 'amp_post_template_head', 'amp_print_schemaorg_metadata' );
2✔
60
        }
1✔
61
}
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

© 2025 Coveralls, Inc