Make WordPress Core

Changeset 15512


Ignore:
Timestamp:
08/20/2010 11:18:41 AM (16 years ago)
Author:
scribu
Message:

Add the floated_admin_avatar filter from WP_Comments_Table. See #14637

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r15508 r15512  
    633633                die('1');
    634634
    635         if ( get_option('show_avatars') )
    636                 add_filter( 'comment_author', 'floated_admin_avatar' );
    637 
    638635        $x = new WP_Ajax_Response();
    639636        foreach ( $table->items as $comment ) {
    … …  
    728725        $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
    729726
    730         if ( get_option('show_avatars') && 'single' != $mode )
    731                 add_filter( 'comment_author', 'floated_admin_avatar' );
    732 
    733727        $x = new WP_Ajax_Response();
    734728
    … …  
    770764        $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
    771765        $comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
    772 
    773         if ( get_option('show_avatars') && 'single' != $mode )
    774                 add_filter( 'comment_author', 'floated_admin_avatar' );
    775766
    776767        require_once( './includes/default-list-tables.php' );
  • trunk/wp-admin/includes/comment.php

    r13420 r15512  
    159159                wp_enqueue_script( 'jquery-table-hotkeys' );
    160160}
    161 
    162 if ( is_admin() && isset($pagenow) && ('edit-comments.php' == $pagenow || 'edit.php' == $pagenow) ) {
    163         if ( get_option('show_avatars') )
    164                 add_filter( 'comment_author', 'floated_admin_avatar' );
    165 }
    166 
    167161?>
  • trunk/wp-admin/includes/default-list-tables.php

    r15509 r15512  
    19301930
    19311931        function WP_Comments_Table() {
     1932                global $mode;
     1933
     1934                $mode = ( empty( $_REQUEST['mode'] ) ) ? 'detail' : $_REQUEST['mode'];
     1935
     1936                if ( get_option('show_avatars') && 'single' != $mode )
     1937                        add_filter( 'comment_author', 'floated_admin_avatar' );
     1938
    19321939                parent::WP_List_Table( array(
    19331940                        'screen' => 'edit-comments',
    … …  
    19421949
    19431950        function prepare_items() {
    1944                 global $post_id, $comment_status, $mode, $search;
     1951                global $post_id, $comment_status, $search;
    19451952
    19461953                $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
    1947 
    1948                 $mode = ( empty( $_REQUEST['mode'] ) ) ? 'detail' : $_REQUEST['mode'];
    19491954
    19501955                $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
Note: See TracChangeset for help on using the changeset viewer.