function my_print_footer_scripts() {
echo '<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function($){
$(".categorychecklist input[type=checkbox]").each(function(){
$check = $(this);
var checked = $check.attr("checked") ? \' checked="checked"\' : \'\';
$(\'<input type="radio" id="\' + $check.attr("id")
+ \'" name="\' + $check.attr("name") + \'"\'
+ checked
+ \' value="\' + $check.val()
+ \'"/>\'
).insertBefore($check);
$check.remove();
});
});
//]]>
</script>';
}
add_action('admin_print_footer_scripts', 'my_print_footer_scripts', 21);
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme