wp_initialize_site_preview_hooks()
Initialize site preview.
This function sets IFRAME_REQUEST to true if the site preview parameter is set.
No Hooks.
Returns
null
. Nothing (null).
Usage
wp_initialize_site_preview_hooks();
Changelog
Since 6.8.0 | Introduced. |
wp_initialize_site_preview_hooks() wp initialize site preview hooks code WP 6.8.1
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 ); } }