ACF_Location_Current_User_Role::get_values() public ACF 5.9.0
Returns an array of possible values for this rule type.
{} Это метод класса: ACF_Location_Current_User_Role{}
Хуков нет.
Возвращает
Массив.
Использование
$ACF_Location_Current_User_Role = new ACF_Location_Current_User_Role(); $ACF_Location_Current_User_Role->get_values( $rule );
- $rule(массив) (обязательный)
- A location rule.
Список изменений
С версии 5.9.0 | Введена. |
Код ACF_Location_Current_User_Role::get_values() ACF Location Current User Role::get values ACF 5.9.1
public function get_values( $rule ) {
$choices = wp_roles()->get_names();
// Prepend Super Admin choice.
if( is_multisite() ) {
return array_merge(
array(
'super_admin' => __( 'Super Admin', 'acf' )
),
$choices
);
}
return $choices;
}