# Allow Your Functions in Bricks {echo} Tags

> Adds the PHP functions you trust to Bricks' allow list for {echo:function_name} dynamic data tags, which Bricks requires before it runs them.

- Type: PHP
- Runs: Run everywhere
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: bricks, dynamic-data, security
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/bricks-echo-function-allowlist/

## Code

```php
// Function names allowed in {echo:...} tags.
$wpide_bricks_echo_functions = array( 'wpide_current_year', 'get_bloginfo' );

add_filter( 'bricks/code/echo_function_names', function ( $names ) use ( $wpide_bricks_echo_functions ) {
    return array_values( array_unique( array_merge( (array) $names, $wpide_bricks_echo_functions ) ) );
} );

if ( ! function_exists( 'wpide_current_year' ) ) {
    function wpide_current_year() {
        return wp_date( 'Y' );
    }
}
```

## Notes

Only list functions you wrote or fully trust, that take no unsafe input and return a string.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Allow Your Functions in Bricks {echo} Tags" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
