Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r12162 r12311  
    178178                $output .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
    179179                $output .= '<div class="name">' . $qe_data->name . '</div>';
    180                 $output .= '<div class="slug">' . $qe_data->slug . '</div>';
     180                $output .= '<div class="slug">' . apply_filters('editable_slug', $qe_data->slug) . '</div>';
    181181                $output .= '<div class="cat_parent">' . $qe_data->parent . '</div></div></td>';
    182182                break;
     
    185185                break;
    186186            case 'slug':
    187                 $output .= "<td $attributes>$category->slug</td>";
     187                $output .= "<td $attributes>" . apply_filters('editable_slug', $category->slug) . "</td>";
    188188                break;
    189189            case 'posts':
     
    348348                $output .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
    349349                $output .= '<div class="name">' . $qe_data->name . '</div>';
    350                 $output .= '<div class="slug">' . $qe_data->slug . '</div>';
     350                $output .= '<div class="slug">' . apply_filters('editable_slug', $qe_data->slug) . '</div>';
    351351                $output .= '<div class="cat_parent">' . $qe_data->parent . '</div></div></td>';
    352352                break;
     
    355355                break;
    356356            case 'slug':
    357                 $output .= "<td $attributes>$category->slug</td>";
     357                $output .= "<td $attributes>" . apply_filters('editable_slug', $category->slug) . "</td>";
    358358                break;
    359359            case 'links':
     
    682682                    $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
    683683                    $out .= '<div class="name">' . $qe_data->name . '</div>';
    684                     $out .= '<div class="slug">' . $qe_data->slug . '</div></div></td>';
     684                    $out .= '<div class="slug">' . apply_filters('editable_slug', $qe_data->slug) . '</div></div></td>';
    685685                    break;
    686686                case 'description':
     
    688688                    break;
    689689                case 'slug':
    690                     $out .= "<td $attributes>$tag->slug</td>";
     690                    $out .= "<td $attributes>" . apply_filters('editable_slug', $tag->slug) . "</td>";
    691691                    break;
    692692                case 'posts':
     
    10611061
    10621062        $authors = get_editable_user_ids( $current_user->id, true, $type ); // TODO: ROLE SYSTEM
     1063        $authors_dropdown = '';
    10631064        if ( $authors && count( $authors ) > 1 ) :
    10641065            $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1, 'echo' => 0);
    10651066            if ( $bulk )
    10661067                $users_opt['show_option_none'] = __('- No Change -');
    1067 
    1068         $authors_dropdown  = '<label>';
    1069         $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
    1070         $authors_dropdown .= wp_dropdown_users( $users_opt );
    1071         $authors_dropdown .= '</label>';
     1068            $authors_dropdown  = '<label>';
     1069            $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
     1070            $authors_dropdown .= wp_dropdown_users( $users_opt );
     1071            $authors_dropdown .= '</label>';
    10721072
    10731073        endif; // authors
     
    12961296<div class="hidden" id="inline_' . $post->ID . '">
    12971297    <div class="post_title">' . $title . '</div>
    1298     <div class="post_name">' . $post->post_name . '</div>
     1298    <div class="post_name">' . apply_filters('editable_slug', $post->post_name) . '</div>
    12991299    <div class="post_author">' . $post->post_author . '</div>
    13001300    <div class="comment_status">' . $post->comment_status . '</div>
     
    21152115        $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
    21162116
    2117         $delete_url = esc_url( "comment.php?action=deletecomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
    21182117        $approve_url = esc_url( "comment.php?action=approvecomment&p=$post->ID&c=$comment->comment_ID&$approve_nonce" );
    21192118        $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$post->ID&c=$comment->comment_ID&$approve_nonce" );
    2120         $spam_url = esc_url( "comment.php?action=deletecomment&dt=spam&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
     2119        $spam_url = esc_url( "comment.php?action=spamcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
     2120        $unspam_url = esc_url( "comment.php?action=unspamcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
    21212121        $trash_url = esc_url( "comment.php?action=trashcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
    21222122        $untrash_url = esc_url( "comment.php?action=untrashcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
     2123        $delete_url = esc_url( "comment.php?action=deletecomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
    21232124    }
    21242125
     
    21582159                <?php
    21592160                }
    2160                 $actions = array();
    21612161
    21622162                if ( $user_can ) {
    2163                     if ( 'trash' == $the_comment_status ) {
    2164                         $actions['untrash'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:ABF888:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
    2165                         $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
     2163                    // preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash
     2164                    $actions = array(
     2165                        'approve' => '', 'unapprove' => '',
     2166                        'reply' => '',
     2167                        'quickedit' => '',
     2168                        'edit' => '',
     2169                        'spam' => '', 'unspam' => '',
     2170                        'trash' => '', 'untrash' => '', 'delete' => ''
     2171                    );
     2172
     2173                    if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments
     2174                        if ( 'approved' == $the_comment_status )
     2175                            $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
     2176                        else if ( 'unapproved' == $the_comment_status )
     2177                            $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=approved vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    21662178                    } else {
    21672179                        $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    21682180                        $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
    2169 
    2170                         if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments
    2171                             if ( 'approved' == $the_comment_status ) {
    2172                                 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
    2173                                 unset($actions['approve']);
    2174                             } else {
    2175                                 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=approved vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    2176                                 unset($actions['unapprove']);
    2177                             }
    2178                         }
    2179 
    2180                         if ( 'spam' != $the_comment_status ) {
    2181                             $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
    2182                         }
    2183                         if ( 'spam' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
    2184                             $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
    2185                         } else {
    2186                             $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>';
    2187                         }
    2188 
     2181                    }
     2182
     2183                    if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
     2184                        $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
     2185                    } elseif ( 'spam' == $the_comment_status ) {
     2186                        $actions['unspam'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . __( 'Not Spam' ) . '</a>';
     2187                    } elseif ( 'trash' == $the_comment_status ) {
     2188                        $actions['untrash'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
     2189                    }
     2190
     2191                    if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
     2192                        $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
     2193                    } else {
     2194                        $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>';
     2195                    }
     2196
     2197                    if ( 'trash' != $the_comment_status ) {
    21892198                        $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
    21902199                        $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick&nbsp;Edit') . '</a>';
    2191 
    21922200                        if ( 'spam' != $the_comment_status )
    21932201                            $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
    21942202                    }
    21952203
    2196                     $actions = apply_filters( 'comment_row_actions', $actions, $comment );
     2204                    $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
    21972205
    21982206                    $i = 0;
     
    22052213                        if ( ('reply' == $action || 'quickedit' == $action) && ! $from_ajax )
    22062214                            $action .= ' hide-if-no-js';
    2207                         elseif ($action == 'untrash' && $the_comment_status == 'trash') {
     2215                        elseif ( ($action == 'untrash' && $the_comment_status == 'trash') || ($action == 'unspam' && $the_comment_status == 'spam') ) {
    22082216                            if ('1' == get_comment_meta($comment_id, '_wp_trash_meta_status', true))
    22092217                                $action .= ' approve';
     
    23722380function wp_comment_trashnotice() {
    23732381?>
    2374 <div class="hidden" id="undo-holder">
    2375 <div class="trash-undo-inside"><?php _e('Comment by'); ?> <strong></strong> <?php _e('moved to the trash.'); ?> <span class="untrash"><a class="undo-trash" href="#"><?php _e('Undo'); ?></a></span></div>
     2382<div class="hidden" id="trash-undo-holder">
     2383    <div class="trash-undo-inside"><?php printf(__('Comment by %s moved to the trash.'), '<strong></strong>'); ?> <span class="undo untrash"><a href="#"><?php _e('Undo'); ?></a></span></div>
     2384</div>
     2385<div class="hidden" id="spam-undo-holder">
     2386    <div class="spam-undo-inside"><?php printf(__('Comment by %s marked as spam.'), '<strong></strong>'); ?> <span class="undo unspam"><a href="#"><?php _e('Undo'); ?></a></span></div>
    23762387</div>
    23772388<?php
     
    31633174            echo '<th scope="row">' . $field['title'] . '</th>';
    31643175        echo '<td>';
    3165         call_user_func($field['callback']);
     3176        call_user_func($field['callback'], $field['args']);
    31663177        echo '</td>';
    31673178        echo '</tr>';
Note: See TracChangeset for help on using the changeset viewer.