Skip to content

Instantly share code, notes, and snippets.

@fastlinemedia
Created May 30, 2017 23:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fastlinemedia/a041976720138c2edda54377fd43ea6b to your computer and use it in GitHub Desktop.
Save fastlinemedia/a041976720138c2edda54377fd43ea6b to your computer and use it in GitHub Desktop.
Parses the specified shortcodes in Beaver Builder content that have been placed in HTML attrs as WordPress won't parse those.
add_filter( 'fl_builder_before_render_shortcodes', function( $content ) {
$shortcodes = array( 'field' ); // add other shortcodes here if needed
$pattern = get_shortcode_regex( $shortcodes );
$content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
return $content;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment