Created
March 7, 2021 22:29
-
-
Save wpexplorer/ddfaed79464adf1a3c109f93c9281001 to your computer and use it in GitHub Desktop.
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
// Set the "animate_onscroll" parameter for all Total vcex_ shortcodes to true by default. | |
// Note this example filters ALL shortcodes but you can use the $shortcode_tag argument to check | |
// which shortcode is currently being filtered. | |
add_filter( 'vcex_shortcode_params', function( $params, $shortcode_tag ) { | |
foreach ( $params as $key => $val ) { | |
if ( isset( $val['param_name'] ) && 'animate_onscroll' === $val['param_name'] ) { | |
$params[$key]['std'] = 'true'; | |
} | |
} | |
return $params; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment