WordPress.org

Make WordPress Core

Changeset 8882


Ignore:
Timestamp:
09/13/2008 06:18:44 PM (10 years ago)
Author:
ryan
Message:

Revert [8881], patch wasn't ready. see #7738

File:
1 edited

Legend:

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

    r8881 r8882  
    107107// Add avatars to relevant places in admin, or try to
    108108
    109 add_action('admin_init', 'floated_admin_avatar_handler');
    110 function floated_admin_avatar_handler() {
    111     global $pagenow;
    112     if ( 'edit-comments.php' == $pagenow || 'edit.php' == $pagenow ) {
    113         if ( get_option('show_avatars') )
    114             add_filter( 'comment_author', 'floated_admin_avatar' );
    115     }
    116 }
    117 
    118109function floated_admin_avatar( $name ) {
    119110    global $comment;
     
    129120
    130121    return "$avatar $name";
     122}
     123
     124if ( is_admin() && ('edit-comments.php' == $pagenow || 'edit.php' == $pagenow) ) {
     125    if ( get_option('show_avatars') )
     126        add_filter( 'comment_author', 'floated_admin_avatar' );
    131127}
    132128
Note: See TracChangeset for help on using the changeset viewer.