Ticket #40481: 40481-1.patch
File 40481-1.patch, 1.7 KB (added by , 7 years ago) |
---|
-
wp-includes/post.php
2824 2824 * 2825 2825 * @since 2.3.0 2826 2826 * 2827 * @param int $post_id Optional. The Post ID. Does not default to the ID of the 2828 * global $post. Default 0. 2829 * @param array $args Optional. Overwrite the defaults 2830 * @return array List of post tags. 2827 * @param int $post_id Optional. The Post ID. Does not default to the ID of the 2828 * global $post. Default 0. 2829 * @param array $args Optional. Overwrite the defaults 2830 * @return array|WP_Error Array of WP_Term objects on success, an empty array if there are no 2831 * terms, or a WP_Error object if the `post_tag` taxonomy does not exist. 2831 2832 */ 2832 2833 function wp_get_post_tags( $post_id = 0, $args = array() ) { 2833 2834 return wp_get_post_terms( $post_id, 'post_tag', $args); … … 2846 2847 * global $post. Default 0. 2847 2848 * @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'. 2848 2849 * @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 object2850 * if `$taxonomy` doesn't exist.2850 * @return array|WP_Error Array of WP_Term objects on success or empty array if no terms were 2851 * found. WP_Error object if `$taxonomy` doesn't exist. 2851 2852 */ 2852 2853 function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array() ) { 2853 2854 $post_id = (int) $post_id;