ZenphotoCMS 1.6.3

cookieConsent

Table of Contents

Methods

__construct()  : mixed
checkConsent()  : bool
Checks if consent has been given depending on the compliance mode and if the cookieconsent_status cookie is set
getCSS()  : mixed
Gets the CSS for the cookieconsent script
getJS()  : mixed
Gets the JS definition of the cookieconsent script based on the options
getOptionsSupported()  : mixed
printConsentJS()  : mixed
Prints the scripts added to the scripts option.
printExternalConsentJS()  : mixed
Prints JS code from the external scripts option without <script> that loads external scripts if consent has been given

Methods

checkConsent()

Checks if consent has been given depending on the compliance mode and if the cookieconsent_status cookie is set

public static checkConsent() : bool
  • info: All just informational so always true
  • opt-in: Returns true only if the consent cookie is set to "allow"
  • opt-out: Returns true by default unless declined or if the consent cookie is set to "allow"

NOTE: This will not and cannot work properly while using the static_html_cache plugin unless called before the cache is fetched.

Tags
since
1.5.8
Return values
bool

getCSS()

Gets the CSS for the cookieconsent script

public static getCSS() : mixed

getJS()

Gets the JS definition of the cookieconsent script based on the options

public static getJS() : mixed

printConsentJS()

Prints the scripts added to the scripts option.

public static printConsentJS() : mixed

These are then added to the theme_header filter automatically by the plugin

Plugins or themes can use the "cookieconsent_consentscripts" to add additional ones

Tags
since
1.5.8

printExternalConsentJS()

Prints JS code from the external scripts option without <script> that loads external scripts if consent has been given

public static printExternalConsentJS() : mixed

Plugins or themes can use the "cookieconsent_externalconsentscripts" to add additional ones

Tags
since
1.5.8

        
On this page

Search results