WordPress at Your Fingertips
function is not described

WP_Customize_Manager::filter_iframe_security_headers() public WP 4.7.0

Filters the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer.

{} It's a method of the class: WP_Customize_Manager{}

No Hooks.

Return

Array. Headers.

Usage

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->filter_iframe_security_headers( $headers );
$headers(array) (required)
Headers.

Changelog

Since 4.7.0 Introduced.

Code of WP_Customize_Manager::filter_iframe_security_headers() WP 5.8.1

public function filter_iframe_security_headers( $headers ) {
	$headers['X-Frame-Options']         = 'SAMEORIGIN';
	$headers['Content-Security-Policy'] = "frame-ancestors 'self'";
	return $headers;
}