Last active
May 17, 2016 04:26
-
-
Save cliffordp/96c7522622380888b44bd19abed88897 to your computer and use it in GitHub Desktop.
Make the Event Categories' sub-categories expanded by default on the Community Events form
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 | |
/** | |
* From https://gist.github.com/cliffordp/96c7522622380888b44bd19abed88897 | |
* | |
* Make the Event Categories' sub-categories expanded by default on the Community Events form | |
* The initial CE form appears like this without this snippet in effect: http://cl.ly/3a0U430s1u3R | |
* | |
*/ | |
add_action( 'tribe_events_community_after_the_categories', 'cliff_tribe_community_events_form_taxonomies_expanded' ); | |
function cliff_tribe_community_events_form_taxonomies_expanded() { | |
?> | |
<script> | |
jQuery( document ).ready( function() { | |
jQuery( "#tribe-community-events #event-categories ul.tribe-categories-with-children > li" ).addClass( "tribe-expanded" ); | |
}); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment