wp_dropdown_users Change in Version 3.3.1
-
wp_dropdown_users( $args ); has changed with the most recent update to wordpress 3.3.1. It used to give the value of whatever you chose to display.
wp_dropdown_users(array(‘name’ => ‘users1’)); ?> used to create a drop down called users1 of all users with their display_name and used that as the value in the drop down. With the current update the value has changed the the user_ID. I did not see any way to update the value option of the drop down function.
My solution was to pass the ID and use it through get_userdata( $userid ); but i thought there should be an update/patch-note made to wp_dropdown_users( $args );
OLD CODE PRE UPDATE
<select class=”” id=”user1″ name=”user1″>
<option value=”Amy”>Amy</option>
<option value=”Andie”>Andie</option>
<option value=”Danielle”>Danielle</option>
</select>New Code
<select class=”” id=”user1″ name=”user1″>
<option value=”24″>Amy</option>
<option value=”32″>Andie</option>
<option value=”68″>Danielle</option>
</select>
- The topic ‘wp_dropdown_users Change in Version 3.3.1’ is closed to new replies.