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

Yoast / wordpress-seo / 691216a7bbf5bea8b39de9c97b1f1f1f82631ed2

11 Jul 2025 10:29AM UTC coverage: 53.468% (+0.06%) from 53.412%
691216a7bbf5bea8b39de9c97b1f1f1f82631ed2

Pull #22356

github

thijsoo
eslint fix.
Pull Request #22356: Feature/get redirects

8217 of 14373 branches covered (57.17%)

Branch coverage included in aggregate %.

2 of 24 new or added lines in 10 files covered. (8.33%)

103 existing lines in 6 files now uncovered.

30354 of 57766 relevant lines covered (52.55%)

41333.09 hits per line

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

89.47
/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
        }
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 [
2✔
32
                        Admin_Conditional::class,
2✔
33
                        Premium_Inactive_Conditional::class,
2✔
34
                ];
2✔
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
                ];
2✔
53

54
                return $submenu_pages;
2✔
55
        }
56

57
        /**
58
         * Displays the redirects page.
59
         *
60
         * @return void
61
         */
UNCOV
62
        public function display() {
×
UNCOV
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