WordPress.org

Make WordPress Core

Ticket #21024: 21024.3.diff

File 21024.3.diff, 746 bytes (added by nacin, 6 years ago)

Option B

  • wp-admin/admin-ajax.php

     
    1616define( 'DOING_AJAX', true );
    1717define( 'WP_ADMIN', true );
    1818
     19/** Load WordPress Bootstrap */
     20require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
     21
     22/** Allow for cross-domain requests (from the frontend). */
     23send_origin_headers();
     24
    1925// Require an action parameter
    2026if ( empty( $_REQUEST['action'] ) )
    2127        die( '0' );
    2228
    23 /** Load WordPress Bootstrap */
    24 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
    25 
    2629/** Load WordPress Administration APIs */
    2730require_once( ABSPATH . 'wp-admin/includes/admin.php' );
    2831