Filter: bricks/resolve_attachment_id
Filters an attachment ID before Bricks uses it for frontend output. This is useful for multilingual plugins or media integrations that need to resolve translated attachment IDs.
Bricks casts the filtered value with absint(). If the filtered value is empty or invalid, Bricks keeps the original attachment ID so image output does not break.
Parameters
Section titled “Parameters”$attachment_id(int): The attachment post ID Bricks is about to use.
Example usage
Section titled “Example usage”add_filter( 'bricks/resolve_attachment_id', function( $attachment_id ) { return $attachment_id;} );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.