Get Bricks

Filter: bricks/code/disallow_keywords

Bricks 1.3.7 introduces another level of security when using the Code element to run code, e.g. when the “execute code” setting is enabled.

With the filter bricks/code/disallow_keywords you’ll be able to prevent the code execution if specific keywords are found in the code block element 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;
} );