Filters the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer.
Parameters
$headers
arrayrequired- Headers.
Source
public function filter_iframe_security_headers( $headers ) {
$headers['X-Frame-Options'] = 'SAMEORIGIN';
$headers['Content-Security-Policy'] = "frame-ancestors 'self'";
return $headers;
}
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.