Make WordPress Core


Ignore:
Timestamp:
10/09/2008 05:58:10 AM (18 years ago)
Author:
azaozz
Message:

Page Options: fix hiding of Modified column when listing drafts, props ShaneF, fixes #7855

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r9108 r9109  
    743743    $posts_columns['title'] = __('Title');
    744744
    745     $post_status = isset( $_GET['post_status'] ) ? $_GET['post_status'] : '';
    746 
    747     switch( $post_status ) {
    748         case 'draft':
    749             $posts_columns['modified'] = __('Modified');
    750             break;
    751         case 'pending':
    752             $posts_columns['modified'] = __('Submitted');
    753             break;
    754         default:
    755             $posts_columns['date'] = __('Date');
    756     }
     745    if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] )
     746        $posts_columns['modified'] = __('Modified');
     747    elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] )
     748        $posts_columns['modified'] = __('Submitted');
     749    else
     750        $posts_columns['date'] = __('Date');
    757751
    758752    $posts_columns['author'] = __('Author');
     
    866860    foreach ( $columns as $column_key => $column_display_name ) {
    867861        $class = ' class="manage-column';
    868 
    869         if ( 'modified' == $column_key )
    870             $column_key = 'date';
    871862
    872863        $class .= " column-$column_key";
     
    12691260        case 'modified':
    12701261        case 'date':
    1271             $attributes = 'class="date column-date"' . $style;
    12721262            if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
    12731263                $t_time = $h_time = __('Unpublished');
     
    14931483    case 'modified':
    14941484    case 'date':
    1495         $attributes = 'class="date column-date"' . $style;
    14961485        if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) {
    14971486            $t_time = $h_time = __('Unpublished');
Note: See TracChangeset for help on using the changeset viewer.