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.
Built from https://develop.svn.wordpress.org/trunk@52111


git-svn-id: http://core.svn.wordpress.org/trunk@51703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-11-10 15:32:01 +00:00
parent b6d67c1519
commit 5781b8c80e
2 changed files with 4 additions and 4 deletions

View File

@ -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' ) {

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-52110';
$wp_version = '5.9-alpha-52111';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.