Created
June 8, 2017 19:35
-
-
Save zackkatz/def9b295b80c4ae109760ffba200f498 to your computer and use it in GitHub Desktop.
GravityView - Process shortcodes passed as attributes to the [gvlogic] shortcode
This file contains 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
<?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