Changeset 41926 for trunk/src/wp-admin/admin-ajax.php
- Timestamp:
- 10/18/2017 09:00:39 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/admin-ajax.php
r41895 r41926 82 82 83 83 if ( is_user_logged_in() ) { 84 // If no action is registered, return a Bad Request response. 85 if ( ! has_action( 'wp_ajax_' . $_REQUEST['action'] ) ) { 86 wp_die( '0', 400 ); 87 } 88 84 89 /** 85 90 * Fires authenticated Ajax actions for logged-in users. … … 92 97 do_action( 'wp_ajax_' . $_REQUEST['action'] ); 93 98 } else { 99 // If no action is registered, return a Bad Request response. 100 if ( ! has_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ) ) { 101 wp_die( '0', 400 ); 102 } 103 94 104 /** 95 105 * Fires non-authenticated Ajax actions for logged-out users. … … 103 113 } 104 114 // Default status 105 wp_die( '0' , 400);115 wp_die( '0' );
Note: See TracChangeset
for help on using the changeset viewer.