Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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