diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 791ee7c159..7736652ce4 100644
a
|
b
|
class WP_List_Table { |
166 | 166 | |
167 | 167 | if ( empty( $this->modes ) ) { |
168 | 168 | $this->modes = array( |
169 | | 'list' => __( 'List View' ), |
170 | | 'excerpt' => __( 'Excerpt View' ), |
| 169 | 'list' => __( 'Compact view' ), |
| 170 | 'extended' => __( 'Extended view' ), |
171 | 171 | ); |
172 | 172 | } |
173 | 173 | } |
… |
… |
class WP_List_Table { |
517 | 517 | return ''; |
518 | 518 | } |
519 | 519 | |
| 520 | $mode = get_user_setting( 'posts_list_mode', 'list' ); |
| 521 | if ( 'extended' === $mode ) { |
| 522 | $always_visible = true; |
| 523 | } |
| 524 | |
520 | 525 | $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">'; |
521 | 526 | foreach ( $actions as $action => $link ) { |
522 | 527 | ++$i; |
diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
index 871feeb84e..71d218f416 100644
a
|
b
|
class WP_Posts_List_Table extends WP_List_Table { |
178 | 178 | } |
179 | 179 | |
180 | 180 | if ( ! empty( $_REQUEST['mode'] ) ) { |
181 | | $mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list'; |
| 181 | $mode = 'extended' === $_REQUEST['mode'] ? 'extended' : 'list'; |
182 | 182 | set_user_setting( 'posts_list_mode', $mode ); |
183 | 183 | } else { |
184 | 184 | $mode = get_user_setting( 'posts_list_mode', 'list' ); |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
1040 | 1040 | } |
1041 | 1041 | echo "</strong>\n"; |
1042 | 1042 | |
1043 | | if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) { |
| 1043 | if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'extended' === $mode && current_user_can( 'read_post', $post->ID ) ) { |
1044 | 1044 | if ( post_password_required( $post ) ) { |
1045 | 1045 | echo '<span class="protected-post-excerpt">' . esc_html( get_the_excerpt() ) . '</span>'; |
1046 | 1046 | } else { |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
1100 | 1100 | * @param string $status The status text. |
1101 | 1101 | * @param WP_Post $post Post object. |
1102 | 1102 | * @param string $column_name The column name. |
1103 | | * @param string $mode The list display mode ('excerpt' or 'list'). |
| 1103 | * @param string $mode The list display mode ('extended' or 'list'). |
1104 | 1104 | */ |
1105 | 1105 | $status = apply_filters( 'post_date_column_status', $status, $post, 'date', $mode ); |
1106 | 1106 | |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
1108 | 1108 | echo $status . '<br />'; |
1109 | 1109 | } |
1110 | 1110 | |
1111 | | if ( 'excerpt' === $mode ) { |
| 1111 | if ( 'extended' === $mode || 'excerpt' === $mode ) { |
1112 | 1112 | /** |
1113 | 1113 | * Filters the published time of the post. |
1114 | 1114 | * |
1115 | | * If `$mode` equals 'excerpt', the published time and date are both displayed. |
| 1115 | * If `$mode` equals 'extended', the published time and date are both displayed. |
1116 | 1116 | * If `$mode` equals 'list' (default), the publish date is displayed, with the |
1117 | 1117 | * time and date together available as an abbreviation definition. |
1118 | 1118 | * |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
1121 | 1121 | * @param string $t_time The published time. |
1122 | 1122 | * @param WP_Post $post Post object. |
1123 | 1123 | * @param string $column_name The column name. |
1124 | | * @param string $mode The list display mode ('excerpt' or 'list'). |
| 1124 | * @param string $mode The list display mode ('extended' or 'list'). |
1125 | 1125 | */ |
1126 | 1126 | echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode ); |
1127 | 1127 | } else { |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
1456 | 1456 | * |
1457 | 1457 | * @since 3.1.0 |
1458 | 1458 | * |
1459 | | * @global string $mode List table view mode. |
| 1459 | * @global string $mode Compact table view mode. |
1460 | 1460 | */ |
1461 | 1461 | public function inline_edit() { |
1462 | 1462 | global $mode; |
… |
… |
class WP_Posts_List_Table extends WP_List_Table { |
1496 | 1496 | } |
1497 | 1497 | } |
1498 | 1498 | |
1499 | | $m = ( isset( $mode ) && 'excerpt' === $mode ) ? 'excerpt' : 'list'; |
| 1499 | $m = ( isset( $mode ) && 'extended' === $mode ) ? 'extended' : 'list'; |
1500 | 1500 | $can_publish = current_user_can( $post_type_object->cap->publish_posts ); |
1501 | 1501 | $core_columns = array( |
1502 | 1502 | 'cb' => true, |
diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php
index e983ffef80..e87d17cf86 100644
a
|
b
|
final class WP_Screen { |
1293 | 1293 | return; |
1294 | 1294 | } |
1295 | 1295 | |
1296 | | $view_mode_post_types = get_post_types( |
1297 | | array( |
1298 | | 'hierarchical' => false, |
1299 | | 'show_ui' => true, |
1300 | | ) |
1301 | | ); |
| 1296 | $view_mode_post_types = get_post_types( array( 'show_ui' => true ) ); |
1302 | 1297 | |
1303 | 1298 | /** |
1304 | 1299 | * Filters the post types that have different view mode options. |
… |
… |
final class WP_Screen { |
1306 | 1301 | * @since 4.4.0 |
1307 | 1302 | * |
1308 | 1303 | * @param string[] $view_mode_post_types Array of post types that can change view modes. |
1309 | | * Default non-hierarchical post types with show_ui on. |
| 1304 | * Default post types with show_ui on. |
1310 | 1305 | */ |
1311 | 1306 | $view_mode_post_types = apply_filters( 'view_mode_post_types', $view_mode_post_types ); |
1312 | 1307 | |
… |
… |
final class WP_Screen { |
1323 | 1318 | <legend><?php _e( 'View Mode' ); ?></legend> |
1324 | 1319 | <label for="list-view-mode"> |
1325 | 1320 | <input id="list-view-mode" type="radio" name="mode" value="list" <?php checked( 'list', $mode ); ?> /> |
1326 | | <?php _e( 'List View' ); ?> |
| 1321 | <?php _e( 'Compact view' ); ?> |
1327 | 1322 | </label> |
1328 | 1323 | <label for="excerpt-view-mode"> |
1329 | | <input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> /> |
1330 | | <?php _e( 'Excerpt View' ); ?> |
| 1324 | <input id="excerpt-view-mode" type="radio" name="mode" value="extended" <?php checked( 'extended', $mode ); ?> /> |
| 1325 | <?php _e( 'Extended View' ); ?> |
1331 | 1326 | </label> |
1332 | 1327 | </fieldset> |
1333 | 1328 | <?php |