Make WordPress Core

Changeset 36512


Ignore:
Timestamp:
02/12/2016 04:09:46 AM (9 years ago)
Author:
boonebgorges
Message:

Set the $comment global in comment_form_title().

In [33963], comment_form_title() was refactored so that it no longer made
reference to the $comment global. This broke some functionality within the
comment form, as certain template would no longer be able to access the
"current" comment.

Props d4z_c0nf, WisdmLabs, boonebgorges.
Fixes #35624.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r36499 r36512  
    18181818 */
    18191819function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = true ) {
    1820     $comment = get_comment();
     1820    global $comment;
    18211821
    18221822    if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' );
     
    18281828        echo $noreplytext;
    18291829    else {
     1830        // Sets the global so that template tags can be used in the comment form.
    18301831        $comment = get_comment($replytoid);
    18311832        $author = ( $linktoparent ) ? '<a href="#comment-' . get_comment_ID() . '">' . get_comment_author( $comment ) . '</a>' : get_comment_author( $comment );
Note: See TracChangeset for help on using the changeset viewer.