X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/16b9f61a8ab25bd6c9fbfd0cea00c7bda22f6a71..58f607a1de715c9bca69340a4d6fb9e1b9c2bed2:/wp-admin/edit-attachment-rows.php diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index 1b972a9f..d88316be 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -39,8 +39,8 @@ elseif ( !$is_trash && $post->post_status == 'trash' ) continue; $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; -global $current_user; -$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); + +$post_owner = ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); $att_title = _draft_or_post_title(); ?> post_status ); ?>' valign="top"> @@ -71,7 +71,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) { if ( $is_trash ) echo $thumb; else { ?> - + @@ -84,25 +84,33 @@ foreach ($posts_columns as $column_name => $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) && !$is_trash ) $actions['edit'] = '' . __('Edit') . ''; if ( current_user_can('delete_post', $post->ID) ) { if ( $is_trash ) - $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; + $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) - $actions['trash'] = "ID) . "'>" . __('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') . ""; + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; } } - if ( !$is_trash ) + 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; @@ -113,7 +121,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) { echo "$link$sep"; } echo ''; - ?>

+ ?>