Created
August 8, 2016 17:27
-
-
Save niconerd-zz/b0e8e44c4bc5e396886d4d0af3ea7567 to your computer and use it in GitHub Desktop.
Tribe - custom JS to pre-select event categories in the new event page
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 | |
/* Tribe - custom JS to pre-select event categories in the new event page */ | |
function tribe_preselect_cat() { | |
?> | |
<script> | |
jQuery(document).ready( function( ) { | |
if ( jQuery('.post-new-php.post-type-tribe_events').length ) { | |
jQuery('#in-tribe_events_cat-7').attr('checked', 'checked'); | |
} | |
}); | |
</script> | |
<?php | |
} | |
add_action('admin_head', 'tribe_preselect_cat'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment