Created
February 24, 2020 23:31
-
-
Save bordoni/b8e701f951b36e69e2046433187e0ca8 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
<?php | |
add_filter( 'tribe_events_pro_shortcode_tribe_events_validate_arguments_map', function( $map, $shortcode ) { | |
$map['featured'] = function( $value ) { | |
if ( null === $value || 'null' === $value ) { | |
return null; | |
} | |
return tribe_is_truthy( $value ); | |
}; | |
return $map; | |
}, 15, 2 ); | |
add_filter( 'tribe_events_pro_shortcode_tribe_events_default_arguments', function( $default_arguments, $shortcode ) { | |
$default_arguments['featured'] = null; | |
return $default_arguments; | |
}, 15, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment