Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Restore initial customize check
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Jun 9, 2016
1 parent 7b5152c commit ab6ca42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions php/class-customize-snapshot-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ public function update_snapshot() {
if ( ! check_ajax_referer( self::AJAX_ACTION, 'nonce', false ) ) {
status_header( 400 );
wp_send_json_error( 'bad_nonce' );
} elseif ( ! current_user_can( 'customize' ) ) {
status_header( 403 );
wp_send_json_error( 'customize_not_allowed' );
} elseif ( ! isset( $_SERVER['REQUEST_METHOD'] ) || 'POST' !== $_SERVER['REQUEST_METHOD'] ) { // WPCS: input var ok.
status_header( 405 );
wp_send_json_error( 'bad_method' );
Expand Down

0 comments on commit ab6ca42

Please sign in to comment.