WordPress function para convertir el selector de categorias a radio buttons
09 de Ene, 2015
Agregar el siguiente codigo en el functions.php del tema.
- function convert_root_cats_to_radio()
- {
- global $post_type;
- ?>
- < script type="text/javascript">
- jQuery("#activitycategorychecklist>li>label input").each(function(){
- this.disabled = "disabled";
- });
- jQuery("#activitycategorychecklist>li>ul>li>label input").each(function(){
- this.type = 'radio';
- });
- jQuery("#activitycategory-tabs li:odd").hide();
- <? php }
- add_action( 'admin_footer-post.php', 'convert_root_cats_to_radio' );
- add_action( 'admin_footer-post-new.php', 'convert_root_cats_to_radio' );