ACF_Location_Post_Type::get_values
Returns an array of possible values for this rule type.
Method of the class: ACF_Location_Post_Type{}
No Hooks.
Returns
Array.
Usage
$ACF_Location_Post_Type = new ACF_Location_Post_Type(); $ACF_Location_Post_Type->get_values( $rule );
- $rule(array) (required)
- A location rule.
Changelog
| Since 5.9.0 | Introduced. |
ACF_Location_Post_Type::get_values() ACF Location Post Type::get values code ACF 6.8.8
public function get_values( $rule ) {
// Get post types.
$post_types = acf_get_post_types(
array(
'show_ui' => 1,
'exclude' => array( 'attachment' ),
)
);
// Return array of [type => label].
return acf_get_pretty_post_types( $post_types );
}