Changeset 34265 for trunk/src/wp-admin/async-upload.php
- Timestamp:
- 09/17/2015 12:32:20 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/async-upload.php
r34163 r34265 7 7 */ 8 8 9 // `wp_validate_action()` isn't loaded yet10 9 if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) { 11 10 define( 'DOING_AJAX', true ); … … 21 20 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); 22 21 23 if ( ! wp_validate_action( 'upload-attachment') ) {22 if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) { 24 23 // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead 25 24 if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) … … 36 35 header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); 37 36 38 if ( wp_validate_action( 'upload-attachment' )) {37 if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) { 39 38 include( ABSPATH . 'wp-admin/includes/ajax-actions.php' ); 40 39
Note: See TracChangeset
for help on using the changeset viewer.