Created
August 14, 2012 09:54
-
-
Save mojowill/3347920 to your computer and use it in GitHub Desktop.
User Select for Rilwis Custom Meta Boxes
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 | |
$users_list = array(); | |
$users = get_users(); | |
if ( !empty( $users ) ) | |
$users_list = array_combine( wp_list_pluck( $users, 'ID' ), wp_list_pluck( $users, 'display_name' ) ); | |
$meta_box = array( | |
'title' => 'Project Information', | |
'pages' => array( 'project' ), | |
'fields' => array( | |
array( | |
'name' => 'Member', | |
'id' => 'member', | |
'type' => 'select', | |
'options' => $users_list, | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment