Changeset 13175
- Timestamp:
- 02/17/2010 12:26:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r13132 r13175 16 16 17 17 require_once('../wp-load.php'); 18 19 if ( ! isset( $_REQUEST['action'] ) ) 20 die('-1'); 21 18 22 require_once('includes/admin.php'); 19 23 @header('Content-Type: text/html; charset=' . get_option('blog_charset')); … … 23 27 if ( ! is_user_logged_in() ) { 24 28 25 if ( $_POST['action'] == 'autosave' ) {29 if ( isset( $_POST['action'] ) && $_POST['action'] == 'autosave' ) { 26 30 $id = isset($_POST['post_ID'])? (int) $_POST['post_ID'] : 0; 27 31 … … 30 34 31 35 $message = sprintf( __('<strong>ALERT: You are logged out!</strong> Could not save draft. <a href="%s" target="_blank">Please log in again.</a>'), wp_login_url() ); 32 33 34 35 36 37 38 } 39 40 if ( !empty( $_REQUEST['action'] ) )36 $x = new WP_Ajax_Response( array( 37 'what' => 'autosave', 38 'id' => $id, 39 'data' => $message 40 ) ); 41 $x->send(); 42 } 43 44 if ( !empty( $_REQUEST['action'] ) ) 41 45 do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ); 42 46
Note: See TracChangeset
for help on using the changeset viewer.