Docs: Document the `$post` global in REST API posts and revisions controllers.

Follow-up to [38832], [40601].

Props viralsampat.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57230


git-svn-id: http://core.svn.wordpress.org/trunk@56736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-12-28 15:19:20 +00:00
parent 45aea1a36d
commit a0b82585ab
3 changed files with 5 additions and 1 deletions

View File

@ -1742,6 +1742,8 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
* @since 4.7.0
* @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
*
* @global WP_Post $post Global post object.
*
* @param WP_Post $item Post object.
* @param WP_REST_Request $request Request object.
* @return WP_REST_Response Response object.

View File

@ -560,6 +560,8 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
* @since 4.7.0
* @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support.
*
* @global WP_Post $post Global post object.
*
* @param WP_Post $item Post revision object.
* @param WP_REST_Request $request Request object.
* @return WP_REST_Response Response object.

View File

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