• 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

90.0
/src/integrations/admin/redirects-page-integration.php
1
<?php
2

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

5
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
6
use Yoast\WP\SEO\Conditionals\Premium_Inactive_Conditional;
7
use Yoast\WP\SEO\Integrations\Integration_Interface;
8

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

14
        /**
15
         * Sets up the hooks.
16
         *
17
         * @return void
18
         */
19
        public function register_hooks() {
2✔
20
                \add_filter( 'wpseo_submenu_pages', [ $this, 'add_submenu_page' ], 9 );
2✔
21
        }
1✔
22

23
        /**
24
         * Returns the conditionals based on which this loadable should be active.
25
         *
26
         * In this case: only when on an admin page and Premium is not active.
27
         *
28
         * @return array The conditionals.
29
         */
30
        public static function get_conditionals() {
2✔
31
                return [
1✔
32
                        Admin_Conditional::class,
2✔
33
                        Premium_Inactive_Conditional::class,
1✔
34
                ];
1✔
35
        }
36

37
        /**
38
         * Adds the redirects submenu page.
39
         *
40
         * @param array $submenu_pages The Yoast SEO submenu pages.
41
         *
42
         * @return array The filtered submenu pages.
43
         */
44
        public function add_submenu_page( $submenu_pages ) {
2✔
45
                $submenu_pages[] = [
2✔
46
                        'wpseo_dashboard',
2✔
47
                        '',
2✔
48
                        \__( 'Redirects', 'wordpress-seo' ) . ' <span class="yoast-badge yoast-premium-badge"></span>',
2✔
49
                        'edit_others_posts',
2✔
50
                        'wpseo_redirects',
2✔
51
                        [ $this, 'display' ],
2✔
52
                ];
1✔
53

54
                return $submenu_pages;
2✔
55
        }
56

57
        /**
58
         * Displays the redirects page.
59
         *
60
         * @return void
61
         */
62
        public function display() {
×
63
                require \WPSEO_PATH . 'admin/pages/redirects.php';
×
64
        }
65
}
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