Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zackkatz/def9b295b80c4ae109760ffba200f498 to your computer and use it in GitHub Desktop.
Save zackkatz/def9b295b80c4ae109760ffba200f498 to your computer and use it in GitHub Desktop.
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