From c3b6a5f44c947e35403d41a3d182543069b24f53 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 10 Nov 2021 15:30:31 +0000 Subject: [PATCH] Docs: List the expected return type first in a few functions: * `get_previous_post()` * `get_next_post()` * `get_adjacent_post()`. Follow-up to [46696], [47060], [49929], [49963], [51286]. See #53399. git-svn-id: https://develop.svn.wordpress.org/trunk@52111 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/link-template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 31ffcf0a3c..b8a2c30768 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -1739,7 +1739,7 @@ function get_edit_user_link( $user_id = null ) { * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false. * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. - * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no + * @return WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no * corresponding post exists. */ function get_previous_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { @@ -1754,7 +1754,7 @@ function get_previous_post( $in_same_term = false, $excluded_terms = '', $taxono * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false. * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. - * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no + * @return WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no * corresponding post exists. */ function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { @@ -1774,7 +1774,7 @@ function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty string. * @param bool $previous Optional. Whether to retrieve previous post. Default true * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. - * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no + * @return WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no * corresponding post exists. */ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {