Make WordPress Core


Ignore:
Timestamp:
09/09/2015 02:50:43 AM (8 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-admin/includes/comment.php

    r33891 r33963  
    157157 * @since 2.5.0
    158158 *
    159  * @global object $comment
    160  *
    161159 * @param string $name User name.
    162160 * @return string Avatar with Admin name.
    163161 */
    164162function floated_admin_avatar( $name ) {
    165     global $comment;
    166     $avatar = get_avatar( $comment, 32, 'mystery' );
     163    $avatar = get_avatar( get_comment(), 32, 'mystery' );
    167164    return "$avatar $name";
    168165}
Note: See TracChangeset for help on using the changeset viewer.