Changeset 40483
- Timestamp:
- 04/19/2017 11:07:18 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r40054 r40483 2801 2801 * @param int $post_id Optional. The Post ID. Does not default to the ID of the 2802 2802 * global $post. Default 0. 2803 * @param array $args Optional. Category arguments. See wp_get_object_terms(). Default empty. 2804 * @return array List of categories. If the `$fields` argument passed via `$args` is 'all' or 2805 * 'all_with_object_id', an array of WP_Term objects will be returned. If `$fields` 2806 * is 'ids', an array of category ids. If `$fields` is 'names', an array of category names. 2803 * @param array $args Optional. Category query parameters. Default empty array. 2804 * See WP_Term_Query::__construct() for supported arguments. 2805 * @return array|WP_Error List of categories. If the `$fields` argument passed via `$args` is 'all' or 2806 * 'all_with_object_id', an array of WP_Term objects will be returned. If `$fields` 2807 * is 'ids', an array of category ids. If `$fields` is 'names', an array of category names. 2808 * WP_Error object if 'category' taxonomy doesn't exist. 2807 2809 */ 2808 2810 function wp_get_post_categories( $post_id = 0, $args = array() ) { … … 2827 2829 * @param int $post_id Optional. The Post ID. Does not default to the ID of the 2828 2830 * global $post. Default 0. 2829 * @param array $args Optional. Overwrite the defaults 2830 * @return array List of post tags. 2831 * @param array $args Optional. Tag query parameters. Default empty array. 2832 * See WP_Term_Query::__construct() for supported arguments. 2833 * @return array|WP_Error Array of WP_Term objects on success or empty array if no tags were found. 2834 * WP_Error object if 'post_tag' taxonomy doesn't exist. 2831 2835 */ 2832 2836 function wp_get_post_tags( $post_id = 0, $args = array() ) { … … 2846 2850 * global $post. Default 0. 2847 2851 * @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'. 2848 * @param array $args Optional. wp_get_object_terms() arguments. Default empty array. 2849 * @return array|WP_Error List of post terms or empty array if no terms were found. WP_Error object 2850 * if `$taxonomy` doesn't exist. 2852 * @param array $args Optional. Term query parameters. Default empty array. 2853 * See WP_Term_Query::__construct() for supported arguments. 2854 * @return array|WP_Error Array of WP_Term objects on success or empty array if no terms were found. 2855 * WP_Error object if `$taxonomy` doesn't exist. 2851 2856 */ 2852 2857 function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array() ) {
Note: See TracChangeset
for help on using the changeset viewer.