mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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
This commit is contained in:
@@ -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' ) {
|
||||
|
||||
Reference in New Issue
Block a user