Uses
Uses | Description |
---|---|
wp-includes/taxonomy.php: get_term() | Get all Term data from database by Term ID. |
Creates an array of term objects from an array of term IDs.
Also discards invalid term objects.
(array) (Required) Term IDs.
(array)
File: wp-includes/class-wp-term-query.php
protected function populate_terms( $term_ids ) { $terms = array(); if ( ! is_array( $term_ids ) ) { return $terms; } foreach ( $term_ids as $key => $term_id ) { $term = get_term( $term_id ); if ( $term instanceof WP_Term ) { $terms[ $key ] = $term; } } return $terms; }
Version | Description |
---|---|
4.9.8 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_term_query/populate_terms