Filter: bricks/dynamic_data/format_value
Filters the final processed value of any dynamic data tag before it is rendered. This is a powerful filter that runs for every dynamic tag, allowing you to globally modify outputs based on context or tag name.
Parameters
Section titled “Parameters”$value(mixed): The processed value of the dynamic tag.$tag(string): The dynamic data tag (e.g.,post_title,my_custom_tag).$post_id(int): The ID of the post context.$filters(array): Array of modifiers/arguments applied to the tag (e.g.,['fallback' => '...']).$context(string): The context where the tag is being rendered (e.g.,text,link,image,video,object,media).
Example usage
Section titled “Example usage”add_filter( 'bricks/dynamic_data/format_value', function( $value, $tag, $post_id, $filters, $context ) { // Example: Add a suffix to the post title when used in text context if ( $tag === 'post_title' && $context === 'text' ) { return $value . ' | My Site'; }
return $value;}, 10, 5 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.