Support » Plugin: User Taxonomies » Life saver!!!

  • Really nice plugin! I modified it a little bit to accommodate multiple selection.

    1. Replaced the radiobutton field with following checkbox as shown below

    <input type="checkbox" name="<?php echo $key ?>[]" id="<?php echo "{$key}-{$term->slug}" ?>" value="<?php echo $term->slug ?>" <?php checked(true, is_object_in_term($user->ID, $key, $term)) ?> />

    2. Updated save_profile function as shown below

    $terms = (array) $_POST[$key];
    wp_set_object_terms($user_id, $terms, $key, false);

    I love this plugin!

  • The topic ‘Life saver!!!’ is closed to new replies.