ACF_Location_Widget::get_values
Returns an array of possible values for this rule type.
Метод класса: ACF_Location_Widget{}
Хуков нет.
Возвращает
Массив.
Использование
$ACF_Location_Widget = new ACF_Location_Widget(); $ACF_Location_Widget->get_values( $rule );
- $rule(массив) (обязательный)
- A location rule.
Список изменений
| С версии 5.9.0 | Введена. |
Код ACF_Location_Widget::get_values() ACF Location Widget::get values ACF 6.4.2
public function get_values( $rule ) {
global $wp_widget_factory;
// Populate choices.
$choices = array(
'all' => __( 'All', 'acf' ),
);
if ( $wp_widget_factory->widgets ) {
foreach ( $wp_widget_factory->widgets as $widget ) {
$choices[ $widget->id_base ] = $widget->name;
}
}
return $choices;
}