- Timestamp:
- 07/07/2020 07:10:46 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r48352 r48398 179 179 180 180 if ( ! empty( $_REQUEST['mode'] ) ) { 181 $mode = 'ex cerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';181 $mode = 'extended' === $_REQUEST['mode'] ? 'extended' : 'list'; 182 182 set_user_setting( 'posts_list_mode', $mode ); 183 183 } else { … … 599 599 */ 600 600 protected function get_table_classes() { 601 return array( 'widefat', 'fixed', 'striped', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' ); 601 $mode = get_user_setting( 'posts_list_mode', 'list' ); 602 $mode_class = 'extended' === $mode ? 'table-view-extended' : 'table-view-list'; 603 $mode = get_user_setting( 'posts_list_mode', 'list' ); 604 /** 605 * Filters the current view mode. 606 * 607 * @since 5.5.0 608 * 609 * @param string $mode The current selected mode. Default value of 610 * posts_list_mode user setting. 611 */ 612 $mode = apply_filters( 'table_view_mode', $mode ); 613 614 $mode_class = 'extended' === $mode ? 'table-view-extended' : 'table-view-' . $mode; 615 616 return array( 'widefat', 'fixed', 'striped', $mode_class, is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' ); 602 617 } 603 618 … … 1043 1058 echo "</strong>\n"; 1044 1059 1045 if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'ex cerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) {1060 if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'extended' === $mode && current_user_can( 'read_post', $post->ID ) ) { 1046 1061 if ( post_password_required( $post ) ) { 1047 1062 echo '<span class="protected-post-excerpt">' . esc_html( get_the_excerpt() ) . '</span>'; … … 1103 1118 * @param WP_Post $post Post object. 1104 1119 * @param string $column_name The column name. 1105 * @param string $mode The list display mode ('ex cerpt' or 'list').1120 * @param string $mode The list display mode ('extended' or 'list'). 1106 1121 */ 1107 1122 $status = apply_filters( 'post_date_column_status', $status, $post, 'date', $mode ); … … 1122 1137 * @param WP_Post $post Post object. 1123 1138 * @param string $column_name The column name. 1124 * @param string $mode The list display mode ('ex cerpt' or 'list').1139 * @param string $mode The list display mode ('extended' or 'list'). 1125 1140 */ 1126 1141 echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode ); … … 1492 1507 } 1493 1508 1494 $m = ( isset( $mode ) && 'ex cerpt' === $mode ) ? 'excerpt' : 'list';1509 $m = ( isset( $mode ) && 'extended' === $mode ) ? 'extended' : 'list'; 1495 1510 $can_publish = current_user_can( $post_type_object->cap->publish_posts ); 1496 1511 $core_columns = array(
Note: See TracChangeset
for help on using the changeset viewer.