ZenphotoCMS 1.6.1

securityHeaders

Static class to generate the headers as set on the plugin options

Table of Contents

getContentSecurityPolicySources()  : string
Gets headers from checkbox lists type options and returns them as string setup for header usage
setContentSecurityPolicy()  : mixed
Sets the Content-Security-Policy header
setHeaders()  : mixed
Sets all headers, to be used with the "theme_headers" filter hook
setReferrerPolicy()  : mixed
Sets the Referrer-Policy header
setStrictTransportSecurity()  : mixed
Sets the Strict-Transport-Security header
setXContentTypeOptions()  : mixed
Sets the X-Content-Type-Options header
setXFrameOptions()  : mixed
Sets the X-Frame-Options header
setXSSProtection()  : mixed
Sets the X-XSS-Protection header

Methods

getContentSecurityPolicySources()

Gets headers from checkbox lists type options and returns them as string setup for header usage

public static getContentSecurityPolicySources(string $policyname, array<string|int, mixed> $checkboxoptions) : string
Parameters
$policyname : string

The CSP policy name

$checkboxoptions : array<string|int, mixed>

The extra sources via checkbox options for the header. Key of entry is the source to set, value the option name as these are

Return values
string

setContentSecurityPolicy()

Sets the Content-Security-Policy header

public static setContentSecurityPolicy() : mixed
Return values
mixed

setHeaders()

Sets all headers, to be used with the "theme_headers" filter hook

public static setHeaders() : mixed
Return values
mixed

setReferrerPolicy()

Sets the Referrer-Policy header

public static setReferrerPolicy() : mixed
Return values
mixed

setStrictTransportSecurity()

Sets the Strict-Transport-Security header

public static setStrictTransportSecurity() : mixed
Return values
mixed

setXContentTypeOptions()

Sets the X-Content-Type-Options header

public static setXContentTypeOptions() : mixed
Return values
mixed

setXFrameOptions()

Sets the X-Frame-Options header

public static setXFrameOptions() : mixed
Return values
mixed

setXSSProtection()

Sets the X-XSS-Protection header

public static setXSSProtection() : mixed
Return values
mixed

Search results