Instantly share code, notes, and snippets.

Embed
What would you like to do?
GravityView - Process shortcodes passed as attributes to the [gvlogic] shortcode
<?php
/**
* Process shortcodes passed as attributes to the [gvlogic] shortcode
*
* Requires GravityView 1.21.5+
*
* Example: [gvlogic if="[example]" is="[example]"] There's no example shortcode. [/example]
*
* @param GVLogic_Shortcode $GVLogic
*
* @return void
*/
function gravityview_gvlogic_parse_atts_do_shortcode( & $GVLogic ) {
if( $GVLogic->if ) {
$GVLogic->if = do_shortcode( $GVLogic->if );
}
}
add_action( 'gravityview/gvlogic/parse_atts/after', 'gravityview_gvlogic_parse_atts_do_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment