wp-includes/class-wp-customize-manager.php:2089Removes customize_messenger_channel query parameter from the preview window when it is not in an iframe.
public function remove_frameless_preview_messenger_channel() { if ( ! $this->messenger_channel ) { return; } ob_start(); ?> <script> ( function() { if ( parent !== window ) { return; } const url = new URL( location.href ); if ( url.searchParams.has( 'customize_messenger_channel' ) ) { url.searchParams.delete( 'customize_messenger_channel' ); location.replace( url ); } } )(); </script> <?php wp_print_inline_script_tag( wp_remove_surrounding_empty_script_tags( ob_get_clean() ) . "\n//# sourceURL=" . rawurlencode( __METHOD__ ) ); }Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp-customize-manager.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.