Changeset 47930
- Timestamp:
- 06/09/2020 11:12:57 AM (5 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category.php
r47864 r47930 281 281 * 282 282 * @since 2.3.0 283 * @see get_terms() For list of arguments to pass. 284 * 285 * @param string|array $args Tag arguments to use when retrieving tags. 286 * @return WP_Term[]|int $tags Array of 'post_tag' term objects, or a count thereof. 283 * 284 * @param string|array $args { 285 * Optional. Arguments to retrieve tags. See get_terms() for additional options. 286 * 287 * @type string $taxonomy Taxonomy to retrieve terms for. Default 'post_tag'. 288 * } 289 * @return WP_Term[]|int|WP_Error $tags Array of 'post_tag' term objects, a count thereof, 290 * or WP_Error if any of the taxonomies do not exist. 287 291 */ 288 292 function get_tags( $args = '' ) { … … 293 297 294 298 if ( empty( $tags ) ) { 295 $ return= array();296 return $return;297 }298 299 /**300 * Filters the array of term objects returned for the 'post_tag' taxonomy.301 *302 * @since 2.3.0303 *304 * @param WP_Term[]|int $tags Array of 'post_tag' term objects, or a count thereof.305 * @param array $args An array of arguments. @see get_terms()306 */307 $tags = apply_filters( 'get_tags', $tags, $args );299 $tags = array(); 300 } else { 301 /** 302 * Filters the array of term objects returned for the 'post_tag' taxonomy. 303 * 304 * @since 2.3.0 305 * 306 * @param WP_Term[]|int|WP_Error $tags Array of 'post_tag' term objects, a count thereof, 307 * or WP_Error if any of the taxonomies do not exist. 308 * @param array $args An array of arguments. @see get_terms() 309 */ 310 $tags = apply_filters( 'get_tags', $tags, $args ); 311 } 308 312 309 313 return $tags; -
trunk/src/wp-includes/taxonomy.php
r47870 r47930 1134 1134 * @param array|string $args Optional. Array or string of arguments. See WP_Term_Query::__construct() 1135 1135 * for information on accepted arguments. Default empty. 1136 * @param array|string $deprecated Argument array, when using the legacy function parameter format. If present, this1137 * parameter will be interpreted as `$args`, and the first function parameter will1138 * be parsed as a taxonomy or array of taxonomies.1139 * @return WP_Term[]|int|WP_Error List of WP_Term instances and their children. Will return WP_Error, if any of taxonomies1140 * do not exist.1136 * @param array|string $deprecated Argument array, when using the legacy function parameter format. If present, 1137 * this parameter will be interpreted as `$args`, and the first function parameter 1138 * will be parsed as a taxonomy or array of taxonomies. 1139 * @return WP_Term[]|int|WP_Error Array of WP_Term instances, a count thereof, 1140 * or WP_Error if any of the taxonomies do not exist. 1141 1141 */ 1142 1142 function get_terms( $args = array(), $deprecated = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.