Make WordPress Core

Changeset 9109


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

Location:
trunk/wp-admin
Files:
2 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');
  • trunk/wp-admin/wp-admin.css

    r9103 r9109  
    22232223}
    22242224
    2225 .inline-editor .date {
     2225.inline-editor .date,
     2226.inline-editor .modified {
    22262227        width: 160px;
    22272228}
    22282229
    2229 .inline-editor .date input {
     2230.inline-editor .date input,
     2231.inline-editor .modified input {
    22302232        padding: 2px 1px;
    22312233        margin: 1px;
    … …  
    22332235}
    22342236
    2235 .inline-editor .date input[name="aa"] {
     2237.inline-editor .date input[name="aa"],
     2238.inline-editor .modified input[name="aa"] {
    22362239        width: 30px;
    22372240}
    22382241
    2239 #wpbody-content .inline-editor .date select {
     2242#wpbody-content .inline-editor .date select,
     2243#wpbody-content .inline-editor .modified select {
    22402244        width: 80px;
    22412245}
Note: See TracChangeset for help on using the changeset viewer.