Add nonces for security
dry up redundencies
This commit is contained in:
@@ -928,7 +928,7 @@ class HSSM_Slides_CPT {
|
||||
public function ajax_update_slide_order() {
|
||||
// Verify nonce and permissions
|
||||
if ( ! wp_verify_nonce( $_POST['nonce'], 'hssm_update_slide_order' ) || ! current_user_can( 'edit_posts' ) ) {
|
||||
wp_die( 'Unauthorized' );
|
||||
wp_send_json_error( 'Unauthorized' );
|
||||
}
|
||||
|
||||
if ( isset( $_POST['slide_ids'] ) && is_array( $_POST['slide_ids'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user