PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/integrations/admin/old-configuration-integration.php +10 -6 18.928.5 View file →
@@ -1,9 +1,8 @@
1 1 <?php
2 2
3 3 namespace Yoast\WP\SEO\Integrations\Admin;
4 4
5 -use WPSEO_Admin_Asset_Manager;
6 5 use Yoast\WP\SEO\Conditionals\Admin_Conditional;
7 6 use Yoast\WP\SEO\Integrations\Integration_Interface;
8 7
9 8 /**
@@ -34,14 +33,14 @@
34 33 * @return array the filtered submenu pages.
35 34 */
36 35 public function add_submenu_page( $submenu_pages ) {
37 36 \add_submenu_page(
38 - null,
37 + 'options.php',
39 38 \__( 'Old Configuration Wizard', 'wordpress-seo' ),
40 - null,
39 + '',
41 40 'manage_options',
42 41 'wpseo_configurator',
43 - [ $this, 'render_page' ]
42 + [ $this, 'render_page' ],
44 43 );
45 44
46 45 return $submenu_pages;
47 46 }
@@ -47,8 +46,10 @@
47 46 }
48 47
49 48 /**
50 49 * Renders the old configuration page.
50 + *
51 + * @return void
51 52 */
52 53 public function render_page() {
53 54 // This page is never to be displayed.
54 55 }
@@ -54,8 +55,10 @@
54 55 }
55 56
56 57 /**
57 58 * Redirects from the old configuration page to the new configuration page.
59 + *
60 + * @return void
58 61 */
59 62 public function redirect_to_new_configuration() {
60 63 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
61 64 if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wpseo_configurator' ) {
@@ -60,8 +63,9 @@
60 63 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
61 64 if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wpseo_configurator' ) {
62 65 return;
63 66 }
64 - \wp_safe_redirect( \admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ), 302, 'Yoast SEO' );
65 - exit;
67 + $redirect_url = 'admin.php?page=wpseo_dashboard#/first-time-configuration';
68 + \wp_safe_redirect( \admin_url( $redirect_url ), 302, 'Yoast SEO' );
69 + exit();
66 70 }
67 71 }