Changeset 49947 for trunk/src/wp-includes/class-wp-term-query.php
- Timestamp:
- 01/08/2021 03:22:17 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-term-query.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-term-query.php
r49946 r49947 286 286 287 287 /** 288 * Sets up the query for retrieving terms. 288 * Sets up the query and retrieves the results. 289 * 290 * The return type varies depending on the value passed to `$args['fields']`. See 291 * WP_Term_Query::get_terms() for details. 289 292 * 290 293 * @since 4.6.0 291 294 * 292 295 * @param string|array $query Array or URL query string of parameters. 293 * @return array|int List of terms, or number of terms when 'count' is passed as a query var. 296 * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string 297 * when 'count' is passed as a query var. 294 298 */ 295 299 public function query( $query ) { … … 299 303 300 304 /** 301 * Get terms, based on query_vars. 305 * Retrieves the query results. 306 * 307 * The return type varies depending on the value passed to `$args['fields']`. 308 * 309 * The following will result in an array of `WP_Term` objects being returned: 310 * 311 * - 'all' 312 * - 'all_with_object_id' 313 * 314 * The following will result in a numeric string being returned: 315 * 316 * - 'count' 317 * 318 * The following will result in an array of text strings being returned: 319 * 320 * - 'id=>name' 321 * - 'id=>slug' 322 * - 'names' 323 * - 'slugs' 324 * 325 * The following will result in an array of numeric strings being returned: 326 * 327 * - 'id=>parent' 328 * 329 * The following will result in an array of integers being returned: 330 * 331 * - 'ids' 332 * - 'tt_ids' 333 * 334 * In all cases, a `WP_Error` object will be returned if an invalid taxonomy is used. 302 335 * 303 336 * @since 4.6.0 … … 305 338 * @global wpdb $wpdb WordPress database abstraction object. 306 339 * 307 * @return array List of terms. 340 * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string 341 * when 'count' is passed as a query var. 308 342 */ 309 343 public function get_terms() {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)