Administration: Restore the excerpt
key for the Extended view mode for backward compatibility for now.
Props Offereins. See #49715. git-svn-id: https://develop.svn.wordpress.org/trunk@48450 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f051ed3ffb
commit
cece47bd39
@ -87,7 +87,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
global $post_id, $comment_status, $comment_type, $search;
|
||||
|
||||
if ( ! empty( $_REQUEST['mode'] ) ) {
|
||||
$mode = 'extended' === $_REQUEST['mode'] ? 'extended' : 'list';
|
||||
$mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';
|
||||
set_user_setting( 'posts_list_mode', $mode );
|
||||
}
|
||||
|
||||
@ -760,7 +760,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
|
||||
$mode = get_user_setting( 'posts_list_mode', 'list' );
|
||||
|
||||
if ( 'extended' === $mode ) {
|
||||
if ( 'excerpt' === $mode ) {
|
||||
$always_visible = true;
|
||||
}
|
||||
|
||||
|
@ -166,8 +166,8 @@ class WP_List_Table {
|
||||
|
||||
if ( empty( $this->modes ) ) {
|
||||
$this->modes = array(
|
||||
'list' => __( 'Compact view' ),
|
||||
'extended' => __( 'Extended view' ),
|
||||
'list' => __( 'Compact view' ),
|
||||
'excerpt' => __( 'Extended view' ),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -524,7 +524,7 @@ class WP_List_Table {
|
||||
|
||||
$mode = get_user_setting( 'posts_list_mode', 'list' );
|
||||
|
||||
if ( 'extended' === $mode ) {
|
||||
if ( 'excerpt' === $mode ) {
|
||||
$always_visible = true;
|
||||
}
|
||||
|
||||
@ -655,6 +655,7 @@ class WP_List_Table {
|
||||
$classes[] = 'current';
|
||||
$aria_current = ' aria-current="page"';
|
||||
}
|
||||
|
||||
printf(
|
||||
"<a href='%s' class='%s' id='view-switch-$mode'$aria_current><span class='screen-reader-text'>%s</span></a>\n",
|
||||
esc_url( remove_query_arg( 'attachment-filter', add_query_arg( 'mode', $mode ) ) ),
|
||||
|
@ -144,7 +144,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
global $mode, $avail_post_stati, $wp_query, $per_page;
|
||||
|
||||
if ( ! empty( $_REQUEST['mode'] ) ) {
|
||||
$mode = 'extended' === $_REQUEST['mode'] ? 'extended' : 'list';
|
||||
$mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';
|
||||
set_user_setting( 'posts_list_mode', $mode );
|
||||
} else {
|
||||
$mode = get_user_setting( 'posts_list_mode', 'list' );
|
||||
@ -1051,7 +1051,10 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
}
|
||||
echo "</strong>\n";
|
||||
|
||||
if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'extended' === $mode && current_user_can( 'read_post', $post->ID ) ) {
|
||||
if ( 'excerpt' === $mode
|
||||
&& ! is_post_type_hierarchical( $this->screen->post_type )
|
||||
&& current_user_can( 'read_post', $post->ID )
|
||||
) {
|
||||
if ( post_password_required( $post ) ) {
|
||||
echo '<span class="protected-post-excerpt">' . esc_html( get_the_excerpt() ) . '</span>';
|
||||
} else {
|
||||
@ -1111,7 +1114,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
* @param string $status The status text.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param string $column_name The column name.
|
||||
* @param string $mode The list display mode ('extended' or 'list').
|
||||
* @param string $mode The list display mode ('excerpt' or 'list').
|
||||
*/
|
||||
$status = apply_filters( 'post_date_column_status', $status, $post, 'date', $mode );
|
||||
|
||||
@ -1130,7 +1133,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
* @param string $t_time The published time.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param string $column_name The column name.
|
||||
* @param string $mode The list display mode ('extended' or 'list').
|
||||
* @param string $mode The list display mode ('excerpt' or 'list').
|
||||
*/
|
||||
echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
|
||||
}
|
||||
@ -1500,7 +1503,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
}
|
||||
}
|
||||
|
||||
$m = ( isset( $mode ) && 'extended' === $mode ) ? 'extended' : 'list';
|
||||
$m = ( isset( $mode ) && 'excerpt' === $mode ) ? 'excerpt' : 'list';
|
||||
$can_publish = current_user_can( $post_type_object->cap->publish_posts );
|
||||
$core_columns = array(
|
||||
'cb' => true,
|
||||
|
@ -1333,7 +1333,7 @@ final class WP_Screen {
|
||||
<?php _e( 'Compact view' ); ?>
|
||||
</label>
|
||||
<label for="excerpt-view-mode">
|
||||
<input id="excerpt-view-mode" type="radio" name="mode" value="extended" <?php checked( 'extended', $mode ); ?> />
|
||||
<input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> />
|
||||
<?php _e( 'Extended view' ); ?>
|
||||
</label>
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user