Page Options: fix hiding of Modified column when listing drafts, props ShaneF, fixes #7855
git-svn-id: http://svn.automattic.com/wordpress/trunk@9109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
175611bda0
commit
43a310be13
|
@ -742,18 +742,12 @@ function wp_manage_pages_columns() {
|
||||||
|
|
||||||
$posts_columns['title'] = __('Title');
|
$posts_columns['title'] = __('Title');
|
||||||
|
|
||||||
$post_status = isset( $_GET['post_status'] ) ? $_GET['post_status'] : '';
|
if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] )
|
||||||
|
$posts_columns['modified'] = __('Modified');
|
||||||
switch( $post_status ) {
|
elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] )
|
||||||
case 'draft':
|
$posts_columns['modified'] = __('Submitted');
|
||||||
$posts_columns['modified'] = __('Modified');
|
else
|
||||||
break;
|
$posts_columns['date'] = __('Date');
|
||||||
case 'pending':
|
|
||||||
$posts_columns['modified'] = __('Submitted');
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$posts_columns['date'] = __('Date');
|
|
||||||
}
|
|
||||||
|
|
||||||
$posts_columns['author'] = __('Author');
|
$posts_columns['author'] = __('Author');
|
||||||
if ( !in_array($post_status, array('pending', 'draft', 'future')) )
|
if ( !in_array($post_status, array('pending', 'draft', 'future')) )
|
||||||
|
@ -866,9 +860,6 @@ function print_column_headers( $type, $id = true ) {
|
||||||
foreach ( $columns as $column_key => $column_display_name ) {
|
foreach ( $columns as $column_key => $column_display_name ) {
|
||||||
$class = ' class="manage-column';
|
$class = ' class="manage-column';
|
||||||
|
|
||||||
if ( 'modified' == $column_key )
|
|
||||||
$column_key = 'date';
|
|
||||||
|
|
||||||
$class .= " column-$column_key";
|
$class .= " column-$column_key";
|
||||||
|
|
||||||
if ( 'cb' == $column_key )
|
if ( 'cb' == $column_key )
|
||||||
|
@ -1268,7 +1259,6 @@ function _post_row($a_post, $pending_comments, $mode) {
|
||||||
|
|
||||||
case 'modified':
|
case 'modified':
|
||||||
case 'date':
|
case 'date':
|
||||||
$attributes = 'class="date column-date"' . $style;
|
|
||||||
if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
|
if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
|
||||||
$t_time = $h_time = __('Unpublished');
|
$t_time = $h_time = __('Unpublished');
|
||||||
} else {
|
} else {
|
||||||
|
@ -1492,7 +1482,6 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
|
||||||
break;
|
break;
|
||||||
case 'modified':
|
case 'modified':
|
||||||
case 'date':
|
case 'date':
|
||||||
$attributes = 'class="date column-date"' . $style;
|
|
||||||
if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) {
|
if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) {
|
||||||
$t_time = $h_time = __('Unpublished');
|
$t_time = $h_time = __('Unpublished');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2222,21 +2222,25 @@ a.togbox {
|
||||||
margin: 3px 0 0;
|
margin: 3px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inline-editor .date {
|
.inline-editor .date,
|
||||||
|
.inline-editor .modified {
|
||||||
width: 160px;
|
width: 160px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inline-editor .date input {
|
.inline-editor .date input,
|
||||||
|
.inline-editor .modified input {
|
||||||
padding: 2px 1px;
|
padding: 2px 1px;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inline-editor .date input[name="aa"] {
|
.inline-editor .date input[name="aa"],
|
||||||
|
.inline-editor .modified input[name="aa"] {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpbody-content .inline-editor .date select {
|
#wpbody-content .inline-editor .date select,
|
||||||
|
#wpbody-content .inline-editor .modified select {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue