Make WordPress Core


Ignore:
Timestamp:
03/17/2025 01:01:24 PM (18 months ago)
Author:
joemcgill
Message:

Editor: Support site preview mode for the Site Editor.

This allows the Site Editor to load a preview of the site as an IFRAME_REQUEST by checking for a wp_site_preview query param. By setting the IFRAME_REQUEST constant when loading the preview, the site's admin bar and some third party plugin overlays will not be shown in the preview.

Props wildworks, joemcgill, peterwilsoncc, presstoke, mamaduka, johnbillion, faisal03.
Fixes #63076.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r59980 r60003  
    552552add_action( 'plugins_loaded', 'wp_initialize_theme_preview_hooks', 1 );
    553553
     554// Site preview for Classic Theme.
     555add_action( 'init', 'wp_initialize_site_preview_hooks', 1 );
     556
    554557// Calendar widget cache.
    555558add_action( 'save_post', 'delete_get_calendar_cache' );
Note: See TracChangeset for help on using the changeset viewer.