Filter: RCB/Blocker/VisualParent

apply_filters( 'RCB/Blocker/VisualParent', $useVisualParent, $tag, $attributes ) → {boolean|string|number}

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 (since 2.0.4)
Name Type Description
$useVisualParent boolean | string | number
$tag string
$attributes array
  • 1.5.0
boolean | string | number