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

Yoast / wordpress-seo / 30c6b14cf72bf2df4c2ac8a578b09d5053a0b516

14 Jul 2025 08:34AM UTC coverage: 53.548% (+0.1%) from 53.412%
30c6b14cf72bf2df4c2ac8a578b09d5053a0b516

Pull #22356

github

kyrylo-polozenko-newfold
fix: lint js
Pull Request #22356: Feature/get redirects

8217 of 14316 branches covered (57.4%)

Branch coverage included in aggregate %.

1 of 23 new or added lines in 9 files covered. (4.35%)

105 existing lines in 8 files now uncovered.

30345 of 57698 relevant lines covered (52.59%)

41381.79 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