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 | admin/menu/class-menu.php +7 -16 18.028.5 View file →
@@ -16,9 +16,9 @@
16 16 * !DO NOT CHANGE THIS!
17 17 *
18 18 * @var string
19 19 */
20 - const PAGE_IDENTIFIER = 'wpseo_dashboard';
20 + public const PAGE_IDENTIFIER = 'wpseo_dashboard';
21 21
22 22 /**
23 23 * List of classes that add admin functionality.
24 24 *
@@ -58,10 +58,14 @@
58 58 *
59 59 * @return void
60 60 */
61 61 public function load_page() {
62 - $page = filter_input( INPUT_GET, 'page' );
63 - $this->show_page( $page );
62 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
63 + if ( isset( $_GET['page'] ) && is_string( $_GET['page'] ) ) {
64 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
65 + $page = sanitize_text_field( wp_unslash( $_GET['page'] ) );
66 + $this->show_page( $page );
67 + }
64 68 }
65 69
66 70 /**
67 71 * Shows an admin settings page.
@@ -75,26 +79,13 @@
75 79 case 'wpseo_tools':
76 80 require_once WPSEO_PATH . 'admin/pages/tools.php';
77 81 break;
78 82
79 - case 'wpseo_titles':
80 - require_once WPSEO_PATH . 'admin/pages/metas.php';
81 - break;
82 -
83 - case 'wpseo_social':
84 - require_once WPSEO_PATH . 'admin/pages/social.php';
85 - break;
86 -
87 - case 'wpseo_licenses':
88 - require_once WPSEO_PATH . 'admin/pages/licenses.php';
89 - break;
90 -
91 83 case 'wpseo_files':
92 84 require_once WPSEO_PATH . 'admin/views/tool-file-editor.php';
93 85 break;
94 86
95 87 default:
96 - require_once WPSEO_PATH . 'admin/pages/dashboard.php';
97 88 break;
98 89 }
99 90 }
100 91 }