Changeset 42875 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 03/25/2018 06:09:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r42843 r42875 72 72 * 73 73 * @param int $id Optional, default to current post ID. The post ID. 74 * @return arrayArray of WP_Term objects, one for each category assigned to the post.74 * @return WP_Term[] Array of WP_Term objects, one for each category assigned to the post. 75 75 */ 76 76 function get_the_category( $id = false ) { … … 92 92 * @since 4.4.0 Added `$id` parameter. 93 93 * 94 * @param array$categories An array of categories to return for the post.95 * @param int 94 * @param WP_Term[] $categories An array of categories to return for the post. 95 * @param int|false $id ID of the post. 96 96 */ 97 97 return apply_filters( 'get_the_categories', $categories, $id ); … … 142 142 * @since 4.4.0 143 143 * 144 * @param array$categories An array of the post's categories.145 * @param int|bool $post_id ID of the post we're retrieving categories for. When `false`, we assume the146 * current post in the loop.144 * @param WP_Term[] $categories An array of the post's categories. 145 * @param int|bool $post_id ID of the post we're retrieving categories for. When `false`, we assume the 146 * current post in the loop. 147 147 */ 148 148 $categories = apply_filters( 'the_category_list', get_the_category( $post_id ), $post_id ); … … 763 763 * @since 4.8.0 Added the `show_count` argument. 764 764 * 765 * @param array$tags Array of WP_Term objects to generate the tag cloud for.765 * @param WP_Term[] $tags Array of WP_Term objects to generate the tag cloud for. 766 766 * @param string|array $args { 767 767 * Optional. Array or string of arguments for generating a tag cloud. … … 851 851 * @since 2.8.0 852 852 * 853 * @param array$tags Ordered array of terms.854 * @param array $args An array of tag cloud arguments.853 * @param WP_Term[] $tags Ordered array of terms. 854 * @param array $args An array of tag cloud arguments. 855 855 */ 856 856 $tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args ); … … 1005 1005 * or an array of tag links if the 'format' argument 1006 1006 * equals 'array'. 1007 * @param array$tags An array of terms used in the tag cloud.1007 * @param WP_Term[] $tags An array of terms used in the tag cloud. 1008 1008 * @param array $args An array of wp_generate_tag_cloud() arguments. 1009 1009 */ … … 1123 1123 * @see get_the_terms() 1124 1124 * 1125 * @param array$terms An array of tags for the given post.1125 * @param WP_Term[] $terms An array of tags for the given post. 1126 1126 */ 1127 1127 return apply_filters( 'get_the_tags', get_the_terms( $id, 'post_tag' ) ); … … 1214 1214 * @since 2.5.0 1215 1215 * 1216 * @param int| object $postPost ID or object.1217 * @param string $taxonomy Taxonomy name.1218 * @return array|false|WP_Error Array of WP_Term objects on success, false if there are no terms1219 * or the post does not exist, WP_Error on failure.1216 * @param int|WP_Post $post Post ID or object. 1217 * @param string $taxonomy Taxonomy name. 1218 * @return WP_Term[]|false|WP_Error Array of WP_Term objects on success, false if there are no terms 1219 * or the post does not exist, WP_Error on failure. 1220 1220 */ 1221 1221 function get_the_terms( $post, $taxonomy ) { … … 1238 1238 * @since 3.1.0 1239 1239 * 1240 * @param array|WP_Error $terms Listof attached terms, or WP_Error on failure.1241 * @param int $post_id Post ID.1242 * @param string $taxonomy Name of the taxonomy.1240 * @param WP_Term[]|WP_Error $terms Array of attached terms, or WP_Error on failure. 1241 * @param int $post_id Post ID. 1242 * @param string $taxonomy Name of the taxonomy. 1243 1243 */ 1244 1244 $terms = apply_filters( 'get_the_terms', $terms, $post->ID, $taxonomy ); … … 1292 1292 * @since 2.5.0 1293 1293 * 1294 * @param array$links An array of term links.1294 * @param string[] $links An array of term links. 1295 1295 */ 1296 1296 $term_links = apply_filters( "term_links-{$taxonomy}", $links );
Note: See TracChangeset
for help on using the changeset viewer.