send_origin_headers example

if ( ! defined( 'WP_ADMIN' ) ) {
    define( 'WP_ADMIN', true );
}

if ( defined( 'ABSPATH' ) ) {
    require_once ABSPATH . 'wp-load.php';
} else {
    require_once dirname( __DIR__ ) . '/wp-load.php';
}

/** Allow for cross-domain requests (from the front end). */
send_origin_headers();

require_once ABSPATH . 'wp-admin/includes/admin.php';

nocache_headers();

/** This action is documented in wp-admin/admin.php */
do_action( 'admin_init' );

$action = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';

// Reject invalid parameters.

define( 'DOING_AJAX', true );
if ( ! defined( 'WP_ADMIN' ) ) {
    define( 'WP_ADMIN', true );
}

/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';

/** Allow for cross-domain requests (from the front end). */
send_origin_headers();

header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
header( 'X-Robots-Tag: noindex' );

// Require a valid action parameter. if ( empty( $_REQUEST['action'] ) || ! is_scalar( $_REQUEST['action'] ) ) {
    wp_die( '0', 400 );
}

/** Load WordPress Administration APIs */
require_once ABSPATH . 'wp-admin/includes/admin.php';

/* * If unauthenticated then require a valid changeset UUID to load the preview. * In this way, the UUID serves as a secret key. If the messenger channel is present, * then send unauthenticated code to prompt re-auth. */
        if ( ! current_user_can( 'customize' ) && ! $this->changeset_post_id() ) {
            $this->wp_die( $this->messenger_channel ? 0 : -1, __( 'Non-existent changeset UUID.' ) );
        }

        if ( ! headers_sent() ) {
            send_origin_headers();
        }

        // Hide the admin bar if we're embedded in the customizer iframe.         if ( $this->messenger_channel ) {
            show_admin_bar( false );
        }

        if ( $this->is_theme_active() ) {
            // Once the theme is loaded, we'll validate it.             add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) );
        } else {
            
Home | Imprint | This part of the site doesn't use cookies.