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

Yoast / wordpress-seo / 8e3a4b2a113fe1853c6ea16ab3daa16ce7b7de5f

29 Sep 2025 12:51PM UTC coverage: 53.21% (-0.02%) from 53.233%
8e3a4b2a113fe1853c6ea16ab3daa16ce7b7de5f

Pull #22606

github

web-flow
Merge 57e623a18 into 8f5eaca29
Pull Request #22606: Add redirection tools page

8388 of 15525 branches covered (54.03%)

Branch coverage included in aggregate %.

1 of 35 new or added lines in 4 files covered. (2.86%)

5 existing lines in 1 file now uncovered.

31768 of 59942 relevant lines covered (53.0%)

39839.56 hits per line

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

0.0
/src/integrations/admin/redirections-tools-page.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\Helpers\Redirect_Helper;
8
use Yoast\WP\SEO\Integrations\Integration_Interface;
9

10
/**
11
 * Redirections_Tools_Page class
12
 */
13
class Redirections_Tools_Page implements Integration_Interface {
14

15
        /**
16
         * The redirect helper.
17
         *
18
         * @var Redirect_Helper
19
         */
20
        private $redirect_helper;
21

22
        /**
23
         * Returns the conditionals based in which this loadable should be active.
24
         *
25
         * @return array<string>
26
         */
NEW
27
        public static function get_conditionals() {
×
NEW
28
                return [
×
NEW
29
                        Admin_Conditional::class,
×
NEW
30
                        Premium_Inactive_Conditional::class,
×
NEW
31
                ];
×
32
        }
33

34
        /**
35
         * Constructor.
36
         *
37
         * @param Redirect_Helper $redirect_helper The redirect helper.
38
         */
NEW
39
        public function __construct(
×
40
                Redirect_Helper $redirect_helper
41
        ) {
NEW
42
                $this->redirect_helper = $redirect_helper;
×
43
        }
44

45
        /**
46
         * Registers all hooks to WordPress.
47
         *
48
         * @return void
49
         */
NEW
50
        public function register_hooks() {
×
NEW
51
                \add_action( 'admin_menu', [ $this, 'register_admin_menu' ] );
×
52
        }
53

54
        /**
55
         * Registers the admin menu.
56
         *
57
         * @return void
58
         */
NEW
59
        public function register_admin_menu() {
×
NEW
60
                \add_management_page(
×
NEW
61
                        \esc_html__( 'Redirects', 'wordpress-seo' ),
×
NEW
62
                        \esc_html__( 'Redirects', 'wordpress-seo' ),
×
NEW
63
                        'edit_others_posts',
×
NEW
64
                        'wpseo_redirects_tools',
×
NEW
65
                        [ $this, 'show_redirects_page' ]
×
NEW
66
                );
×
67
        }
68

69
        /**
70
         * The redirects tools page render function, noop.
71
         *
72
         * @return void
73
         */
NEW
74
        public function show_redirects_page() {
×
75
                // Do nothing and let the redirect happen from the redirect integration.
NEW
76
        }
×
77
}
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