benecaster_cookie_notice_output
Filters the full rendered HTML output of benecaster_cookie_notice. Returns empty string when the operator has not set any cookie notice text — the filter still fires in that case.
Return the complete HTML string for the shortcode. Cast with (string).
This value becomes the shortcode’s return value and is NOT escaped by Benecaster — WordPress emits it as the shortcode’s output. Escape every dynamic part yourself; this is the filter to be careful with, not the display-side ones that run through esc_html().
Returning '' makes the shortcode render nothing at all, which is the supported way to suppress it conditionally. The $atts parameter is the shortcode’s resolved attributes, so a callback can scope itself to one usage rather than every instance on the site.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$html |
string |
— | Full rendered shortcode HTML; empty string when no notice text is configured |
$text |
string |
— | The raw notice text as the operator configured it |
$atts |
array |
— | Resolved shortcode attributes |
Returns:
string
Affects
- benecaster_cookie_notice shortcode
Need this built rather than just documented? See our services →