Make WordPress Core

Changeset 57759


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

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

Follow-up to [18716].

Props viralsampat, sabernhardt.
See #60021.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r56324 r57759  
    7070while ( have_comments() ) :
    7171    the_comment();
    72     $comment_post    = get_post( $comment->comment_post_ID );
     72    $comment_post = get_post( $comment->comment_post_ID );
     73    /**
     74     * @global WP_Post $post Global post object.
     75     */
    7376    $GLOBALS['post'] = $comment_post;
    7477    ?>
  • 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.