Make WordPress Core


Ignore:
Timestamp:
03/04/2024 12:39:54 PM (21 months ago)
Author:
SergeyBiryukov
Message:

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

Follow-up to [18716].

Props viralsampat, sabernhardt.
See #60021.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/feed-rss2-comments.php

    r55308 r57759  
    7373    while ( have_comments() ) :
    7474        the_comment();
    75         $comment_post    = get_post( $comment->comment_post_ID );
     75        $comment_post = get_post( $comment->comment_post_ID );
     76        /**
     77         * @global WP_Post $post Global post object.
     78         */
    7679        $GLOBALS['post'] = $comment_post;
    7780        ?>
Note: See TracChangeset for help on using the changeset viewer.