Inventory_Presser_REST::get_the_type_slugs( array $post_object )
Given a post object, returns the term slugs of the type taxonomy.
On This Page
Parameters Parameters
- $post_object
-
(array) (Required) An array representing a post object.
Return Return
(array) Term slugs of the type taxonomy.
Source Source
File: includes/class-rest.php
public function get_the_type_slugs( $post_object ) { $terms = get_the_terms( $post_object['id'], 'type' ); if ( is_array( $terms ) ) { return wp_list_pluck( $terms, 'slug' ); } return array(); }
Expand full source codeCollapse full source codeView on Github