*/ public static function get_conditionals() { return [ Admin_Conditional::class, ]; } /** * Constructor. * * @param Redirect_Helper $redirect_helper The redirect helper. */ public function __construct( Redirect_Helper $redirect_helper ) { $this->redirect_helper = $redirect_helper; } /** * Registers all hooks to WordPress. * * @return void */ public function register_hooks() { \add_action( 'admin_menu', [ $this, 'register_admin_menu' ] ); } /** * Registers the admin menu. * * @return void */ public function register_admin_menu() { $page_title = \sprintf( /* translators: %s: expands to Yoast */ \esc_html__( '%s Redirects', 'wordpress-seo' ), 'Yoast', ); \add_management_page( $page_title, $page_title, 'edit_others_posts', 'wpseo_redirects_tools', [ $this, 'show_redirects_page' ], ); } /** * The redirects tools page render function, noop. * * @return void */ public function show_redirects_page() { // Do nothing and let the redirect happen from the redirect integration. } }