app_login_url = 'https://app.hu-manity.co/#/en/cc2/login'; } /** * Load plugin defaults */ public function load_defaults() { $this->positions = array( 'top' => __( 'Top', 'cookie-notice' ), 'bottom' => __( 'Bottom', 'cookie-notice' ) ); $this->styles = array( 'none' => __( 'None', 'cookie-notice' ), 'wp-default' => __( 'Light', 'cookie-notice' ), 'bootstrap' => __( 'Dark', 'cookie-notice' ) ); $this->revoke_opts = array( 'automatic' => __( 'Automatic', 'cookie-notice' ), 'manual' => __( 'Manual', 'cookie-notice' ) ); $this->links = array( 'page' => __( 'Page link', 'cookie-notice' ), 'custom' => __( 'Custom link', 'cookie-notice' ) ); $this->link_targets = array( '_blank', '_self' ); $this->link_positions = array( 'banner' => __( 'Banner', 'cookie-notice' ), 'message' => __( 'Message', 'cookie-notice' ) ); $this->colors = array( 'text' => __( 'Text color', 'cookie-notice' ), 'bar' => __( 'Bar color', 'cookie-notice' ), ); $this->times = apply_filters( 'cn_cookie_expiry', array( 'hour' => array( __( 'An hour', 'cookie-notice' ), 3600 ), 'day' => array( __( '1 day', 'cookie-notice' ), 86400 ), 'week' => array( __( '1 week', 'cookie-notice' ), 604800 ), 'month' => array( __( '1 month', 'cookie-notice' ), 2592000 ), '3months' => array( __( '3 months', 'cookie-notice' ), 7862400 ), '6months' => array( __( '6 months', 'cookie-notice' ), 15811200 ), 'year' => array( __( '1 year', 'cookie-notice' ), 31536000 ), 'infinity' => array( __( 'infinity', 'cookie-notice' ), 2147483647 ) ) ); $this->effects = array( 'none' => __( 'None', 'cookie-notice' ), 'fade' => __( 'Fade', 'cookie-notice' ), 'slide' => __( 'Slide', 'cookie-notice' ) ); $this->script_placements = array( 'header' => __( 'Header', 'cookie-notice' ), 'footer' => __( 'Footer', 'cookie-notice' ), ); $this->cookie_messages = array( 0 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly.', 'cookie-notice' ), 1 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, and to personalize your browsing experience.', 'cookie-notice' ), 2 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, personalize your browsing experience, and analyze how you use our website. For these reasons, we may share your site usage data with our analytics partners.', 'cookie-notice' ), 3 => __( 'Cookies are small files that are stored on your browser. We use cookies and similar technologies to ensure our website works properly, personalize your browsing experience, analyze how you use our website, and deliver relevant ads to you. For these reasons, we may share your site usage data with our social media, advertising and analytics partners.', 'cookie-notice' ) ); $this->preferences_messages = array ( 0 => __( 'You can choose whether or not you want to consent to our use of cookies through the options below.', 'cookie-notice' ), 1 => __( 'You can choose whether or not you want to consent to our use of cookies through the options below. You can customise the use of cookies, and change your settings at any time.', 'cookie-notice' ) ); /* $this->countries = array( 'AF' => __( 'Afghanistan', 'cookie-notice' ), 'AX' => __( 'Åland Islands', 'cookie-notice' ), 'AL' => __( 'Albania', 'cookie-notice' ), 'DZ' => __( 'Algeria', 'cookie-notice' ), 'AD' => __( 'Andorra', 'cookie-notice' ), 'AO' => __( 'Angola', 'cookie-notice' ), 'AI' => __( 'Anguilla', 'cookie-notice' ), 'AQ' => __( 'Antarctica', 'cookie-notice' ), 'AG' => __( 'Antigua and Barbuda', 'cookie-notice' ), 'AR' => __( 'Argentina', 'cookie-notice' ), 'AM' => __( 'Armenia', 'cookie-notice' ), 'AW' => __( 'Aruba', 'cookie-notice' ), 'AU' => __( 'Australia', 'cookie-notice' ), 'AT' => __( 'Austria', 'cookie-notice' ), 'AZ' => __( 'Azerbaijan', 'cookie-notice' ), 'BS' => __( 'Bahamas', 'cookie-notice' ), 'BH' => __( 'Bahrain', 'cookie-notice' ), 'BD' => __( 'Bangladesh', 'cookie-notice' ), 'BB' => __( 'Barbados', 'cookie-notice' ), 'BY' => __( 'Belarus', 'cookie-notice' ), 'BE' => __( 'Belgium', 'cookie-notice' ), 'PW' => __( 'Belau', 'cookie-notice' ), 'BZ' => __( 'Belize', 'cookie-notice' ), 'BJ' => __( 'Benin', 'cookie-notice' ), 'BM' => __( 'Bermuda', 'cookie-notice' ), 'BT' => __( 'Bhutan', 'cookie-notice' ), 'BO' => __( 'Bolivia', 'cookie-notice' ), 'BQ' => __( 'Bonaire, Saint Eustatius and Saba', 'cookie-notice' ), 'BA' => __( 'Bosnia and Herzegovina', 'cookie-notice' ), 'BW' => __( 'Botswana', 'cookie-notice' ), 'BV' => __( 'Bouvet Island', 'cookie-notice' ), 'BR' => __( 'Brazil', 'cookie-notice' ), 'IO' => __( 'British Indian Ocean Territory', 'cookie-notice' ), 'VG' => __( 'British Virgin Islands', 'cookie-notice' ), 'BN' => __( 'Brunei', 'cookie-notice' ), 'BG' => __( 'Bulgaria', 'cookie-notice' ), 'BF' => __( 'Burkina Faso', 'cookie-notice' ), 'BI' => __( 'Burundi', 'cookie-notice' ), 'KH' => __( 'Cambodia', 'cookie-notice' ), 'CM' => __( 'Cameroon', 'cookie-notice' ), 'CA' => __( 'Canada', 'cookie-notice' ), 'CV' => __( 'Cape Verde', 'cookie-notice' ), 'KY' => __( 'Cayman Islands', 'cookie-notice' ), 'CF' => __( 'Central African Republic', 'cookie-notice' ), 'TD' => __( 'Chad', 'cookie-notice' ), 'CL' => __( 'Chile', 'cookie-notice' ), 'CN' => __( 'China', 'cookie-notice' ), 'CX' => __( 'Christmas Island', 'cookie-notice' ), 'CC' => __( 'Cocos (Keeling) Islands', 'cookie-notice' ), 'CO' => __( 'Colombia', 'cookie-notice' ), 'KM' => __( 'Comoros', 'cookie-notice' ), 'CG' => __( 'Congo (Brazzaville)', 'cookie-notice' ), 'CD' => __( 'Congo (Kinshasa)', 'cookie-notice' ), 'CK' => __( 'Cook Islands', 'cookie-notice' ), 'CR' => __( 'Costa Rica', 'cookie-notice' ), 'HR' => __( 'Croatia', 'cookie-notice' ), 'CU' => __( 'Cuba', 'cookie-notice' ), 'CW' => __( 'CuraÇao', 'cookie-notice' ), 'CY' => __( 'Cyprus', 'cookie-notice' ), 'CZ' => __( 'Czech Republic', 'cookie-notice' ), 'DK' => __( 'Denmark', 'cookie-notice' ), 'DJ' => __( 'Djibouti', 'cookie-notice' ), 'DM' => __( 'Dominica', 'cookie-notice' ), 'DO' => __( 'Dominican Republic', 'cookie-notice' ), 'EC' => __( 'Ecuador', 'cookie-notice' ), 'EG' => __( 'Egypt', 'cookie-notice' ), 'SV' => __( 'El Salvador', 'cookie-notice' ), 'GQ' => __( 'Equatorial Guinea', 'cookie-notice' ), 'ER' => __( 'Eritrea', 'cookie-notice' ), 'EE' => __( 'Estonia', 'cookie-notice' ), 'ET' => __( 'Ethiopia', 'cookie-notice' ), 'FK' => __( 'Falkland Islands', 'cookie-notice' ), 'FO' => __( 'Faroe Islands', 'cookie-notice' ), 'FJ' => __( 'Fiji', 'cookie-notice' ), 'FI' => __( 'Finland', 'cookie-notice' ), 'FR' => __( 'France', 'cookie-notice' ), 'GF' => __( 'French Guiana', 'cookie-notice' ), 'PF' => __( 'French Polynesia', 'cookie-notice' ), 'TF' => __( 'French Southern Territories', 'cookie-notice' ), 'GA' => __( 'Gabon', 'cookie-notice' ), 'GM' => __( 'Gambia', 'cookie-notice' ), 'GE' => __( 'Georgia', 'cookie-notice' ), 'DE' => __( 'Germany', 'cookie-notice' ), 'GH' => __( 'Ghana', 'cookie-notice' ), 'GI' => __( 'Gibraltar', 'cookie-notice' ), 'GR' => __( 'Greece', 'cookie-notice' ), 'GL' => __( 'Greenland', 'cookie-notice' ), 'GD' => __( 'Grenada', 'cookie-notice' ), 'GP' => __( 'Guadeloupe', 'cookie-notice' ), 'GT' => __( 'Guatemala', 'cookie-notice' ), 'GG' => __( 'Guernsey', 'cookie-notice' ), 'GN' => __( 'Guinea', 'cookie-notice' ), 'GW' => __( 'Guinea-Bissau', 'cookie-notice' ), 'GY' => __( 'Guyana', 'cookie-notice' ), 'HT' => __( 'Haiti', 'cookie-notice' ), 'HM' => __( 'Heard Island and McDonald Islands', 'cookie-notice' ), 'HN' => __( 'Honduras', 'cookie-notice' ), 'HK' => __( 'Hong Kong', 'cookie-notice' ), 'HU' => __( 'Hungary', 'cookie-notice' ), 'IS' => __( 'Iceland', 'cookie-notice' ), 'IN' => __( 'India', 'cookie-notice' ), 'ID' => __( 'Indonesia', 'cookie-notice' ), 'IR' => __( 'Iran', 'cookie-notice' ), 'IQ' => __( 'Iraq', 'cookie-notice' ), 'IE' => __( 'Republic of Ireland', 'cookie-notice' ), 'IM' => __( 'Isle of Man', 'cookie-notice' ), 'IL' => __( 'Israel', 'cookie-notice' ), 'IT' => __( 'Italy', 'cookie-notice' ), 'CI' => __( 'Ivory Coast', 'cookie-notice' ), 'JM' => __( 'Jamaica', 'cookie-notice' ), 'JP' => __( 'Japan', 'cookie-notice' ), 'JE' => __( 'Jersey', 'cookie-notice' ), 'JO' => __( 'Jordan', 'cookie-notice' ), 'KZ' => __( 'Kazakhstan', 'cookie-notice' ), 'KE' => __( 'Kenya', 'cookie-notice' ), 'KI' => __( 'Kiribati', 'cookie-notice' ), 'KW' => __( 'Kuwait', 'cookie-notice' ), 'KG' => __( 'Kyrgyzstan', 'cookie-notice' ), 'LA' => __( 'Laos', 'cookie-notice' ), 'LV' => __( 'Latvia', 'cookie-notice' ), 'LB' => __( 'Lebanon', 'cookie-notice' ), 'LS' => __( 'Lesotho', 'cookie-notice' ), 'LR' => __( 'Liberia', 'cookie-notice' ), 'LY' => __( 'Libya', 'cookie-notice' ), 'LI' => __( 'Liechtenstein', 'cookie-notice' ), 'LT' => __( 'Lithuania', 'cookie-notice' ), 'LU' => __( 'Luxembourg', 'cookie-notice' ), 'MO' => __( 'Macao S.A.R., China', 'cookie-notice' ), 'MK' => __( 'Macedonia', 'cookie-notice' ), 'MG' => __( 'Madagascar', 'cookie-notice' ), 'MW' => __( 'Malawi', 'cookie-notice' ), 'MY' => __( 'Malaysia', 'cookie-notice' ), 'MV' => __( 'Maldives', 'cookie-notice' ), 'ML' => __( 'Mali', 'cookie-notice' ), 'MT' => __( 'Malta', 'cookie-notice' ), 'MH' => __( 'Marshall Islands', 'cookie-notice' ), 'MQ' => __( 'Martinique', 'cookie-notice' ), 'MR' => __( 'Mauritania', 'cookie-notice' ), 'MU' => __( 'Mauritius', 'cookie-notice' ), 'YT' => __( 'Mayotte', 'cookie-notice' ), 'MX' => __( 'Mexico', 'cookie-notice' ), 'FM' => __( 'Micronesia', 'cookie-notice' ), 'MD' => __( 'Moldova', 'cookie-notice' ), 'MC' => __( 'Monaco', 'cookie-notice' ), 'MN' => __( 'Mongolia', 'cookie-notice' ), 'ME' => __( 'Montenegro', 'cookie-notice' ), 'MS' => __( 'Montserrat', 'cookie-notice' ), 'MA' => __( 'Morocco', 'cookie-notice' ), 'MZ' => __( 'Mozambique', 'cookie-notice' ), 'MM' => __( 'Myanmar', 'cookie-notice' ), 'NA' => __( 'Namibia', 'cookie-notice' ), 'NR' => __( 'Nauru', 'cookie-notice' ), 'NP' => __( 'Nepal', 'cookie-notice' ), 'NL' => __( 'Netherlands', 'cookie-notice' ), 'AN' => __( 'Netherlands Antilles', 'cookie-notice' ), 'NC' => __( 'New Caledonia', 'cookie-notice' ), 'NZ' => __( 'New Zealand', 'cookie-notice' ), 'NI' => __( 'Nicaragua', 'cookie-notice' ), 'NE' => __( 'Niger', 'cookie-notice' ), 'NG' => __( 'Nigeria', 'cookie-notice' ), 'NU' => __( 'Niue', 'cookie-notice' ), 'NF' => __( 'Norfolk Island', 'cookie-notice' ), 'KP' => __( 'North Korea', 'cookie-notice' ), 'NO' => __( 'Norway', 'cookie-notice' ), 'OM' => __( 'Oman', 'cookie-notice' ), 'PK' => __( 'Pakistan', 'cookie-notice' ), 'PS' => __( 'Palestinian Territory', 'cookie-notice' ), 'PA' => __( 'Panama', 'cookie-notice' ), 'PG' => __( 'Papua New Guinea', 'cookie-notice' ), 'PY' => __( 'Paraguay', 'cookie-notice' ), 'PE' => __( 'Peru', 'cookie-notice' ), 'PH' => __( 'Philippines', 'cookie-notice' ), 'PN' => __( 'Pitcairn', 'cookie-notice' ), 'PL' => __( 'Poland', 'cookie-notice' ), 'PT' => __( 'Portugal', 'cookie-notice' ), 'QA' => __( 'Qatar', 'cookie-notice' ), 'RE' => __( 'Reunion', 'cookie-notice' ), 'RO' => __( 'Romania', 'cookie-notice' ), 'RU' => __( 'Russia', 'cookie-notice' ), 'RW' => __( 'Rwanda', 'cookie-notice' ), 'BL' => __( 'Saint Barthélemy', 'cookie-notice' ), 'SH' => __( 'Saint Helena', 'cookie-notice' ), 'KN' => __( 'Saint Kitts and Nevis', 'cookie-notice' ), 'LC' => __( 'Saint Lucia', 'cookie-notice' ), 'MF' => __( 'Saint Martin (French part)', 'cookie-notice' ), 'SX' => __( 'Saint Martin (Dutch part)', 'cookie-notice' ), 'PM' => __( 'Saint Pierre and Miquelon', 'cookie-notice' ), 'VC' => __( 'Saint Vincent and the Grenadines', 'cookie-notice' ), 'SM' => __( 'San Marino', 'cookie-notice' ), 'ST' => __( 'São Tomé and Príncipe', 'cookie-notice' ), 'SA' => __( 'Saudi Arabia', 'cookie-notice' ), 'SN' => __( 'Senegal', 'cookie-notice' ), 'RS' => __( 'Serbia', 'cookie-notice' ), 'SC' => __( 'Seychelles', 'cookie-notice' ), 'SL' => __( 'Sierra Leone', 'cookie-notice' ), 'SG' => __( 'Singapore', 'cookie-notice' ), 'SK' => __( 'Slovakia', 'cookie-notice' ), 'SI' => __( 'Slovenia', 'cookie-notice' ), 'SB' => __( 'Solomon Islands', 'cookie-notice' ), 'SO' => __( 'Somalia', 'cookie-notice' ), 'ZA' => __( 'South Africa', 'cookie-notice' ), 'GS' => __( 'South Georgia/Sandwich Islands', 'cookie-notice' ), 'KR' => __( 'South Korea', 'cookie-notice' ), 'SS' => __( 'South Sudan', 'cookie-notice' ), 'ES' => __( 'Spain', 'cookie-notice' ), 'LK' => __( 'Sri Lanka', 'cookie-notice' ), 'SD' => __( 'Sudan', 'cookie-notice' ), 'SR' => __( 'Suriname', 'cookie-notice' ), 'SJ' => __( 'Svalbard and Jan Mayen', 'cookie-notice' ), 'SZ' => __( 'Swaziland', 'cookie-notice' ), 'SE' => __( 'Sweden', 'cookie-notice' ), 'CH' => __( 'Switzerland', 'cookie-notice' ), 'SY' => __( 'Syria', 'cookie-notice' ), 'TW' => __( 'Taiwan', 'cookie-notice' ), 'TJ' => __( 'Tajikistan', 'cookie-notice' ), 'TZ' => __( 'Tanzania', 'cookie-notice' ), 'TH' => __( 'Thailand', 'cookie-notice' ), 'TL' => __( 'Timor-Leste', 'cookie-notice' ), 'TG' => __( 'Togo', 'cookie-notice' ), 'TK' => __( 'Tokelau', 'cookie-notice' ), 'TO' => __( 'Tonga', 'cookie-notice' ), 'TT' => __( 'Trinidad and Tobago', 'cookie-notice' ), 'TN' => __( 'Tunisia', 'cookie-notice' ), 'TR' => __( 'Turkey', 'cookie-notice' ), 'TM' => __( 'Turkmenistan', 'cookie-notice' ), 'TC' => __( 'Turks and Caicos Islands', 'cookie-notice' ), 'TV' => __( 'Tuvalu', 'cookie-notice' ), 'UG' => __( 'Uganda', 'cookie-notice' ), 'UA' => __( 'Ukraine', 'cookie-notice' ), 'AE' => __( 'United Arab Emirates', 'cookie-notice' ), 'GB' => __( 'United Kingdom', 'cookie-notice' ), 'US' => __( 'United States', 'cookie-notice' ), 'UY' => __( 'Uruguay', 'cookie-notice' ), 'UZ' => __( 'Uzbekistan', 'cookie-notice' ), 'VU' => __( 'Vanuatu', 'cookie-notice' ), 'VA' => __( 'Vatican', 'cookie-notice' ), 'VE' => __( 'Venezuela', 'cookie-notice' ), 'VN' => __( 'Vietnam', 'cookie-notice' ), 'WF' => __( 'Wallis and Futuna', 'cookie-notice' ), 'EH' => __( 'Western Sahara', 'cookie-notice' ), 'WS' => __( 'Western Samoa', 'cookie-notice' ), 'YE' => __( 'Yemen', 'cookie-notice' ), 'ZM' => __( 'Zambia', 'cookie-notice' ), 'ZW' => __( 'Zimbabwe', 'cookie-notice' ) ); */ // set default text strings Cookie_Notice()->defaults['general']['message_text'] = __( 'We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.', 'cookie-notice' ); Cookie_Notice()->defaults['general']['accept_text'] = __( 'Ok', 'cookie-notice' ); Cookie_Notice()->defaults['general']['refuse_text'] = __( 'No', 'cookie-notice' ); Cookie_Notice()->defaults['general']['revoke_message_text'] = __( 'You can revoke your consent any time using the Revoke consent button.', 'cookie-notice' ); Cookie_Notice()->defaults['general']['revoke_text'] = __( 'Revoke consent', 'cookie-notice' ); Cookie_Notice()->defaults['general']['see_more_opt']['text'] = __( 'Privacy policy', 'cookie-notice' ); // set translation strings on plugin activation if ( Cookie_Notice()->options['general']['translate'] === true ) { Cookie_Notice()->options['general']['translate'] = false; Cookie_Notice()->options['general']['message_text'] = Cookie_Notice()->defaults['general']['message_text']; Cookie_Notice()->options['general']['accept_text'] = Cookie_Notice()->defaults['general']['accept_text']; Cookie_Notice()->options['general']['refuse_text'] = Cookie_Notice()->defaults['general']['refuse_text']; Cookie_Notice()->options['general']['revoke_message_text'] = Cookie_Notice()->defaults['general']['revoke_message_text']; Cookie_Notice()->options['general']['revoke_text'] = Cookie_Notice()->defaults['general']['revoke_text']; Cookie_Notice()->options['general']['see_more_opt']['text'] = Cookie_Notice()->defaults['general']['see_more_opt']['text']; update_option( 'cookie_notice_options', Cookie_Notice()->options['general'] ); } // WPML >= 3.2 if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) { $this->register_wpml_strings(); // WPML and Polylang compatibility } elseif ( function_exists( 'icl_register_string' ) ) { icl_register_string( 'Cookie Notice', 'Message in the notice', Cookie_Notice()->options['general']['message_text'] ); icl_register_string( 'Cookie Notice', 'Button text', Cookie_Notice()->options['general']['accept_text'] ); icl_register_string( 'Cookie Notice', 'Refuse button text', Cookie_Notice()->options['general']['refuse_text'] ); icl_register_string( 'Cookie Notice', 'Revoke message text', Cookie_Notice()->options['general']['revoke_message_text'] ); icl_register_string( 'Cookie Notice', 'Revoke button text', Cookie_Notice()->options['general']['revoke_text'] ); icl_register_string( 'Cookie Notice', 'Privacy policy text', Cookie_Notice()->options['general']['see_more_opt']['text'] ); icl_register_string( 'Cookie Notice', 'Custom link', Cookie_Notice()->options['general']['see_more_opt']['link'] ); } } /** * Add submenu. */ public function admin_menu_options() { add_menu_page( __( 'Cookie Notice', 'cookie-notice' ), __( 'Cookies', 'cookie-notice' ), apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ), 'cookie-notice', array( $this, 'options_page' ), 'none', '99.3' ); } /** * Options page output. * * @return mixed */ public function options_page() { echo '

' . __( 'Cookie Notice & Compliance for GDPR/CCPA', 'cookie-notice' ) . '

'; } /** * Regiseter plugin settings. */ public function register_settings() { register_setting( 'cookie_notice_options', 'cookie_notice_options', array( $this, 'validate_options' ) ); // compliance enabled if ( Cookie_Notice()->get_status() === 'active' ) { // configuration add_settings_section( 'cookie_notice_compliance', __( 'Compliance Settings', 'cookie-notice' ), array( $this, 'cn_section_compliance' ), 'cookie_notice_options' ); add_settings_field( 'cn_app_status', __( 'Compliance status', 'cookie-notice' ), array( $this, 'cn_app_status' ), 'cookie_notice_options', 'cookie_notice_compliance' ); add_settings_field( 'cn_app_id', __( 'App ID', 'cookie-notice' ), array( $this, 'cn_app_id' ), 'cookie_notice_options', 'cookie_notice_compliance' ); add_settings_field( 'cn_app_key', __( 'App Key', 'cookie-notice' ), array( $this, 'cn_app_key' ), 'cookie_notice_options', 'cookie_notice_compliance' ); add_settings_section( 'cookie_notice_configuration', __( 'Miscellaneous Settings', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' ); add_settings_field( 'cn_app_blocking', __( 'Autoblocking', 'cookie-notice' ), array( $this, 'cn_app_blocking' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_app_purge_cache', __( 'Cache', 'cookie-notice' ), array( $this, 'cn_app_purge_cache' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_script_placement', __( 'Script placement', 'cookie-notice' ), array( $this, 'cn_script_placement' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' ); // compliance disabled } else { // configuration add_settings_section( 'cookie_notice_compliance', __( 'Compliance Settings', 'cookie-notice' ), array( $this, 'cn_section_compliance' ), 'cookie_notice_options' ); add_settings_field( 'cn_app_status', __( 'Compliance status', 'cookie-notice' ), array( $this, 'cn_app_status' ), 'cookie_notice_options', 'cookie_notice_compliance' ); add_settings_field( 'cn_app_id', __( 'App ID', 'cookie-notice' ), array( $this, 'cn_app_id' ), 'cookie_notice_options', 'cookie_notice_compliance' ); add_settings_field( 'cn_app_key', __( 'App Key', 'cookie-notice' ), array( $this, 'cn_app_key' ), 'cookie_notice_options', 'cookie_notice_compliance' ); add_settings_section( 'cookie_notice_configuration', __( 'Notice Settings', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' ); add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_see_more', __( 'Privacy policy', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_refuse_opt', __( 'Refuse consent', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_revoke_opt', __( 'Revoke consent', 'cookie-notice' ), array( $this, 'cn_revoke_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_refuse_code', __( 'Script blocking', 'cookie-notice' ), array( $this, 'cn_refuse_code' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_redirection', __( 'Reloading', 'cookie-notice' ), array( $this, 'cn_redirection' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_on_scroll', __( 'On scroll', 'cookie-notice' ), array( $this, 'cn_on_scroll' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_on_click', __( 'On click', 'cookie-notice' ), array( $this, 'cn_on_click' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_time', __( 'Accepted expiry', 'cookie-notice' ), array( $this, 'cn_time' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_time_rejected', __( 'Rejected expiry', 'cookie-notice' ), array( $this, 'cn_time_rejected' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_script_placement', __( 'Script placement', 'cookie-notice' ), array( $this, 'cn_script_placement' ), 'cookie_notice_options', 'cookie_notice_configuration' ); add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' ); // design add_settings_section( 'cookie_notice_design', __( 'Notice Design', 'cookie-notice' ), array( $this, 'cn_section_design' ), 'cookie_notice_options' ); add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' ); add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' ); add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' ); add_settings_field( 'cn_css_class', __( 'Button class', 'cookie-notice' ), array( $this, 'cn_css_class' ), 'cookie_notice_options', 'cookie_notice_design' ); add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' ); } } /** * Section callback: fix for WP < 3.3 */ public function cn_section_configuration() {} public function cn_section_compliance() {} public function cn_section_design() {} /** * Compliance status. */ public function cn_app_status() { $app_status = Cookie_Notice()->get_status(); switch ( $app_status ) { case 'active': echo '
' . __( 'Notice', 'cookie-notice' ) . ': ' . __( 'Autoblocking', 'cookie-notice' ) . ': ' . __( 'Cookie Categories', 'cookie-notice' ) . ': ' . __( 'Proof-of-Consent', 'cookie-notice' ) . ':
' . __( 'Log in & Configure', 'cookie-notice' ) . '

' . __( 'Log into the Cookie Compliance™ web application and configure your Privacy Experience.', 'cookie-notice' ) . '

'; break; case 'pending': echo '
' . __( 'Notice', 'cookie-notice' ) . ': ' . __( 'Autoblocking', 'cookie-notice' ) . ': ' . __( 'Cookie Categories', 'cookie-notice' ) . ': ' . __( 'Proof-of-Consent', 'cookie-notice' ) . ':
' . __( 'Log in & Complete setup', 'cookie-notice' ) . '

' . __( 'Log into the Cookie Compliance™ web application and complete the setup process.', 'cookie-notice' ) . '

'; break; default: echo '
' . __( 'Notice', 'cookie-notice' ) . ': ' . __( 'Autoblocking', 'cookie-notice' ) . ': ' . __( 'Cookie Categories', 'cookie-notice' ) . ': ' . __( 'Proof-of-Consent', 'cookie-notice' ) . ':
' . __( 'Add GDPR/CCPA Compliance', 'cookie-notice' ) . '

' . __( 'Launch Cookie Compliance™ and add GDPR & CCPA compliance features.', 'cookie-notice' ) . '

'; break; } } /** * App welcome. */ public function cn_app_id() { echo '

' . __( 'Enter your Cookie Compliance™ application ID.', 'cookie-notice' ) . '

'; } /** * App ID option. */ public function cn_app_key() { echo '

' . __( 'Enter your Cookie Compliance™ application secret key.', 'cookie-notice' ) . '

'; } /** * App autoblocking. */ public function cn_app_blocking() { echo '

' . __( "In case you're experiencing issues with your site disable that feature temporarily.", 'cookie-notice' ) . '

'; } /** * App ID option. */ public function cn_app_purge_cache() { echo '
' . __( 'Purge Cache', 'cookie-notice' ) . '

' . __( 'Click the Purge Cache button to refresh the app configuration.', 'cookie-notice' ) . '

'; } /** * App Key option. */ public function cn_message_text() { echo '

' . __( 'Enter the cookie notice message.', 'cookie-notice' ) . '

'; } /** * Accept cookie label option. */ public function cn_accept_text() { echo '

' . __( 'The text of the option to accept the notice and make it disappear.', 'cookie-notice' ) . '

'; } /** * Enable/Disable third party non functional cookies option. */ public function cn_refuse_opt() { echo '
options['general']['refuse_opt'] === false ? ' style="display: none;"' : '' ) . '>

' . __( 'The text of the button to refuse the consent.', 'cookie-notice' ) . '

'; } /** * Non functional cookies code. */ public function cn_refuse_code() { $allowed_html = Cookie_Notice()->get_allowed_html(); $active = ! empty( Cookie_Notice()->options['general']['refuse_code'] ) && empty( Cookie_Notice()->options['general']['refuse_code_head'] ) ? 'body' : 'head'; echo '

' . __( 'The code to be used in your site header, before the closing head tag.', 'cookie-notice' ) . '

' . __( 'The code to be used in your site footer, before the closing body tag.', 'cookie-notice' ) . '

' . __( 'Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after the notice is accepted.', 'cookie-notice' ) . '
' . __( 'To get the user consent status use the cn_cookies_accepted() function.', 'cookie-notice' ) . '

'; } /** * Revoke cookies option. */ public function cn_revoke_opt() { echo '
options['general']['revoke_cookies'] ? '' : ' style="display: none;"' ) . '>

' . __( 'Enter the revoke message.', 'cookie-notice' ) . '

' . __( 'The text of the button to revoke the consent.', 'cookie-notice' ) . '

'; foreach ( $this->revoke_opts as $value => $label ) { echo ' '; } echo '

' . __( 'Select the method for displaying the revoke button - automatic (in the banner) or manual using [cookies_revoke] shortcode.', 'cookie-notice' ) . '

'; } /** * Redirection on cookie accept. */ public function cn_redirection() { echo '
'; } /** * Privacy policy link option. */ public function cn_see_more() { $pages = get_pages( array( 'sort_order' => 'ASC', 'sort_column' => 'post_title', 'hierarchical' => 0, 'child_of' => 0, 'parent' => -1, 'offset' => 0, 'post_type' => 'page', 'post_status' => 'publish' ) ); echo '
options['general']['see_more'] === false ? ' style="display: none;"' : '') . '>

' . __( 'The text of the privacy policy button.', 'cookie-notice' ) . '

' . __( 'Select where to redirect user for more information.', 'cookie-notice' ) . '

options['general']['see_more_opt']['link_type'] === 'custom' ? ' style="display: none;"' : '') . '>

' . __( 'Select from one of your site\'s pages.', 'cookie-notice' ) . '

'; global $wp_version; if ( version_compare( $wp_version, '4.9.6', '>=' ) ) { echo ' '; } echo '
'; } /** * Expiration time option. */ public function cn_time() { echo '

' . __( 'The amount of time that the cookie should be stored for when user accepts the notice.', 'cookie-notice' ) . '

'; } /** * Expiration time option. */ public function cn_time_rejected() { echo '

' . __( 'The amount of time that the cookie should be stored for when the user doesn\'t accept the notice.', 'cookie-notice' ) . '

'; } /** * Script placement option. */ public function cn_script_placement() { echo '
'; foreach ( $this->script_placements as $value => $label ) { echo ' '; } echo '

' . __( 'Select where all the plugin scripts should be placed.', 'cookie-notice' ) . '

'; } /** * Position option. */ public function cn_position() { echo '
'; foreach ( $this->positions as $value => $label ) { $value = esc_attr( $value ); echo ' '; } echo '

' . __( 'Select location for the notice.', 'cookie-notice' ) . '

'; } /** * Animation effect option. */ public function cn_hide_effect() { echo '
'; foreach ( $this->effects as $value => $label ) { $value = esc_attr( $value ); echo ' '; } echo '

' . __( 'Select the animation style.', 'cookie-notice' ) . '

'; } /** * On scroll option. */ public function cn_on_scroll() { echo '
options['general']['on_scroll'] === false || Cookie_Notice()->options['general']['on_scroll'] == false ? ' style="display: none;"' : '' ) . '> px

' . __( 'Number of pixels user has to scroll to accept the notice and make it disappear.', 'cookie-notice' ) . '

'; } /** * On click option. */ public function cn_on_click() { echo '
'; } /** * Delete plugin data on deactivation. */ public function cn_deactivation_delete() { echo '
'; } /** * CSS style option. */ public function cn_css_style() { echo '
'; foreach ( $this->styles as $value => $label ) { $value = esc_attr( $value ); echo ' '; } echo '

' . __( 'Select the buttons style.', 'cookie-notice' ) . '

'; } /** * CSS style option. */ public function cn_css_class() { echo '

' . __( 'Enter additional button CSS classes separated by spaces.', 'cookie-notice' ) . '

'; } /** * Colors option. */ public function cn_colors() { echo '
'; foreach ( $this->colors as $value => $label ) { $value = esc_attr( $value ); echo '

' . '
'; } // print_r( Cookie_Notice()->options['general']['colors'] ); echo '

' . '
'; echo '
'; } /** * Validate options. * * @param array $input * @return array */ public function validate_options( $input ) { if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) ) return $input; // get main instance $cn = Cookie_Notice(); if ( isset( $_POST['save_cookie_notice_options'] ) ) { // app id $input['app_id'] = sanitize_text_field( isset( $input['app_id'] ) ? $input['app_id'] : $cn->defaults['general']['app_id'] ); // app key $input['app_key'] = sanitize_text_field( isset( $input['app_key'] ) ? $input['app_key'] : $cn->defaults['general']['app_key'] ); // set app status if ( ! empty( $input['app_id'] ) && ! empty( $input['app_key'] ) ) { $app_status = esc_attr( $cn->welcome_api->get_app_status( $input['app_id'] ) ); update_option( 'cookie_notice_status', $app_status ); } else { update_option( 'cookie_notice_status', '' ); } // app blocking $input['app_blocking'] = (bool) isset( $input['app_blocking'] ); // position $input['position'] = sanitize_text_field( isset( $input['position'] ) && in_array( $input['position'], array_keys( $this->positions ) ) ? $input['position'] : $cn->defaults['general']['position'] ); // colors $input['colors']['text'] = sanitize_text_field( isset( $input['colors']['text'] ) && $input['colors']['text'] !== '' && preg_match( '/^#[a-f0-9]{6}$/', $input['colors']['text'] ) === 1 ? $input['colors']['text'] : $cn->defaults['general']['colors']['text'] ); $input['colors']['bar'] = sanitize_text_field( isset( $input['colors']['bar'] ) && $input['colors']['bar'] !== '' && preg_match( '/^#[a-f0-9]{6}$/', $input['colors']['bar'] ) === 1 ? $input['colors']['bar'] : $cn->defaults['general']['colors']['bar'] ); $input['colors']['bar_opacity'] = absint( isset( $input['colors']['bar_opacity'] ) && $input['colors']['bar_opacity'] >= 50 ? $input['colors']['bar_opacity'] : $cn->defaults['general']['colors']['bar_opacity'] ); // texts $input['message_text'] = wp_kses_post( isset( $input['message_text'] ) && $input['message_text'] !== '' ? $input['message_text'] : $cn->defaults['general']['message_text'] ); $input['accept_text'] = sanitize_text_field( isset( $input['accept_text'] ) && $input['accept_text'] !== '' ? $input['accept_text'] : $cn->defaults['general']['accept_text'] ); $input['refuse_text'] = sanitize_text_field( isset( $input['refuse_text'] ) && $input['refuse_text'] !== '' ? $input['refuse_text'] : $cn->defaults['general']['refuse_text'] ); $input['revoke_message_text'] = wp_kses_post( isset( $input['revoke_message_text'] ) && $input['revoke_message_text'] !== '' ? $input['revoke_message_text'] : $cn->defaults['general']['revoke_message_text'] ); $input['revoke_text'] = sanitize_text_field( isset( $input['revoke_text'] ) && $input['revoke_text'] !== '' ? $input['revoke_text'] : $cn->defaults['general']['revoke_text'] ); $input['refuse_opt'] = (bool) isset( $input['refuse_opt'] ); $input['revoke_cookies'] = isset( $input['revoke_cookies'] ); $input['revoke_cookies_opt'] = isset( $input['revoke_cookies_opt'] ) && array_key_exists( $input['revoke_cookies_opt'], $this->revoke_opts ) ? $input['revoke_cookies_opt'] : $cn->defaults['general']['revoke_cookies_opt']; // get allowed HTML $allowed_html = $cn->get_allowed_html(); // body refuse code $input['refuse_code'] = wp_kses( isset( $input['refuse_code'] ) && $input['refuse_code'] !== '' ? $input['refuse_code'] : $cn->defaults['general']['refuse_code'], $allowed_html ); // head refuse code $input['refuse_code_head'] = wp_kses( isset( $input['refuse_code_head'] ) && $input['refuse_code_head'] !== '' ? $input['refuse_code_head'] : $cn->defaults['general']['refuse_code_head'], $allowed_html ); // css button style $input['css_style'] = sanitize_text_field( isset( $input['css_style'] ) && in_array( $input['css_style'], array_keys( $this->styles ) ) ? $input['css_style'] : $cn->defaults['general']['css_style'] ); // css button class $input['css_class'] = sanitize_text_field( isset( $input['css_class'] ) ? $input['css_class'] : $cn->defaults['general']['css_class'] ); // link target $input['link_target'] = sanitize_text_field( isset( $input['link_target'] ) && in_array( $input['link_target'], array_keys( $this->link_targets ) ) ? $input['link_target'] : $cn->defaults['general']['link_target'] ); // time $input['time'] = sanitize_text_field( isset( $input['time'] ) && in_array( $input['time'], array_keys( $this->times ) ) ? $input['time'] : $cn->defaults['general']['time'] ); $input['time_rejected'] = sanitize_text_field( isset( $input['time_rejected'] ) && in_array( $input['time_rejected'], array_keys( $this->times ) ) ? $input['time_rejected'] : $cn->defaults['general']['time_rejected'] ); // script placement $input['script_placement'] = sanitize_text_field( isset( $input['script_placement'] ) && in_array( $input['script_placement'], array_keys( $this->script_placements ) ) ? $input['script_placement'] : $cn->defaults['general']['script_placement'] ); // hide effect $input['hide_effect'] = sanitize_text_field( isset( $input['hide_effect'] ) && in_array( $input['hide_effect'], array_keys( $this->effects ) ) ? $input['hide_effect'] : $cn->defaults['general']['hide_effect'] ); // redirection $input['redirection'] = isset( $input['redirection'] ); // on scroll $input['on_scroll'] = isset( $input['on_scroll'] ); // on scroll offset $input['on_scroll_offset'] = absint( isset( $input['on_scroll_offset'] ) && $input['on_scroll_offset'] !== '' ? $input['on_scroll_offset'] : $cn->defaults['general']['on_scroll_offset'] ); // on click $input['on_click'] = isset( $input['on_click'] ); // deactivation $input['deactivation_delete'] = isset( $input['deactivation_delete'] ); // privacy policy $input['see_more'] = isset( $input['see_more'] ); $input['see_more_opt']['text'] = sanitize_text_field( isset( $input['see_more_opt']['text'] ) && $input['see_more_opt']['text'] !== '' ? $input['see_more_opt']['text'] : $cn->defaults['general']['see_more_opt']['text'] ); $input['see_more_opt']['link_type'] = sanitize_text_field( isset( $input['see_more_opt']['link_type'] ) && in_array( $input['see_more_opt']['link_type'], array_keys( $this->links ) ) ? $input['see_more_opt']['link_type'] : $cn->defaults['general']['see_more_opt']['link_type'] ); if ( $input['see_more_opt']['link_type'] === 'custom' ) $input['see_more_opt']['link'] = ( $input['see_more'] === true ? esc_url( $input['see_more_opt']['link'] ) : '' ); elseif ( $input['see_more_opt']['link_type'] === 'page' ) { $input['see_more_opt']['id'] = ( $input['see_more'] === true ? (int) $input['see_more_opt']['id'] : 0 ); $input['see_more_opt']['sync'] = isset( $input['see_more_opt']['sync'] ); if ( $input['see_more_opt']['sync'] ) update_option( 'wp_page_for_privacy_policy', $input['see_more_opt']['id'] ); } // policy link position $input['link_position'] = sanitize_text_field( isset( $input['link_position'] ) && in_array( $input['link_position'], array_keys( $this->link_positions ) ) ? $input['link_position'] : $cn->defaults['general']['link_position'] ); // message link position? if ( $input['see_more'] === true && $input['link_position'] === 'message' && strpos( $input['message_text'], '[cookies_policy_link' ) === false ) $input['message_text'] .= ' [cookies_policy_link]'; $input['update_version'] = $cn->options['general']['update_version']; $input['update_notice'] = $cn->options['general']['update_notice']; $input['translate'] = false; // WPML >= 3.2 if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) { do_action( 'wpml_register_single_string', 'Cookie Notice', 'Message in the notice', $input['message_text'] ); do_action( 'wpml_register_single_string', 'Cookie Notice', 'Button text', $input['accept_text'] ); do_action( 'wpml_register_single_string', 'Cookie Notice', 'Refuse button text', $input['refuse_text'] ); do_action( 'wpml_register_single_string', 'Cookie Notice', 'Revoke message text', $input['revoke_message_text'] ); do_action( 'wpml_register_single_string', 'Cookie Notice', 'Revoke button text', $input['revoke_text'] ); do_action( 'wpml_register_single_string', 'Cookie Notice', 'Privacy policy text', $input['see_more_opt']['text'] ); if ( $input['see_more_opt']['link_type'] === 'custom' ) do_action( 'wpml_register_single_string', 'Cookie Notice', 'Custom link', $input['see_more_opt']['link'] ); } add_settings_error( 'cn_cookie_notice_options', 'save_cookie_notice_options', __( 'Settings saved.', 'iubenda' ), 'updated' ); // purge cache on save delete_transient( 'cookie_notice_compliance_cache' ); } elseif ( isset( $_POST['reset_cookie_notice_options'] ) ) { $input = $cn->defaults['general']; add_settings_error( 'cn_cookie_notice_options', 'reset_cookie_notice_options', __( 'Settings restored to defaults.', 'cookie-notice' ), 'updated' ); // set app status update_option( 'cookie_notice_status', '' ); // purge cache on save delete_transient( 'cookie_notice_compliance_cache' ); } return $input; } /** * Load scripts and styles - admin. */ public function admin_enqueue_scripts( $page ) { if ( $page !== 'toplevel_page_cookie-notice' ) return; wp_enqueue_script( 'cookie-notice-admin', plugins_url( '../js/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), Cookie_Notice()->defaults['version'] ); wp_localize_script( 'cookie-notice-admin', 'cnArgs', array( 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'cn-purge-cache' ), 'resetToDefaults' => __( 'Are you sure you want to reset these settings to defaults?', 'cookie-notice' ) ) ); wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_style( 'cookie-notice-admin', plugins_url( '../css/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) ); } /** * Load admin style inline, for menu icon only. * * @return mixed */ public function admin_print_styles() { echo ' '; } /** * Register WPML (>= 3.2) strings if needed. * * @return void */ private function register_wpml_strings() { // get main instance $cn = Cookie_Notice(); global $wpdb; // prepare strings $strings = array( 'Message in the notice' => $cn->options['general']['message_text'], 'Button text' => $cn->options['general']['accept_text'], 'Refuse button text' => $cn->options['general']['refuse_text'], 'Revoke message text' => $cn->options['general']['revoke_message_text'], 'Revoke button text' => $cn->options['general']['revoke_text'], 'Privacy policy text' => $cn->options['general']['see_more_opt']['text'], 'Custom link' => $cn->options['general']['see_more_opt']['link'] ); // get query results $results = $wpdb->get_col( $wpdb->prepare( "SELECT name FROM " . $wpdb->prefix . "icl_strings WHERE context = %s", 'Cookie Notice' ) ); // check results foreach( $strings as $string => $value ) { // string does not exist? if ( ! in_array( $string, $results, true ) ) { // register string do_action( 'wpml_register_single_string', 'Cookie Notice', $string, $value ); } } } /** * Display errors and notices. * * @global string $pagenow */ public function settings_errors() { global $pagenow; // force display notices in top menu settings page if ( $pagenow == 'options-general.php' ) return; settings_errors( 'cn_cookie_notice_options' ); } /** * Save compliance config caching. */ public function ajax_purge_cache() { if ( ! check_ajax_referer( 'cn-purge-cache', 'nonce' ) ) echo false; if ( ! current_user_can( apply_filters( 'cn_manage_cookie_notice_cap', 'manage_options' ) ) ) echo false; delete_transient( 'cookie_notice_compliance_cache' ); echo true; exit; } }