Constants

HTML_ATTRIBUTE_CAPTURE_PREFIX

HTML_ATTRIBUTE_CAPTURE_PREFIX ='consent-original'

When transforming a blocked attribute, it gets prefixed and suffixed.

HTML_ATTRIBUTE_CAPTURE_CLICK_PREFIX

HTML_ATTRIBUTE_CAPTURE_CLICK_PREFIX ='consent-click-original'

HTML_ATTRIBUTE_CAPTURE_SUFFIX

HTML_ATTRIBUTE_CAPTURE_SUFFIX ='_'

HTML_ATTRIBUTE_BLOCKER_ID

HTML_ATTRIBUTE_BLOCKER_ID ='consent-id'

The ID of the `Blockable` for which we need consent for.

HTML_ATTRIBUTE_BY

HTML_ATTRIBUTE_BY ='consent-by'

Usually, this is `cookie`, but you could also implement different types like `tcf-vendor` or similar. So, in frontend you can implement different "checking for consent"-mechanism.

HTML_ATTRIBUTE_VISUAL_PARENT

HTML_ATTRIBUTE_VISUAL_PARENT ='consent-visual-use-parent'

A tag got blocked, e. g. `iframe`. We can now determine the "Visual Parent". The visual parent is the closest parent where the content blocker should be placed to. The visual parent can be configured as follow:

  • false = Use original element
  • true = Use parent element
  • number = Go upwards x element (parentElement)
  • string = Go upwards until parentElement matches a selector
  • string = Starting with children: you can querySelector down to create the visual parent for a children

HTML_ATTRIBUTE_UNBLOCKED_TRANSACTION_COMPLETE

HTML_ATTRIBUTE_UNBLOCKED_TRANSACTION_COMPLETE ='consent-transaction-complete'

This constant is only used in frontend and is added afterwards a unblock transaction got completed.

HTML_ATTRIBUTE_TYPE_FOR

HTML_ATTRIBUTE_TYPE_FOR =array('script', 'style')

Caching plugins compatibility e.g. WP Rocket. Adds this `type` to your `script` and `style` so it gets not combined to a combine-file for example.

HTML_ATTRIBUTE_TYPE_NAME

HTML_ATTRIBUTE_TYPE_NAME ='type'

HTML_ATTRIBUTE_TYPE_VALUE

HTML_ATTRIBUTE_TYPE_VALUE ='application/consent'

HTML_ATTRIBUTE_TYPE_JS

HTML_ATTRIBUTE_TYPE_JS ='application/javascript'

HTML_ATTRIBUTE_TYPE_CSS

HTML_ATTRIBUTE_TYPE_CSS ='text/css'

HTML_ATTRIBUTE_INLINE_STYLE

HTML_ATTRIBUTE_INLINE_STYLE ='consent-inline-style'

Blocked styles are put into an own attribute instead of the `script` body to avoid that caching plugins like WP Rocket will bundle them in a minified file.

URL_QUERY_ARG_ORIGINAL_URL_IN_STYLE

URL_QUERY_ARG_ORIGINAL_URL_IN_STYLE ='consent-original-url'

HTML_ATTRIBUTE_INLINE

HTML_ATTRIBUTE_INLINE ='consent-inline'

HTML_POTENTIAL_SKIP_TAGS

HTML_POTENTIAL_SKIP_TAGS =array('script', 'link', 'style')

HTML_ATTRIBUTE_VISUAL_ID

HTML_ATTRIBUTE_VISUAL_ID ='consent-visual-id'

See `CalculateUniqueKeys`.

HTML_ATTRIBUTE_THUMBNAIL

HTML_ATTRIBUTE_THUMBNAIL ='consent-thumbnail'

See `ImagePreview`.

HTML_ATTRIBUTE_THUMBNAIL_SUGGESTION

HTML_ATTRIBUTE_THUMBNAIL_SUGGESTION ='consent-thumbnail-suggestion'

HTML_ATTRIBUTE_REATTACH_DOM

HTML_ATTRIBUTE_REATTACH_DOM ='consent-redom'

See `ReattachDom`

HTML_ATTRIBUTE_CLICK_DISPATCH_RESIZE

HTML_ATTRIBUTE_CLICK_DISPATCH_RESIZE ='consent-click-dispatch-resize'

If set it will trigger a window resize event when the unblocked item got clicked (or delegated a click).

This needs to be defined as number as it can be delayed. Use 0 for instant dispatch.