| @@ -32,8 +32,12 @@ | ||
| 32 | 32 | */ |
| 33 | 33 | function wppb_cleanup_postmeta() { |
| 34 | 34 | check_ajax_referer( 'wppb_cleanup_postmeta', 'nonce' ); |
| 35 | 35 | |
| 36 | + if ( ! current_user_can( 'manage_options' ) ) { | |
| 37 | + wp_send_json_error(); | |
| 38 | + } | |
| 39 | + | |
| 36 | 40 | global $wpdb; |
| 37 | 41 | |
| 38 | 42 | $query = ''; |
| 39 | 43 | $step = isset( $_POST['step'] ) ? absint( $_POST['step'] ) : 1; |