X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/177fd6fefd2e3d5a0ea6591c71d660cabdb3c1a4..a5227bf01edbe6660486c9f5c0f0ed7b7fea3130:/wp-admin/edit-attachment-rows.php diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index 78361e30..d88316be 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -1,69 +1,155 @@ - - + +
- - - $column_display_name) { - if ( 'cb' === $post_column_key ) - $class = ' class="check-column"'; - elseif ( 'comments' === $post_column_key ) - $class = ' class="num"'; - else - $class = ''; -?> - - - + + + + + + + + ID == $post->post_author ? 'self' : 'other' ); -$att_title = get_the_title(); -if ( empty($att_title) ) - $att_title = __('(no title)'); +add_filter('the_title','esc_html'); +$alt = ''; +$posts_columns = get_column_headers('upload'); +$hidden = get_hidden_columns('upload'); + +while ( have_posts() ) : the_post(); + +if ( $is_trash && $post->post_status != 'trash' ) + continue; +elseif ( !$is_trash && $post->post_status == 'trash' ) + continue; + +$alt = ( 'alternate' == $alt ) ? '' : 'alternate'; +$post_owner = ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); +$att_title = _draft_or_post_title(); ?> - post_status ); ?>' valign="top"> + post_status ); ?>' valign="top"> $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; -foreach($posts_columns as $column_name=>$column_display_name) { + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; switch($column_name) { case 'cb': ?> - + - + - + + + + + - + $column_display_name) { } else { $t_time = get_the_time(__('Y/m/d g:i:s A')); $m_time = $post->post_date; - $time = get_post_time( 'G', true ); + $time = get_post_time( 'G', true, $post, false ); if ( ( abs($t_diff = time() - $time) ) < 86400 ) { if ( $t_diff < 0 ) $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); @@ -84,38 +170,37 @@ foreach($posts_columns as $column_name=>$column_display_name) { } } ?> - + post_parent > 0 ) { if ( get_post($post->post_parent) ) { - $parent_title = get_the_title($post->post_parent); - if ( !empty($parent_title) ) - $title = $parent_title; + $title =_draft_or_post_title($post->post_parent); } ?> - + - + - + - + - - - - + + +
>
ID) ) { ?> ID, array(80, 60), false, true); ?>>ID, array(80, 60), true ) ) { + if ( $is_trash ) echo $thumb; + else { +?> + + + + + ">
- ID))); ?> - 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') . ""; + 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 '
'; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
'; + ?>
>>slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . ""; + echo join( ', ', $out ); + } else { + _e('No Tags'); + } + ?> post_excerpt : ''; ?>>post_excerpt : ''; ?> > >,  >
+
+
>
ID ); $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); if ( $left ) echo ''; - comments_number("" . __('0') . '', "" . __('1') . '', "" . __('%') . ''); + comments_number("" . /* translators: comment count link */ _x('0', 'comment count') . '', "" . /* translators: comment count link */ _x('1', 'comment count') . '', "" . /* translators: comment count link: % will be substituted by comment count */ _x('%', 'comment count') . ''); if ( $left ) echo ''; ?> @@ -123,30 +208,32 @@ foreach($posts_columns as $column_name=>$column_display_name) { -
> + | + + >
+ + +

+ - - +