Server IP : 172.67.158.161 / Your IP : 3.142.98.153 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/giankuin/thietke365.net/wp-content/plugins/wordpress-seo/src/integrations/admin/ |
Upload File : |
<?php namespace Yoast\WP\SEO\Integrations\Admin; use Yoast\WP\SEO\Conditionals\Admin_Conditional; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Old_Configuration_Integration class */ class Old_Configuration_Integration implements Integration_Interface { /** * {@inheritDoc} */ public static function get_conditionals() { return [ Admin_Conditional::class ]; } /** * {@inheritDoc} */ public function register_hooks() { \add_filter( 'admin_menu', [ $this, 'add_submenu_page' ], 11 ); \add_action( 'admin_init', [ $this, 'redirect_to_new_configuration' ] ); } /** * Adds the old configuration submenu page. * * @param array $submenu_pages The Yoast SEO submenu pages. * * @return array the filtered submenu pages. */ public function add_submenu_page( $submenu_pages ) { \add_submenu_page( '', \__( 'Old Configuration Wizard', 'wordpress-seo' ), '', 'manage_options', 'wpseo_configurator', [ $this, 'render_page' ] ); return $submenu_pages; } /** * Renders the old configuration page. */ public function render_page() { // This page is never to be displayed. } /** * Redirects from the old configuration page to the new configuration page. */ public function redirect_to_new_configuration() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved. if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wpseo_configurator' ) { return; } \wp_safe_redirect( \admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ), 302, 'Yoast SEO' ); exit; } }