PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | php/Settings/Version_Switch.php +2 -2 3.10.0-beta.2 → trunk View file →
@@ -422,9 +422,9 @@
422 422 *
423 423 * @return void
424 424 */
425 425 public static function ajax_switch_version(): void {
426 - check_ajax_referer( 'code_snippets_version_switch', sanitize_text_field( wp_unslash( $_POST['nonce'] ?? '' ) ) );
426 + check_ajax_referer( 'code_snippets_version_switch', 'nonce' );
427 427
428 428 if ( ! current_user_can( 'update_plugins' ) ) {
429 429 wp_send_json_error( [ 'message' => __( 'You do not have permission to update plugins.', 'code-snippets' ) ] );
430 430 }
@@ -466,9 +466,9 @@
466 466 *
467 467 * @return void
468 468 */
469 469 public static function ajax_refresh_versions(): void {
470 - check_ajax_referer( 'code_snippets_refresh_versions', sanitize_text_field( wp_unslash( $_POST['nonce'] ?? '' ) ) );
470 + check_ajax_referer( 'code_snippets_refresh_versions', 'nonce' );
471 471
472 472 if ( ! code_snippets()->current_user_can() ) {
473 473 wp_send_json_error( [ 'message' => __( 'You do not have permission to manage options.', 'code-snippets' ) ] );
474 474 }