WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/09/2015 02:50:43 AM (6 years ago)
Author:
wonderboymusic
Message:

After [33891], get_comment() returns global $comment if no args are passed and the global is set (after setting the default to null here). This allows us to ditch global comment imports.

See #33638.

File:
1 edited

Legend:

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

    r33891 r33963  
    13121312 * @since 1.0.0
    13131313 *
    1314  * @global object $comment
    1315  *
    13161314 * @param string $text   Optional. Anchor text.
    13171315 * @param string $before Optional. Display before edit link.
     
    13191317 */
    13201318function edit_comment_link( $text = null, $before = '', $after = '' ) {
    1321     global $comment;
     1319    $comment = get_comment();
    13221320
    13231321    if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
Note: See TracChangeset for help on using the changeset viewer.