Skip to content

Instantly share code, notes, and snippets.

@bskousen
Last active September 7, 2018 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bskousen/0f0bbd5b4a5dc8680930a99e9644d4fa to your computer and use it in GitHub Desktop.
Save bskousen/0f0bbd5b4a5dc8680930a99e9644d4fa to your computer and use it in GitHub Desktop.
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