Posts, Post Types: Clarify the documentation about the return value of get_post() when a falsey value is passed.

Props Rahe, juliobox, peterwilsoncc, hellofromTonya, audrasjb

Fixes #33068

Built from https://develop.svn.wordpress.org/trunk@50266


git-svn-id: http://core.svn.wordpress.org/trunk@49911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2021-02-09 13:44:04 +00:00
parent 18c0b1c561
commit ea252a7cba
2 changed files with 4 additions and 2 deletions

View File

@ -751,7 +751,9 @@ function get_extended( $post ) {
*
* @global WP_Post $post Global post object.
*
* @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
* @param int|WP_Post|null $post Optional. Post ID or post object. `null`, `false`, `0` and other PHP falsey
* values return the current global post inside the loop. A numerically valid post
* ID that points to a non-existent post returns `null`. Defaults to global $post.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
* correspond to a WP_Post object, an associative array, or a numeric array,
* respectively. Default OBJECT.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.7-beta1-50265';
$wp_version = '5.7-beta1-50266';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.