Docs: Add missing description for $post global.

Props immeet94.
Fixes #46503. See #47110.
Built from https://develop.svn.wordpress.org/trunk@45742


git-svn-id: http://core.svn.wordpress.org/trunk@45553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-04 12:28:56 +00:00
parent 0cf1235477
commit 9967a3e030
18 changed files with 25 additions and 24 deletions

View File

@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* @global string $post_type
* @global WP_Post_Type $post_type_object
* @global WP_Post $post
* @global WP_Post $post Global post object.
*/
global $post_type, $post_type_object, $post;

View File

@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* @global string $post_type
* @global WP_Post_Type $post_type_object
* @global WP_Post $post
* @global WP_Post $post Global post object.
* @global string $title
* @global array $editor_styles
* @global array $wp_meta_boxes

View File

@ -3081,7 +3081,7 @@ function wp_ajax_send_attachment_to_editor() {
*
* @since 3.5.0
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
* @global WP_Embed $wp_embed
*/
function wp_ajax_send_link_to_editor() {
@ -3406,7 +3406,7 @@ function wp_ajax_query_themes() {
*
* @since 4.0.0
*
* @global WP_Post $post Global $post.
* @global WP_Post $post Global post object.
* @global WP_Embed $wp_embed Embed API instance.
* @global WP_Scripts $wp_scripts
* @global int $content_width
@ -3539,7 +3539,7 @@ function wp_ajax_parse_embed() {
/**
* @since 4.0.0
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
* @global WP_Scripts $wp_scripts
*/
function wp_ajax_parse_media_shortcode() {

View File

@ -533,7 +533,7 @@ class WP_Comments_List_Table extends WP_List_Table {
}
/**
* @global WP_Post $post
* @global WP_Post $post Global post object.
* @global WP_Comment $comment
*
* @param WP_Comment $item

View File

@ -611,7 +611,7 @@ class WP_Media_List_Table extends WP_List_Table {
}
/**
* @global WP_Post $post
* @global WP_Post $post Global post object.
*/
public function display_rows() {
global $post, $wp_query;

View File

@ -741,7 +741,7 @@ class WP_Posts_List_Table extends WP_List_Table {
/**
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Post $post
* @global WP_Post $post Global post object.
* @param array $pages
* @param int $pagenum
* @param int $per_page
@ -1260,7 +1260,7 @@ class WP_Posts_List_Table extends WP_List_Table {
}
/**
* @global WP_Post $post
* @global WP_Post $post Global post object.
*
* @param int|WP_Post $post
* @param int $level

View File

@ -25,7 +25,7 @@ define( 'WXR_VERSION', '1.2' );
* @since 2.1.0
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Post $post Global `$post`.
* @global WP_Post $post Global post object.
*
* @param array $args {
* Optional. Arguments for generating the WXR export file for download. Default empty array.

View File

@ -348,7 +348,7 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
*
* @since 4.1.0
*
* @global WP_Post $post The global `$post` object.
* @global WP_Post $post Global post object.
*/
function wp_print_revision_templates() {
global $post;

View File

@ -12,7 +12,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
/**
* @global string $post_type
* @global object $post_type_object
* @global WP_Post $post
* @global WP_Post $post Global post object.
*/
global $post_type, $post_type_object, $post;

View File

@ -30,7 +30,7 @@ $post_ID = $post_id;
/**
* @global string $post_type
* @global object $post_type_object
* @global WP_Post $post
* @global WP_Post $post Global post object.
*/
global $post_type, $post_type_object, $post;

View File

@ -3259,7 +3259,7 @@ class WP_Query {
*
* @since 1.5.0
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
*/
public function the_post() {
global $post;
@ -4326,7 +4326,7 @@ class WP_Query {
*
* @since 3.7.0
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
*/
public function reset_postdata() {
if ( ! empty( $this->post ) ) {

View File

@ -1303,7 +1303,7 @@ function wp_comment_form_unfiltered_html_nonce() {
* @since 1.5.0
*
* @global WP_Query $wp_query WordPress Query object.
* @global WP_Post $post
* @global WP_Post $post Global post object.
* @global wpdb $wpdb WordPress database abstraction object.
* @global int $id
* @global WP_Comment $comment

View File

@ -6346,7 +6346,7 @@ function wp_delete_file_from_directory( $file, $directory ) {
*
* @since 4.3.0
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
*/
function wp_post_preview_js() {
global $post;

View File

@ -584,7 +584,7 @@ function _wp_relative_upload_path( $path ) {
* @see get_posts()
* @todo Check validity of description.
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
*
* @param mixed $args Optional. User defined arguments for replacing the defaults. Default empty.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
@ -697,7 +697,7 @@ function get_extended( $post ) {
*
* @since 1.5.1
*
* @global WP_Post $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 string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
@ -3000,7 +3000,7 @@ function _reset_front_page_settings_for_post( $post_id ) {
update_option( 'page_on_front', 0 );
}
if ( get_option( 'page_for_posts' ) == $post->ID ) {
delete_option( 'page_for_posts', 0 );
delete_option( 'page_for_posts' );
}
}
unstick_post( $post->ID );

View File

@ -684,7 +684,7 @@ function locate_template( $template_names, $load = false, $require_once = true )
* @since 1.5.0
*
* @global array $posts
* @global WP_Post $post
* @global WP_Post $post Global post object.
* @global bool $wp_did_header
* @global WP_Query $wp_query WordPress Query object.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45741';
$wp_version = '5.3-alpha-45742';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -103,7 +103,8 @@ class WP_Widget_Custom_HTML extends WP_Widget {
*
* @since 4.8.1
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
* @param array $instance Settings for the current Custom HTML widget instance.

View File

@ -213,7 +213,7 @@ class WP_Widget_Text extends WP_Widget {
*
* @since 2.8.0
*
* @global WP_Post $post
* @global WP_Post $post Global post object.
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.