Created
May 30, 2017 23:40
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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