PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/admin/class-lp-admin-mcp-api-keys.php +12 -5 4.4.04.4.8 View file →
@@ -171,9 +171,10 @@
171 171 protected function redirect_with_notice( string $notice_code ): void {
172 172 $url = add_query_arg(
173 173 array(
174 174 'page' => 'learn-press-settings',
175 - 'tab' => 'mcp',
175 + 'tab' => 'advanced',
176 + 'section' => 'mcp',
176 177 'lp_mcp_notice' => $notice_code,
177 178 ),
178 179 admin_url( 'admin.php' )
179 180 );
@@ -213,13 +214,19 @@
213 214 *
214 215 * @return bool
215 216 */
216 217 protected function is_mcp_keys_settings_screen(): bool {
217 - $page = LP_Request::get_param( 'page', '', 'key' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
218 - $tab = LP_Request::get_param( 'tab', '', 'key' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
219 218
220 - return 'learn-press-settings' === $page
221 - && 'mcp' === $tab;
219 + $page = sanitize_key( $_REQUEST['page'] ?? '' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
220 + $tab = sanitize_key( $_REQUEST['tab'] ?? '' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
221 + $section = sanitize_key( $_REQUEST['section'] ?? '' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
222 +
223 + if ( 'learn-press-settings' !== $page ) {
224 + return false;
225 + }
226 +
227 + return ( 'advanced' === $tab && 'mcp' === $section )
228 + || 'mcp' === $tab;
222 229 }
223 230
224 231 /**
225 232 * Check whether MCP integration is enabled.