WordPress.org

Make WordPress Core

Changeset 8682


Ignore:
Timestamp:
08/20/08 04:06:36 (7 years ago)
Author:
ryan
Message:

Merge crazyhorse management pages. see #7552

Location:
trunk/wp-admin
Files:
12 edited

Legend:

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

    r8618 r8682  
    1111 
    1212$title = __('Categories'); 
    13 $parent_file = 'edit.php'; 
    1413 
    1514wp_reset_vars(array('action', 'cat')); 
    1615 
    17 if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) 
     16if ( $_GET['action'] == 'delete' && isset($_GET['delete']) ) 
    1817    $action = 'bulk-delete'; 
    1918 
     
    128127<div class="wrap"> 
    129128<form id="posts-filter" action="" method="get"> 
    130 <?php if ( current_user_can('manage_categories') ) : ?> 
    131     <h2><?php printf(__('Manage Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2> 
    132 <?php else : ?> 
    133     <h2><?php _e('Manage Categories') ?> </h2> 
    134 <?php endif; ?> 
     129    <h2><?php printf( current_user_can('manage_categories') ? __('Categories (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addcat' ); ?></h2> 
    135130 
    136131<p id="post-search"> 
     
    163158 
    164159<div class="alignleft"> 
    165 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     160<select name="action"> 
     161<option value="" selected><?php _e('Actions'); ?></option> 
     162<option value="delete"><?php _e('Delete'); ?></option> 
     163</select> 
     164<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 
    166165<?php wp_nonce_field('bulk-categories'); ?> 
    167166</div> 
  • trunk/wp-admin/edit-attachment-rows.php

    r8656 r8682  
    5151    case 'cb': 
    5252        ?> 
    53         <th scope="row" class="check-column"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th> 
     53        <th scope="row" class="check-column"><input type="checkbox" name="media[]" value="<?php the_ID(); ?>" /></th> 
    5454        <?php 
    5555        break; 
     
    5757    case 'icon': 
    5858        ?> 
    59         <td class="media-icon"><?php echo wp_get_attachment_link($post->ID, array(80, 60), false, true); ?></td> 
     59        <td class="media-icon"><?php 
     60            if ( $thumb = wp_get_attachment_image( $post->ID, array(80, 60), true ) ) { 
     61?> 
     62 
     63                <a href="media.php?action=edit&amp;attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"> 
     64                    <?php echo $thumb; ?> 
     65                </a> 
     66 
     67<?php           } 
     68        ?></td> 
    6069        <?php 
    6170        // TODO 
     
    6675        <td><strong><a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br /> 
    6776        <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?> 
     77        <p> 
     78        <a href="media.php?action=edit&amp;attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php _e('Edit'); ?></a> | 
     79        <a href="<?php the_permalink(); ?>"><?php _e('Get permalink'); ?></a> | 
     80        <a href="#" class="delete"><?php _e('Delete'); ?></a> 
     81        </p> 
    6882        <?php do_action('manage_media_media_column', $post->ID); ?> 
    6983        </td> 
     84        <?php 
     85        break; 
     86 
     87    case 'tags': 
     88        ?> 
     89        <td><?php 
     90        $tags = get_the_tags(); 
     91        if ( !empty( $tags ) ) { 
     92            $out = array(); 
     93            foreach ( $tags as $c ) 
     94                $out[] = "<a href='edit.php?tag=$c->slug'> " . wp_specialchars(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>"; 
     95            echo join( ', ', $out ); 
     96        } else { 
     97            _e('No Tags'); 
     98        } 
     99        ?></td> 
    70100        <?php 
    71101        break; 
     
    107137            } 
    108138            ?> 
    109             <td><strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a></strong></td> 
     139            <td><strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a></strong>, <?php echo get_the_time(__('Y/m/d')); ?></td> 
    110140            <?php 
    111141        } else { 
     
    133163        break; 
    134164 
    135     case 'location': 
     165    case 'actions': 
    136166        ?> 
    137         <td><a href="<?php the_permalink(); ?>"><?php _e('Permalink'); ?></a></td> 
     167        <td> 
     168        <a href="media.php?action=edit&amp;attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php _e('Edit'); ?></a> | 
     169        <a href="<?php the_permalink(); ?>"><?php _e('Get permalink'); ?></a> 
     170        </td> 
    138171        <?php 
    139172        break; 
  • trunk/wp-admin/edit-comments.php

    r8656 r8682  
    1111 
    1212$title = __('Edit Comments'); 
    13 $parent_file = 'edit-comments.php'; 
    1413wp_enqueue_script( 'admin-comments' ); 
    1514wp_enqueue_script('admin-forms'); 
    1615 
    17 if ( !empty( $_REQUEST['delete_comments'] ) ) { 
     16if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) { 
    1817    check_admin_referer('bulk-comments'); 
    1918 
     
    2423        if ( !current_user_can('edit_post', $post_id) ) 
    2524            continue; 
    26         if ( !empty( $_REQUEST['spamit'] ) ) { 
     25        if ( $_REQUEST['action'] == 'markspam' ) { 
    2726            wp_set_comment_status($comment, 'spam'); 
    2827            $comments_spammed++; 
    29         } elseif ( !empty( $_REQUEST['deleteit'] ) ) { 
     28        } elseif ( $_REQUEST['action'] == 'delete' ) { 
    3029            wp_set_comment_status($comment, 'delete'); 
    3130            $comments_deleted++; 
    32         } elseif ( !empty( $_REQUEST['approveit'] ) ) { 
     31        } elseif ( $_REQUEST['action'] == 'approve' ) { 
    3332            wp_set_comment_status($comment, 'approve'); 
    3433            $comments_approved++; 
    35         } elseif ( !empty( $_REQUEST['unapproveit'] ) ) { 
     34        } elseif ( $_REQUEST['action'] == 'unapprove' ) { 
    3635            wp_set_comment_status($comment, 'hold'); 
    3736            $comments_unapproved++; 
     
    107106$status_links = array(); 
    108107$num_comments = wp_count_comments(); 
    109 $stati = array('moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 'approved' => _c('Approved|plural')); 
     108$stati = array( 
     109        'moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 
     110        'approved' => _c('Approved|plural'), 
     111        'spam' => sprintf(__ngettext('Spam (%s)', 'Spam (%s)', number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>") 
     112    ); 
    110113$class = ( '' === $comment_status ) ? ' class="current"' : ''; 
    111114$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>"; 
     
    116119        $class = ' class="current"'; 
    117120 
    118     $status_links[] = "<li><a href=\"edit-comments.php?comment_status=$status\"$class>" . $label . '</a>'; 
     121 
     122    $status_links[] = "<li class='$status'><a href=\"edit-comments.php?comment_status=$status\"$class>$label</a>"; 
    119123} 
    120124 
     
    136140</form> 
    137141 
     142<!-- crazyhorse 
    138143<ul class="view-switch"> 
    139144    <li <?php if ( 'detail' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'detail', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Detail View') ?></a></li> 
    140145    <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li> 
    141146</ul> 
     147--> 
    142148 
    143149<?php 
     
    176182 
    177183<div class="alignleft"> 
    178 <?php if ( 'approved' != $comment_status ): ?> 
    179 <input type="submit" value="<?php _e('Approve'); ?>" name="approveit" class="button-secondary" /> 
     184<select name="action"> 
     185<option value="" selected>Actions</option> 
     186<?php if ( 'approved' == $comment_status ): ?> 
     187<option value="unapprove"><?php _e('Unapprove'); ?></option> 
     188<?php else : ?> 
     189<option value="approve"><?php _e('Approve'); ?> 
    180190<?php endif; ?> 
    181 <input type="submit" value="<?php _e('Mark as Spam'); ?>" name="spamit" class="button-secondary" /> 
    182 <?php if ( 'moderated' != $comment_status ): ?> 
    183 <input type="submit" value="<?php _e('Unapprove'); ?>" name="unapproveit" class="button-secondary" /> 
     191<?php if ( 'spam' != $comment_status ): ?> 
     192<option value="markspam"><?php _e('Mark as Spam'); ?></option> 
    184193<?php endif; ?> 
    185 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     194<option value="delete"><?php _e('Delete'); ?></option> 
     195</select> 
    186196<?php do_action('manage_comments_nav', $comment_status); ?> 
    187197<?php wp_nonce_field('bulk-comments'); ?> 
     198<input type="submit" name="doaction" value="Apply" class="button-secondary apply" /> 
    188199<?php if ( isset($_GET['apage']) ) { ?> 
    189200    <input type="hidden" name="apage" value="<?php echo absint( $_GET['apage'] ); ?>" /> 
     
    203214  <tr> 
    204215    <th scope="col" class="check-column"><input type="checkbox" /></th> 
    205     <th scope="col"><?php _e('Comment') ?></th> 
    206     <th scope="col"><?php _e('Date') ?></th> 
    207     <th scope="col" class="action-links"><?php _e('Actions') ?></th> 
     216    <th scope="col" class="comment-column"><?php _e('Comment') ?></th> 
     217    <th scope="col" class="author-column"><?php _e('Author') ?></th> 
     218    <th scope="col" class="date-column"><?php _e('Comment Submitted') ?></th> 
     219    <th scope="col" class="response-column"><?php _e('In Response To This Post') ?></th> 
    208220  </tr> 
    209221</thead> 
  • trunk/wp-admin/edit-link-categories.php

    r8656 r8682  
    1010require_once('admin.php'); 
    1111 
    12 // Handle bulk deletes 
    13 if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { 
     12// Handle bulk actions 
     13if ( isset($_GET['action']) && isset($_GET['delete']) ) { 
    1414    check_admin_referer('bulk-link-categories'); 
    1515 
    1616    if ( !current_user_can('manage_categories') ) 
    1717        wp_die(__('Cheatin&#8217; uh?')); 
     18     
     19    if ( $_GET['action'] == 'delete' ) { 
     20        foreach( (array) $_GET['delete'] as $cat_ID ) { 
     21            $cat_name = get_term_field('name', $cat_ID, 'link_category'); 
     22            $default_cat_id = get_option('default_link_category'); 
    1823 
    19     foreach( (array) $_GET['delete'] as $cat_ID ) { 
    20         $cat_name = get_term_field('name', $cat_ID, 'link_category'); 
    21         $default_cat_id = get_option('default_link_category'); 
     24            // Don't delete the default cats. 
     25            if ( $cat_ID == $default_cat_id ) 
     26                wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 
    2227 
    23         // Don't delete the default cats. 
    24         if ( $cat_ID == $default_cat_id ) 
    25             wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 
     28            wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); 
     29        } 
    2630 
    27         wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); 
     31        $location = 'edit-link-categories.php'; 
     32        if ( $referer = wp_get_referer() ) { 
     33            if ( false !== strpos($referer, 'edit-link-categories.php') ) 
     34                $location = $referer; 
     35        } 
     36 
     37        $location = add_query_arg('message', 6, $location); 
     38        wp_redirect($location); 
     39        exit(); 
    2840    } 
    29  
    30     $location = 'edit-link-categories.php'; 
    31     if ( $referer = wp_get_referer() ) { 
    32         if ( false !== strpos($referer, 'edit-link-categories.php') ) 
    33             $location = $referer; 
    34     } 
    35  
    36     $location = add_query_arg('message', 6, $location); 
    37     wp_redirect($location); 
    38     exit(); 
    3941} elseif ( !empty($_GET['_wp_http_referer']) ) { 
    4042     wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     
    4345 
    4446$title = __('Link Categories'); 
    45 $parent_file = 'edit.php'; 
    4647 
    4748wp_enqueue_script( 'admin-categories' ); 
     
    6566 
    6667<form id="posts-filter" action="" method="get"> 
    67 <?php if ( current_user_can('manage_categories') ) : ?> 
    68     <h2><?php printf(__('Manage Link Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2> 
    69 <?php else : ?> 
    70     <h2><?php _e('Manage Link Categories') ?> </h2> 
    71 <?php endif; ?> 
     68    <h2><?php printf( current_user_can('manage_categories') ? __('Link Categories (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addcat' ); ?></h2> 
    7269 
    7370<p id="post-search"> 
     
    10097 
    10198<div class="alignleft"> 
    102 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     99<select name="action"> 
     100<option value="" selected><?php _e('Actions'); ?></option> 
     101<option value="delete"><?php _e('Delete'); ?></option> 
     102</select> 
     103<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 
    103104<?php wp_nonce_field('bulk-link-categories'); ?> 
    104105</div> 
  • trunk/wp-admin/edit-pages.php

    r8656 r8682  
    1111 
    1212// Handle bulk deletes 
    13 if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { 
     13if ( isset($_GET['action']) && isset($_GET['delete']) ) { 
    1414    check_admin_referer('bulk-pages'); 
    15     foreach( (array) $_GET['delete'] as $post_id_del ) { 
    16         $post_del = & get_post($post_id_del); 
    17  
    18         if ( !current_user_can('delete_page', $post_id_del) ) 
    19             wp_die( __('You are not allowed to delete this page.') ); 
    20  
    21         if ( $post_del->post_type == 'attachment' ) { 
    22             if ( ! wp_delete_attachment($post_id_del) ) 
    23                 wp_die( __('Error in deleting...') ); 
    24         } else { 
    25             if ( !wp_delete_post($post_id_del) ) 
    26                 wp_die( __('Error in deleting...') ); 
     15    if ( $_GET['action'] == 'delete' ) { 
     16        foreach( (array) $_GET['delete'] as $post_id_del ) { 
     17            $post_del = & get_post($post_id_del); 
     18 
     19            if ( !current_user_can('delete_page', $post_id_del) ) 
     20                wp_die( __('You are not allowed to delete this page.') ); 
     21 
     22            if ( $post_del->post_type == 'attachment' ) { 
     23                if ( ! wp_delete_attachment($post_id_del) ) 
     24                    wp_die( __('Error in deleting...') ); 
     25            } else { 
     26                if ( !wp_delete_post($post_id_del) ) 
     27                    wp_die( __('Error in deleting...') ); 
     28            } 
    2729        } 
     30 
     31        $sendback = wp_get_referer(); 
     32        if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('page-new.php'); 
     33        elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php'); 
     34        $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 
     35 
     36        wp_redirect($sendback); 
     37        exit(); 
    2838    } 
    29  
    30     $sendback = wp_get_referer(); 
    31     if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('page-new.php'); 
    32     elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php'); 
    33     $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 
    34  
    35     wp_redirect($sendback); 
    36     exit(); 
    3739} elseif ( !empty($_GET['_wp_http_referer']) ) { 
    3840     wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     
    5254    ); 
    5355 
    54 $post_status_label = __('Manage Pages'); 
     56$post_status_label = __('Pages'); 
    5557$post_status_q = ''; 
    5658if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) { 
     
    8082    $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 
    8183} 
    82 printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matching {s}' ), $post_status_label, $h2_author, $h2_search ); 
     84printf( _c( '%1$s%2$s%3$s (<a href="%4$s">Add New</a>)|You can reorder these: 1: Pages, 2: by {s}, 3: matching {s}' ), $post_status_label, $h2_author, $h2_search, 'page-new.php' ); 
    8385?></h2> 
    8486 
     
    147149 
    148150<div class="alignleft"> 
    149 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     151<select name="action"> 
     152<option value="" selected><?php _e('Actions'); ?></option> 
     153<option value="delete"><?php _e('Delete'); ?></option> 
     154</select> 
     155<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 
    150156<?php wp_nonce_field('bulk-pages'); ?> 
    151157</div> 
  • trunk/wp-admin/edit-post-rows.php

    r8656 r8682  
    5959    case 'cb': 
    6060        ?> 
    61         <th scope="row" class="check-column"><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /><?php } ?></th> 
     61        <th scope="row" class="check-column"><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><input type="checkbox" name="post[]" value="<?php the_ID(); ?>" /><?php } ?></th> 
    6262        <?php 
    6363        break; 
     
    8585            } 
    8686        } 
    87         ?> 
    88         <td><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name) ?></abbr></td> 
    89         <?php 
     87 
     88        if ( 'excerpt' == $mode ) : ?> 
     89        <td><?php echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode) ?></td> 
     90<?php       else : ?> 
     91        <td><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) ?></abbr></td> 
     92<?php       endif; 
    9093        break; 
    9194    case 'title': 
    9295        ?> 
    93         <td><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong> 
    94         <?php if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } ?></td> 
     96        <td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong> 
     97        <?php 
     98        if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } 
     99 
     100        if ( 'excerpt' == $mode ) 
     101            the_excerpt(); 
     102 
     103        $actions = array(); 
     104        $actions['edit'] = '<a href="post.php?action=edit&amp;post=' . $post->ID . '">' . __('Edit') . '</a>'; 
     105        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
     106        $action_count = count($actions); 
     107        $i = 0; 
     108        foreach ( $actions as $action => $link ) { 
     109            ++$i; 
     110            ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 
     111            echo "<span class='$action'>$link$sep</span>"; 
     112        } 
     113        ?> 
     114        </td> 
    95115        <?php 
    96116        break; 
  • trunk/wp-admin/edit-tags.php

    r8656 r8682  
    1111 
    1212$title = __('Tags'); 
    13 $parent_file = 'edit.php'; 
    1413 
    1514wp_reset_vars(array('action', 'tag')); 
    1615 
    17 if ( isset($_GET['deleteit']) && isset($_GET['delete_tags']) ) 
     16if ( $_GET['action'] == 'delete' && isset($_GET['delete_tags']) ) 
    1817    $action = 'bulk-delete'; 
    1918 
     
    135134 
    136135<form id="posts-filter" action="" method="get"> 
    137 <?php if ( current_user_can('manage_categories') ) : ?> 
    138     <h2><?php printf(__('Manage Tags (<a href="%s">add new</a>)'), '#addtag') ?> </h2> 
    139 <?php else : ?> 
    140     <h2><?php _e('Manage Tags') ?> </h2> 
    141 <?php endif; ?> 
     136    <h2><?php printf( current_user_can('manage_categories') ? __('Tags (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addtag' ); ?></h2> 
    142137 
    143138<p id="post-search"> 
     
    170165 
    171166<div class="alignleft"> 
    172 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     167<select name="action"> 
     168<option value="" selected><?php _e('Actions'); ?></option> 
     169<option value="delete"><?php _e('Delete'); ?></option> 
     170</select> 
     171<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 
    173172<?php wp_nonce_field('bulk-tags'); ?> 
    174173</div> 
  • trunk/wp-admin/edit.php

    r8656 r8682  
    1010require_once('admin.php'); 
    1111 
    12 // Handle bulk deletes 
    13 if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { 
    14     check_admin_referer('bulk-posts'); 
    15     foreach( (array) $_GET['delete'] as $post_id_del ) { 
    16         $post_del = & get_post($post_id_del); 
    17  
    18         if ( !current_user_can('delete_post', $post_id_del) ) 
    19             wp_die( __('You are not allowed to delete this post.') ); 
    20  
    21         if ( $post_del->post_type == 'attachment' ) { 
    22             if ( ! wp_delete_attachment($post_id_del) ) 
    23                 wp_die( __('Error in deleting...') ); 
    24         } else { 
    25             if ( !wp_delete_post($post_id_del) ) 
    26                 wp_die( __('Error in deleting...') ); 
    27         } 
     12// Handle bulk actions 
     13if ( isset($_GET['action']) && $_GET['action'] != 'Actions' ) { 
     14    switch ( $_GET['action'] ) { 
     15        case 'delete': 
     16            if ( isset($_GET['post']) ) { 
     17                check_admin_referer('bulk-posts'); 
     18                foreach( (array) $_GET['post'] as $post_id_del ) { 
     19                    $post_del = & get_post($post_id_del); 
     20 
     21                    if ( !current_user_can('delete_post', $post_id_del) ) 
     22                        wp_die( __('You are not allowed to delete this post.') ); 
     23 
     24                    if ( $post_del->post_type == 'attachment' ) { 
     25                        if ( ! wp_delete_attachment($post_id_del) ) 
     26                            wp_die( __('Error in deleting...') ); 
     27                    } else { 
     28                        if ( !wp_delete_post($post_id_del) ) 
     29                            wp_die( __('Error in deleting...') ); 
     30                    } 
     31                } 
     32            } 
     33            break; 
     34        case 'edit': 
     35            // TODO: Decide what to do here - add bulk edit feature, or just disallow if >1 post selected 
     36            break; 
    2837    } 
    29  
    3038    $sendback = wp_get_referer(); 
    3139    if (strpos($sendback, 'post.php') !== false) $sendback = admin_url('post-new.php'); 
     
    5361    $_GET['paged'] = 1; 
    5462 
     63if ( empty($_GET['mode']) ) 
     64    $mode = 'list'; 
     65else 
     66    $mode = attribute_escape($_GET['mode']); 
    5567?> 
    5668 
     
    6274    printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title)); 
    6375} else { 
    64     $post_status_label = _c('Manage Posts|manage posts header'); 
     76    $post_status_label = _c('Posts|manage posts header'); 
    6577    if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) 
    6678        $post_status_label = $post_stati[$_GET['post_status']][1]; 
     
    8496    $h2_tag    = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf( __('tagged with &#8220;%s&#8221;'), single_tag_title('', false) ) : ''; 
    8597    $h2_month  = isset($_GET['m'])   && $_GET['m']   ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : ''; 
    86     printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month ); 
     98    printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s (<a href="%7$s">Add New</a>)|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month, 'post-new.php' ); 
    8799} 
    88100?></h2> 
     
    130142</p> 
    131143 
     144<input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 
     145 
     146<ul class="view-switch"> 
     147    <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li> 
     148    <li <?php if ( 'excerpt' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'excerpt', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Excerpt View') ?></a></li> 
     149</ul> 
     150 
    132151<div class="tablenav"> 
    133152 
     
    145164 
    146165<div class="alignleft"> 
    147 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     166<select name="action"> 
     167<option value="" selected><?php _e('Actions'); ?></option> 
     168<option value="delete"><?php _e('Delete'); ?></option> 
     169<option value="edit"><?php _e('Edit'); ?></option> 
     170</select> 
     171<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 
    148172<?php wp_nonce_field('bulk-posts'); ?> 
    149173<?php 
     
    231255  <tr> 
    232256    <th scope="col"><?php _e('Comment') ?></th> 
    233     <th scope="col"><?php _e('Date') ?></th> 
    234     <th scope="col"><?php _e('Actions') ?></th> 
     257    <th scope="col"><?php _e('Submitted') ?></th> 
    235258  </tr> 
    236259</thead> 
     
    238261<?php 
    239262    foreach ($comments as $comment) 
    240         _wp_comment_row( $comment->comment_ID, 'detail', false, false ); 
     263        _wp_comment_row( $comment->comment_ID, 'single', false, false ); 
    241264?> 
    242265</tbody> 
  • trunk/wp-admin/includes/template.php

    r8646 r8682  
    344344    $posts_columns = array(); 
    345345    $posts_columns['cb'] = '<input type="checkbox" />'; 
     346    $posts_columns['title'] = __('Title'); 
    346347    if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] ) 
    347348        $posts_columns['modified'] = __('Modified'); 
     
    350351    else 
    351352        $posts_columns['date'] = __('Date'); 
    352     $posts_columns['title'] = __('Title'); 
    353     $posts_columns['author'] = __('Author'); 
     353    //$posts_columns['author'] = __('Author'); 
    354354    $posts_columns['categories'] = __('Categories'); 
    355355    $posts_columns['tags'] = __('Tags'); 
     
    368368    $posts_columns['icon'] = ''; 
    369369    $posts_columns['media'] = _c('Media|media column header'); 
    370     $posts_columns['desc'] = _c('Description|media column header'); 
     370    $posts_columns['tags'] = _c('Tags|media column header'); 
     371//  $posts_columns['desc'] = _c('Description|media column header'); 
    371372    $posts_columns['date'] = _c('Date Added|media column header'); 
    372373    $posts_columns['parent'] = _c('Appears with|media column header'); 
    373374    $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="images/comment-grey-bubble.png" /></div>'; 
    374     $posts_columns['location'] = _c('Location|media column header'); 
     375//  $posts_columns['actions'] = _c('Actions|media column header'); 
    375376    $posts_columns = apply_filters('manage_media_columns', $posts_columns); 
    376377 
     
    742743    $authordata = get_userdata($post->post_author); 
    743744    $the_comment_status = wp_get_comment_status($comment->comment_ID); 
    744     $class = ('unapproved' == $the_comment_status) ? 'unapproved' : ''; 
    745745 
    746746    if ( current_user_can( 'edit_post', $post->ID ) ) { 
    747747        $post_link = "<a href='" . get_comment_link() . "'>"; 
    748  
    749748        $post_link .= get_the_title($comment->comment_post_ID) . '</a>'; 
    750  
    751         $edit_link_start = "<a class='row-title' href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>"; 
    752         $edit_link_end = '</a>'; 
    753749    } else { 
    754750        $post_link = get_the_title($comment->comment_post_ID); 
    755         $edit_link_start = $edit_link_end =''; 
    756751    } 
    757752 
     
    775770 
    776771?> 
    777   <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'> 
     772  <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $the_comment_status; ?>'> 
    778773<?php if ( $checkbox ) : ?> 
    779774    <td class="check-column"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> 
    780775<?php endif; ?> 
    781     <td class="comment"> 
    782     <p class="comment-author"><strong><?php echo $edit_link_start; comment_author(); echo $edit_link_end; ?></strong><br /> 
    783     <?php if ( !empty($author_url) ) : ?> 
    784     <a href="<?php echo $author_url ?>"><?php echo $author_url_display; ?></a> | 
    785     <?php endif; ?> 
    786     <?php if ( current_user_can( 'edit_post', $post->ID ) ) : ?> 
    787     <?php if ( !empty($comment->comment_author_email) ): ?> 
    788     <?php comment_author_email_link() ?> | 
    789     <?php endif; ?> 
    790     <a href="edit-comments.php?s=<?php comment_author_IP() ?>&amp;mode=detail"><?php comment_author_IP() ?></a> 
    791     <?php endif; //current_user_can?> 
    792     </p> 
    793     <?php if ( 'detail' == $mode ) comment_text(); ?> 
    794     <p><?php printf(__('From %1$s, %2$s'), $post_link, $ptime) ?></p> 
    795     </td> 
    796     <td><?php comment_date(__('Y/m/d')); ?></td> 
    797     <td class="action-links"> 
     776    <td class="comment-column"> 
     777    <?php if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?> 
     778     
    798779<?php 
    799  
    800780    $actions = array(); 
    801781 
     
    803783        $actions['approve']   = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 
    804784        $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 
    805  
    806         // we're looking at list of only approved or only unapproved comments 
    807         if ( 'moderated' == $comment_status ) { 
    808             $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 
    809             unset($actions['unapprove']); 
    810         } elseif ( 'approved' == $comment_status ) { 
    811             $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 
    812             unset($actions['approve']); 
    813         } 
    814  
     785        $actions['edit']      = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a> | '; 
     786        $actions['flag']      = "<a href='#' class='no-crazy'>Flag for Follow-up</a> | "; 
    815787        $actions['spam']      = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | '; 
    816788        $actions['delete']    = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . '</a>'; 
     789 
     790        if ( $comment_status ) { // not looking at all comments 
     791            if ( 'approved' == $the_comment_status ) { 
     792                $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 
     793                unset($actions['approve']); 
     794            } else { 
     795                $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 
     796                unset($actions['unapprove']); 
     797            } 
     798        } 
     799 
     800        if ( 'spam' == $the_comment_status ) 
     801            unset($actions['spam']); 
     802 
    817803        $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 
     804 
    818805        foreach ( $actions as $action => $link ) 
    819806            echo "<span class='$action'>$link</span>"; 
    820807    } 
    821808    ?> 
     809    </td> 
     810    <td class="author-column"> 
     811        <strong><?php comment_author(); ?></strong><br /> 
     812        <?php if ( !empty($author_url) ) : ?> 
     813        <a href="<?php echo $author_url ?>"><?php echo $author_url_display; ?></a><br /> 
     814        <?php endif; ?> 
     815        <?php if ( current_user_can( 'edit_post', $post->ID ) ) : ?> 
     816        <?php if ( !empty($comment->comment_author_email) ): ?> 
     817        <?php comment_author_email_link() ?><br /> 
     818        <?php endif; ?> 
     819        <a href="edit-comments.php?s=<?php comment_author_IP() ?>&amp;mode=detail"><?php comment_author_IP() ?></a> 
     820        <?php endif; //current_user_can?>     
    822821    </td> 
     822    <td class="date-column"><?php comment_date(__('Y/m/d \a\t g:ia')); ?></td> 
     823<?php if ( 'single' !== $mode ) : ?> 
     824    <td class="response-column"> 
     825    "<?php echo $post_link ?>" <?php echo sprintf('(%s comments)', $post->comment_count); ?><br/> 
     826    <?php echo get_the_time(__('Y/m/d \a\t g:ia')); ?> 
     827    </td> 
     828<?php endif; ?> 
    823829  </tr> 
    824830    <?php 
     
    990996    $hour = '<input type="text" id="hh" name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off"  />'; 
    991997    $minute = '<input type="text" id="mn" name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off"  />'; 
    992     printf(_c('%1$s%2$s, %3$s <br />@ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); 
     998    printf(_c('%1$s%2$s, %3$s @ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); 
    993999    echo "\n\n"; 
    9941000    foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) 
     
    9971003 
    9981004<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" /> 
     1005 
     1006<a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e('OK'); ?></a> 
     1007<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Cancel'); ?></a> 
    9991008<?php 
    10001009} 
     
    11731182    global $wp_meta_boxes; 
    11741183 
    1175  
    11761184    if  ( !isset($wp_meta_boxes) ) 
    11771185        $wp_meta_boxes = array(); 
     
    11811189        $wp_meta_boxes[$page][$context] = array(); 
    11821190 
     1191    foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) { 
    11831192    foreach ( array('high', 'core', 'default', 'low') as $a_priority ) { 
    1184         if ( !isset($wp_meta_boxes[$page][$context][$a_priority][$id]) ) 
     1193        if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) ) 
    11851194            continue; 
     1195 
    11861196        // If a core box was previously added or removed by a plugin, don't add. 
    11871197        if ( 'core' == $priority ) { 
    11881198            // If core box previously deleted, don't add 
    1189             if ( false === $wp_meta_boxes[$page][$context][$a_priority][$id] ) 
     1199            if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] ) 
    11901200                return; 
    11911201            // If box was added with default priority, give it core priority to maintain sort order 
    11921202            if ( 'default' == $a_priority ) { 
    1193                 $wp_meta_boxes[$page][$context]['core'][$id] = $wp_meta_boxes[$page][$context]['default'][$id]; 
    1194                 unset($wp_meta_boxes[$page][$context]['default'][$id]); 
     1203                $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id]; 
     1204                unset($wp_meta_boxes[$page][$a_context]['default'][$id]); 
    11951205            } 
    11961206            return; 
    11971207        } 
    11981208        // If no priority given and id already present, use existing priority 
    1199         if ( empty($priority) ) 
     1209        if ( empty($priority) ) { 
    12001210            $priority = $a_priority; 
    1201         // An id can be in only one priority 
    1202         if ( $priority != $a_priority ) 
    1203             unset($wp_meta_boxes[$page][$context][$a_priority][$id]); 
     1211        // else if we're adding to the sorted priortiy, we don't know the title or callback.  Glab them from the previously added context/priority. 
     1212        } elseif ( 'sorted' == $priority ) { 
     1213            $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title']; 
     1214            $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback']; 
     1215        } 
     1216        // An id can be in only one priority and one context 
     1217        if ( $priority != $a_priority || $context != $a_context ) 
     1218            unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]); 
     1219    } 
    12041220    } 
    12051221 
    12061222    if ( empty($priority) ) 
    1207         $priority = low; 
     1223        $priority = 'low'; 
    12081224 
    12091225    if ( !isset($wp_meta_boxes[$page][$context][$priority]) ) 
     
    12131229} 
    12141230 
     1231// crazyhorse - this can be made simpler 
    12151232function do_meta_boxes($page, $context, $object) { 
    12161233    global $wp_meta_boxes; 
     1234    static $already_sorted = false; 
    12171235 
    12181236    do_action('do_meta_boxes', $page, $context, $object); 
    12191237 
    1220     if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) ) 
    1221         return; 
    1222  
    1223     foreach ( array('high', 'core', 'default', 'low') as $priority ) { 
    1224         if ( ! isset( $wp_meta_boxes[$page][$context][$priority] ) ) 
    1225             continue; 
    1226  
    1227         foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { 
    1228             if ( false === $box ) 
    1229                 continue; 
    1230             echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '">' . "\n"; 
    1231             echo "<h3>{$box['title']}</h3>\n"; 
    1232             echo '<div class="inside">' . "\n"; 
    1233             call_user_func($box['callback'], $object, $box); 
    1234             echo "</div>\n"; 
    1235             echo "</div>\n"; 
    1236         } 
    1237     } 
     1238    echo "<div id='$context-sortables' class='meta-box-sortables'>\n"; 
     1239 
     1240    $i = 0; 
     1241    do {  
     1242        // Grab the ones the user has manually sorted.  Pull them out of their previous context/priority and into the one the user chose 
     1243        if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) { 
     1244            foreach ( $sorted as $box_context => $ids ) 
     1245                foreach ( explode(',', $ids) as $id ) 
     1246                    if ( $id ) 
     1247                        add_meta_box( $id, null, null, $page, $box_context, 'sorted' ); 
     1248        } 
     1249        $already_sorted = true; 
     1250 
     1251        if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) ) 
     1252            break; 
     1253 
     1254 
     1255        foreach ( array('high', 'sorted', 'core', 'default', 'low') as $priority ) { 
     1256            foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { 
     1257                if ( false == $box || ! $box['title'] ) 
     1258                    continue; 
     1259                $i++; 
     1260                echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '">' . "\n"; 
     1261                echo "<h3><span class='hndle'>{$box['title']}</span></h3>\n"; 
     1262                echo '<div class="inside">' . "\n"; 
     1263                call_user_func($box['callback'], $object, $box); 
     1264                echo "</div>\n"; 
     1265                echo "</div>\n"; 
     1266            } 
     1267        } 
     1268    } while(0); 
     1269 
     1270    echo "</div>"; 
     1271 
     1272    return $i; 
     1273 
    12381274} 
    12391275 
  • trunk/wp-admin/link-manager.php

    r8645 r8682  
    1111 
    1212// Handle bulk deletes 
    13 if ( isset($_GET['deleteit']) && isset($_GET['linkcheck']) ) { 
     13if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) { 
    1414    check_admin_referer('bulk-bookmarks'); 
    1515 
    1616    if ( ! current_user_can('manage_links') ) 
    1717        wp_die( __('You do not have sufficient permissions to edit the links for this blog.') ); 
    18  
    19     foreach ( (array) $_GET['linkcheck'] as $link_id) { 
    20         $link_id = (int) $link_id; 
    21  
    22         wp_delete_link($link_id); 
     18     
     19    if ( $_GET['action'] == 'delete' ) { 
     20        foreach ( (array) $_GET['linkcheck'] as $link_id) { 
     21            $link_id = (int) $link_id; 
     22 
     23            wp_delete_link($link_id); 
     24        } 
     25 
     26        $sendback = wp_get_referer(); 
     27        $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 
     28        wp_redirect($sendback); 
     29        exit; 
    2330    } 
    24  
    25     $sendback = wp_get_referer(); 
    26     $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 
    27     wp_redirect($sendback); 
    28     exit; 
    2931} elseif ( !empty($_GET['_wp_http_referer']) ) { 
    3032     wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     
    8385 
    8486<form id="posts-filter" action="" method="get"> 
    85 <h2><?php printf( __( 'Manage Links (<a href="%s">add new</a>)' ), 'link-add.php' ); ?></h2> 
     87<h2><?php printf( __('Links (<a href="%s">Add New</a>)' ), 'link-add.php' ); ?></h2> 
    8688 
    8789<p id="post-search"> 
     
    9698 
    9799<div class="alignleft"> 
    98 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     100<select name="action"> 
     101<option value="" selected><?php _e('Actions'); ?></option> 
     102<option value="delete"><?php _e('Delete'); ?></option> 
     103</select> 
     104<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 
    99105<?php 
    100106$categories = get_terms('link_category', "hide_empty=1"); 
  • trunk/wp-admin/upload.php

    r8656 r8682  
    99/** WordPress Administration Bootstrap */ 
    1010require_once('admin.php'); 
     11add_thickbox(); 
     12wp_enqueue_script('media-upload'); 
    1113 
    1214if (!current_user_can('upload_files')) 
     
    1416 
    1517// Handle bulk deletes 
    16 if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { 
     18if ( isset($_GET['action']) && isset($_GET['media']) ) { 
    1719    check_admin_referer('bulk-media'); 
    18     foreach( (array) $_GET['delete'] as $post_id_del ) { 
    19         $post_del = & get_post($post_id_del); 
    20  
    21         if ( !current_user_can('delete_post', $post_id_del) ) 
    22             wp_die( __('You are not allowed to delete this post.') ); 
    23  
    24         if ( $post_del->post_type == 'attachment' ) 
    25             if ( ! wp_delete_attachment($post_id_del) ) 
    26                 wp_die( __('Error in deleting...') ); 
     20    if ( $_GET['action'] == 'delete' ) { 
     21        foreach( (array) $_GET['media'] as $post_id_del ) { 
     22            $post_del = & get_post($post_id_del); 
     23 
     24            if ( !current_user_can('delete_post', $post_id_del) ) 
     25                wp_die( __('You are not allowed to delete this post.') ); 
     26 
     27            if ( $post_del->post_type == 'attachment' ) 
     28                if ( ! wp_delete_attachment($post_id_del) ) 
     29                    wp_die( __('Error in deleting...') ); 
     30        } 
     31 
     32        $location = 'upload.php'; 
     33        if ( $referer = wp_get_referer() ) { 
     34            if ( false !== strpos($referer, 'upload.php') ) 
     35                $location = $referer; 
     36        } 
     37 
     38        $location = add_query_arg('message', 2, $location); 
     39        $location = remove_query_arg('posted', $location); 
     40        wp_redirect($location); 
     41        exit; 
    2742    } 
    28  
    29     $location = 'upload.php'; 
    30     if ( $referer = wp_get_referer() ) { 
    31         if ( false !== strpos($referer, 'upload.php') ) 
    32             $location = $referer; 
    33     } 
    34  
    35     $location = add_query_arg('message', 2, $location); 
    36     $location = remove_query_arg('posted', $location); 
    37     wp_redirect($location); 
    38     exit; 
    3943} elseif ( !empty($_GET['_wp_http_referer']) ) { 
    4044    wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     
    6569    printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title)); 
    6670} else { 
    67     $post_mime_type_label = _c('Manage Media|manage media header'); 
     71    $post_mime_type_label = _c('Media|manage media header'); 
    6872    if ( isset($_GET['post_mime_type']) && in_array( $_GET['post_mime_type'], array_keys($post_mime_types) ) ) 
    6973        $post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1]; 
     
    8791    $h2_tag    = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf( __('tagged with &#8220;%s&#8221;'), single_tag_title('', false) ) : ''; 
    8892    $h2_month  = isset($_GET['m'])   && $_GET['m']   ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : ''; 
    89     printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month ); 
     93    printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s (<a href="%7$s" class="thickbox">Add New</a>)|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month, 'media-upload.php?library=false&TB_iframe=true' ); 
    9094} 
    9195?></h2> 
     
    156160 
    157161<div class="alignleft"> 
    158 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 
     162<select name="action"> 
     163<option value="" selected><?php _e('Actions'); ?></option> 
     164<option value="delete"><?php _e('Delete'); ?></option> 
     165</select> 
     166<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 
    159167<?php wp_nonce_field('bulk-media'); ?> 
    160168<?php 
  • trunk/wp-admin/wp-admin.css

    r8600 r8682  
    13851385} 
    13861386 
     1387/* Edit posts */ 
     1388 
     1389td.post-title strong { 
     1390    display: block; 
     1391    margin-bottom: .2em; 
     1392} 
     1393 
     1394td.post-title p { 
     1395    margin: 0; 
     1396} 
     1397 
    13871398/* Global classes */ 
    13881399.wp-hidden-children .wp-hidden-child { display: none; } 
Note: See TracChangeset for help on using the changeset viewer.