Filter: bricks/dynamic_data/do_action_context
Filters the action context used when Bricks resolves a dynamic data {do_action} tag. Use it to change the action name, pass arguments, or skip execution.
Parameters
Section titled “Parameters”$action_context(array): Action context with action, args, requested_action, and skip keys.$filters(array): Dynamic data filters parsed from the tag.$context(string): The dynamic data render context.$post(WP_Post|int|null): The current post context.
Example usage
Section titled “Example usage”add_filter( 'bricks/dynamic_data/do_action_context', function( $action_context, $filters, $context, $post ) { if ( $action_context['requested_action'] === 'my_public_alias' ) { $action_context['action'] = 'my_private_action'; $action_context['args'] = [ get_the_ID() ]; }
return $action_context;}, 10, 4 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Thanks for sharing feedback. We're using it to improve these docs.