NOOP_Translations::set_headers() WordPress Method
The NOOP_Translations::set_headers() method is a simple way to add headers to your WordPress site. This is useful for sites that are running on multiple domains, or for sites that are running on a shared server. This method allows you to add a header to your WordPress site without having to modify the code of your theme or plugin. You can simply add the following code to your functions.php file: add_action( 'wp_headers', 'NOOP_Translations::set_headers' ); This will add the following headers to your WordPress site: X-Frame-Options: SAMEORIGIN X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block If you want to add more headers, you can simply add them to the array that is passed to the set_headers() method.
NOOP_Translations::set_headers( array $headers ) #
Contents
Parameters
- $headers
(array)(Required)
Source
File: wp-includes/pomo/translations.php
public function set_headers( $headers ) { }
Expand full source codeCollapse full source codeView on TracView on GitHub