Initialize site preview.
Description
This function sets IFRAME_REQUEST to true if the site preview parameter is set.
Source
function wp_initialize_site_preview_hooks() {
if (
! defined( 'IFRAME_REQUEST' ) &&
isset( $_GET['wp_site_preview'] ) &&
1 === (int) $_GET['wp_site_preview'] &&
current_user_can( 'edit_theme_options' )
) {
define( 'IFRAME_REQUEST', true );
}
}
Changelog
Version | Description |
---|---|
6.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.