X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/d3b1ea255664edd2deef17f900a655613d20820d..58f607a1de715c9bca69340a4d6fb9e1b9c2bed2:/wp-admin/edit-attachment-rows.php diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index af62b1cb..d88316be 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -6,7 +6,9 @@ * @subpackage Administration */ -if ( ! defined('ABSPATH') ) die(); +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); if ( have_posts() ) { ?>
+ | ID) ) { ?> | $column_display_name ) { ?>>ID, array(80, 60), true ) ) { + if ( $is_trash ) echo $thumb; + else { ?> - - + | $column_display_name ) { case 'media': ?> -> - ID))); ?> + | >
ID ), $matches ) ) + echo esc_html( strtoupper( $matches[1] ) ); + else + echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) ); + ?> + + ID) ) + if ( current_user_can('edit_post', $post->ID) && !$is_trash ) $actions['edit'] = '' . __('Edit') . ''; - if ( current_user_can('delete_post', $post->ID) ) - $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; - $actions['view'] = '' . __('View') . ''; + if ( current_user_can('delete_post', $post->ID) ) { + if ( $is_trash ) + $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; + elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) + $actions['trash'] = "ID) . "'>" . __('Trash') . ""; + if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { + $delete_ays = (!$is_trash && !MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : ''; + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } + } + if ( !$is_trash ) { + $title =_draft_or_post_title($post->post_parent); + $actions['view'] = '' . __('View') . ''; + } + $actions = apply_filters( 'media_row_actions', $actions, $post ); $action_count = count($actions); $i = 0; echo '';
@@ -93,7 +121,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
echo "$link$sep";
}
echo ' ';
- ?> |
+ ?>
$column_display_name ) {
- > | +> + |
---|