benecaster_access_gate_output
Filters the final rendered output of [benecaster_access_gate], after the taken branch has run through do_shortcode().
Website only, same as benecaster_access_gate_passes — does not fire when the RSS feed resolves a gate.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$output |
string |
— | The rendered output of the taken branch (empty string when that branch is empty). |
$passes |
bool |
— | Whether the visitor passed the gate (which branch was taken). |
$show_id |
int |
— | ID of the show the gate resolved to, or 0. |
$atts |
array |
— | The shortcode's resolved attributes (show_id, buyup, id, grant). |
Returns:
string
Example
add_filter( 'benecaster_access_gate_output', function ( string $output, bool $passes, int $show_id, array $atts ): string {
// Mark delivered extras so a theme can style them.
return $passes ? '<div class="my-addon-extra">' . $output . '</div>' : $output;
}, 10, 4 );
Need this built rather than just documented? See our services →