ACF_Location_Widget::get_values
Returns an array of possible values for this rule type.
Method of the class: ACF_Location_Widget{}
No Hooks.
Returns
Array.
Usage
$ACF_Location_Widget = new ACF_Location_Widget(); $ACF_Location_Widget->get_values( $rule );
- $rule(array) (required)
- A location rule.
Changelog
| Since 5.9.0 | Introduced. |
ACF_Location_Widget::get_values() ACF Location Widget::get values code ACF 6.0.4
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;
}