mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Additional @return clarifications for get_the_terms(), get_the_tag_list(), and get_the_term_list().
see #29183. Built from https://develop.svn.wordpress.org/trunk@29475 git-svn-id: http://core.svn.wordpress.org/trunk@29253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
093772f3c0
commit
ecc0ba7fb4
@ -1167,7 +1167,7 @@ function get_the_tags( $id = 0 ) {
|
||||
* @param string $sep Optional. Between tags.
|
||||
* @param string $after Optional. After tags.
|
||||
* @param int $id Optional. Post ID. Defaults to the current post.
|
||||
* @return string|bool|WP_Error A list of tags on success, false or WP_Error on failure.
|
||||
* @return string|bool|WP_Error A list of tags on success, false if there are no terms, WP_Error on failure.
|
||||
*/
|
||||
function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) {
|
||||
|
||||
@ -1240,7 +1240,8 @@ function term_description( $term = 0, $taxonomy = 'post_tag' ) {
|
||||
*
|
||||
* @param int|object $post Post ID or object.
|
||||
* @param string $taxonomy Taxonomy name.
|
||||
* @return array|bool|WP_Error Array of term objects on success, false if there are no terms, WP_Error on failure.
|
||||
* @return array|bool|WP_Error Array of term objects on success, false if there are no terms
|
||||
* or the post does not exist, WP_Error on failure.
|
||||
*/
|
||||
function get_the_terms( $post, $taxonomy ) {
|
||||
if ( ! $post = get_post( $post ) )
|
||||
@ -1279,7 +1280,7 @@ function get_the_terms( $post, $taxonomy ) {
|
||||
* @param string $before Optional. Before list.
|
||||
* @param string $sep Optional. Separate items using this.
|
||||
* @param string $after Optional. After list.
|
||||
* @return string|bool|WP_Error A list of terms on success, false or WP_Error on failure.
|
||||
* @return string|bool|WP_Error A list of terms on success, false if there are no terms, WP_Error on failure.
|
||||
*/
|
||||
function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) {
|
||||
$terms = get_the_terms( $id, $taxonomy );
|
||||
|
Loading…
Reference in New Issue
Block a user