Docs: Document the $post global in comment feed templates.

Follow-up to [18716].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-03-04 12:41:10 +00:00
parent 68f21dbbb6
commit 3dc3dc25e9
3 changed files with 9 additions and 3 deletions

View File

@ -70,6 +70,9 @@ do_action( 'rss_tag_pre', 'atom-comments' );
while ( have_comments() ) : while ( have_comments() ) :
the_comment(); the_comment();
$comment_post = get_post( $comment->comment_post_ID ); $comment_post = get_post( $comment->comment_post_ID );
/**
* @global WP_Post $post Global post object.
*/
$GLOBALS['post'] = $comment_post; $GLOBALS['post'] = $comment_post;
?> ?>
<entry> <entry>

View File

@ -73,6 +73,9 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
while ( have_comments() ) : while ( have_comments() ) :
the_comment(); the_comment();
$comment_post = get_post( $comment->comment_post_ID ); $comment_post = get_post( $comment->comment_post_ID );
/**
* @global WP_Post $post Global post object.
*/
$GLOBALS['post'] = $comment_post; $GLOBALS['post'] = $comment_post;
?> ?>
<item> <item>

View File

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