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 +4 -4 3.10.0-beta.1 → 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 }
@@ -461,14 +461,14 @@
461 461 );
462 462 }
463 463
464 464 /**
465 - * AJAX handler for refreshing the onstalled version.
465 + * AJAX handler for refreshing the installed version.
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 }
@@ -485,9 +485,9 @@
485 485 * @return void
486 486 */
487 487 public static function render_version_switch_warning(): void {
488 488 ?>
489 - <div id="version-switch-warning" class="notice code-snippets-notice notice-warning" role="region">
489 + <div id="version-switch-warning" class="notice code-snippets-notice notice-warning hidden" role="region">
490 490 <p>
491 491 <strong><?php esc_html_e( 'Warning:', 'code-snippets' ); ?></strong>
492 492 <?php esc_html_e( 'Switching versions may cause compatibility issues. Always backup your site before switching versions.', 'code-snippets' ); ?>
493 493 </p>