Creating user ID in an array
-
add_filter( 'gravityflow_assignee_field_users', 'sh_gravityflow_assignee_field_users', 10, 3 ); function sh_gravityflow_assignee_field_users( $users, $form_id, $field ) { $users = array( array( 'value' => 'user_id|2', 'text' => 'Joe' ), array( 'value' => 'user_id|3', 'text' => 'Jane' ), ); return $users; }
I want to include the current user ID and user name to be at the top list or first choice in that array field, or better still only output current user iD and user name in the array or drop down list, so if users login his name will only be the option available for selection from the array. if i can get one array or option of the current user i will be good.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Creating user ID in an array’ is closed to new replies.