Get Bricks

Filter: bricks/code/disallow_keywords

This filter introduces another level of security when using the Code element to run code.

With the filter bricks/code/disallow_keywords you’ll be able to prevent the code execution if specific keywords are found in the code, thus reducing the risk of using this element. To add keywords to this check, use the following example:

add_filter( 'bricks/code/disallow_keywords', function( $keywords ) {
  $keywords[] = 'wpdb';
  
  return $keywords;
} );