Ticket #18531: 18531.patch
File 18531.patch, 2.0 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/class-wp-media-list-table.php
133 133 /* translators: column name */ 134 134 $posts_columns['title'] = _x( 'File', 'column name' ); 135 135 $posts_columns['author'] = __( 'Author' ); 136 //$posts_columns['tags'] = _x( 'Tags', 'column name' );137 136 /* translators: column name */ 138 137 if ( !$this->detached ) { 139 138 $posts_columns['parent'] = _x( 'Attached to', 'column name' ); … … 237 236 <?php 238 237 break; 239 238 240 case 'tags':241 ?>242 <td <?php echo $attributes ?>><?php243 $tags = get_the_tags();244 if ( !empty( $tags ) ) {245 $out = array();246 foreach ( $tags as $c )247 $out[] = "<a href='edit.php?tag=$c->slug'> " . esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'post_tag', 'display' ) ) . "</a>";248 echo join( ', ', $out );249 } else {250 _e( 'No Tags' );251 }252 ?>253 </td>254 <?php255 break;256 257 239 case 'desc': 258 240 ?> 259 241 <td <?php echo $attributes ?>><?php echo has_excerpt() ? $post->post_excerpt : ''; ?></td> … … 261 243 break; 262 244 263 245 case 'date': 264 if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {265 $ t_time = $h_time = __( 'Unpublished' );246 if ( '0000-00-00 00:00:00' == $post->post_date ) { // Needed? Media is always published. 247 $h_time = __( 'Unpublished' ); 266 248 } else { 267 $t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );268 249 $m_time = $post->post_date; 269 250 $time = get_post_time( 'G', true, $post, false ); 270 if ( ( abs( $t_diff = time() - $time ) ) < 86400 ) { 271 if ( $t_diff < 0 ) 272 $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) ); 273 else 274 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 251 if ( ( abs( $t_diff = time() - $time ) ) < 86400 && $t_diff > 0 ) { 252 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 275 253 } else { 276 254 $h_time = mysql2date( __( 'Y/m/d' ), $m_time ); 277 255 }