__get_users
A utility method that retrieves a collection of registered users.
REMINDER
The __get_users() is a public static method of Handy class. When using this static method, remember to apply the Scope Resolution Operator (::).
Parameters
| Name | Description |
|---|---|
| none | none |
Basic Usage
REMINDER
In this example, the select control's choices parameter will be supplied with __get_users().
// Select Control.
Handy::control( 'select', [
'id' => 'select_id',
'section' => 'layout_section',
'label' => esc_html__( 'Select Control', 'textdomain' ),
'priority' => 1,
'choices' => Handy::__get_users()
]);
Return
| Type | Value |
|---|---|
| array | [ 'user_id' => 'user_nicename', … ] |