| @@ -69,9 +69,13 @@ | ||
| 69 | 69 | |
| 70 | 70 | add_action('wp_enqueue_scripts', '\CookieAdmin\Enduser::enqueue_scripts'); |
| 71 | 71 | |
| 72 | 72 | // Insert Cookie blocker in the head. |
| 73 | - //add_action('send_headers', '\CookieAdmin\Enduser::cookieadmin_block_cookie_init_php', 100); | |
| 73 | + add_action('send_headers', '\CookieAdmin\Enduser::cookieadmin_block_cookie_init_php', 100); | |
| 74 | + add_filter( 'rest_pre_serve_request', function ( $served ) { | |
| 75 | + \CookieAdmin\Enduser::cookieadmin_block_cookie_init_php(); | |
| 76 | + return $served; | |
| 77 | + }, 999 ); | |
| 74 | 78 | // add_action('init', '\CookieAdmin\Enduser::cookieadmin_block_cookie_head_js', 0); |
| 75 | 79 | |
| 76 | 80 | //add Cookie Banner to user page |
| 77 | 81 | if(!cookieadmin_is_editor_mode()){ |
| @@ -136,8 +140,12 @@ | ||
| 136 | 140 | if(isset($_GET['elementor-preview']) || (isset($_GET['action']) && $_GET['action'] == 'elementor')){ |
| 137 | 141 | return true; |
| 138 | 142 | } |
| 139 | 143 | |
| 144 | + if(isset($_GET['et_fb']) && ($_GET['et_fb'] == 1)){ | |
| 145 | + return true; | |
| 146 | + } | |
| 147 | + | |
| 140 | 148 | return false; |
| 141 | 149 | |
| 142 | 150 | } |
| 143 | 151 | |
| @@ -237,8 +245,10 @@ | ||
| 237 | 245 | 'logo_svg' => cookieadmin_logo_svg(), |
| 238 | 246 | 'plugin_url' => esc_url(COOKIEADMIN_PLUGIN_URL), |
| 239 | 247 | 'powered_by' => __('Powered by', 'cookieadmin'), |
| 240 | 248 | 'reconsent' => __('Re-consent', 'cookieadmin'), |
| 249 | + 'close' => __('Close', 'cookieadmin'), | |
| 250 | + 'cookie_consent' => __('Cookie Consent', 'cookieadmin'), | |
| 241 | 251 | 'cookie_preferences' => __('Cookie Preferences', 'cookieadmin'), |
| 242 | 252 | 'remark_standard' => __('Always Active', 'cookieadmin'), |
| 243 | 253 | 'remark' => __('Remark', 'cookieadmin'), |
| 244 | 254 | 'none' => __('None', 'cookieadmin'), |
| @@ -483,8 +493,11 @@ | ||
| 483 | 493 | 'placeholder' => true, |
| 484 | 494 | ); |
| 485 | 495 | |
| 486 | 496 | $allowed_tags['defs'] = array(); |
| 497 | + | |
| 498 | + // aria-modal is not part of the wp_kses post-context globals | |
| 499 | + $allowed_tags['div']['aria-modal'] = true; | |
| 487 | 500 | |
| 488 | 501 | $allowed_tags['a'] = array( |
| 489 | 502 | 'href' => true, |
| 490 | 503 | 'target' => true, |