Make WordPress Core

Changeset 12287


Ignore:
Timestamp:
11/27/2009 12:57:35 PM (15 years ago)
Author:
azaozz
Message:

Reorder comment actions, fixes #11258

Location:
trunk/wp-admin/includes
Files:
2 edited

Legend:

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

    r12235 r12287  
    530530    $comment_link = '<a class="comment-link" href="' . esc_url(get_comment_link()) . '">#</a>';
    531531
    532     $actions = array();
    533 
    534532    $actions_string = '';
    535533    if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
     534        // preorder it: Approve | Reply | Edit | Trash | Spam
     535        $actions = array(
     536            'approve' => '', 'unapprove' => '',
     537            'reply' => '',
     538            'edit' => '',
     539            'trash' => '', 'delete' => '',
     540            'spam' => ''
     541        );
     542
    536543        $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
    537544        $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
     
    553560            $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
    554561
    555         $actions = apply_filters( 'comment_row_actions', $actions, $comment );
     562        $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
    556563
    557564        $i = 0;
  • trunk/wp-admin/includes/template.php

    r12286 r12287  
    21592159                <?php
    21602160                }
    2161                 $actions = array();
    21622161
    21632162                if ( $user_can ) {
     2163                    // preorder it: Approve | Reply | Quick Edit | Edit | Trash | Spam
     2164                    $actions = array(
     2165                        'approve' => '', 'unapprove' => '',
     2166                        'reply' => '',
     2167                        'quickedit' => '',
     2168                        'edit' => '',
     2169                        'trash' => '', 'untrash' => '', 'delete' => '',
     2170                        'spam' => '', 'unspam' => ''
     2171                    );
     2172
    21642173                    if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments
    21652174                        if ( 'approved' == $the_comment_status )
     
    21932202                    }
    21942203
    2195                     $actions = apply_filters( 'comment_row_actions', $actions, $comment );
     2204                    $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
    21962205
    21972206                    $i = 0;
Note: See TracChangeset for help on using the changeset viewer.