/*
* 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 {