Last active
September 7, 2018 20:55
-
-
Save bskousen/0f0bbd5b4a5dc8680930a99e9644d4fa 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
add_filter( 'tribe_events_filter_values', 'demo_events_filter_values' ); | |
function demo_events_filter_values( $values ) { | |
foreach ( $values as $key => $value ) { | |
if ( isset( $value['data']['slug'] ) ) { | |
if ( '0' == $value['data']['slug'] ) { | |
unset( $values[ $key ] ); | |
$values = array_values( $values ); | |
} | |
} | |
} | |
return $values; | |
} | |
add_action( 'wp_footer', 'demo_wp_footer' ); | |
function demo_wp_footer() { | |
?> | |
<script>jQuery( 'select[name="tribe_eventcategory"]' ).removeAttr( 'disabled' );</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment