diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 253bcca800..92f35e035f 100644
a
|
b
|
class WP_List_Table { |
1658 | 1658 | * @return string[] Array of CSS classes for the table tag. |
1659 | 1659 | */ |
1660 | 1660 | protected function get_table_classes() { |
1661 | | $mode = get_user_setting( 'posts_list_mode', 'list' ); |
| 1661 | global $mode; |
| 1662 | |
| 1663 | // Sanitize the mode class name |
| 1664 | $mode_class = esc_attr( 'table-view-' . $mode ); |
| 1665 | |
| 1666 | // Get the post type |
| 1667 | $post_type = $this->screen->post_type; |
1662 | 1668 | |
1663 | | $mode_class = esc_attr( 'table-view-' . $mode ); |
| 1669 | // Sanitize the post type class name |
| 1670 | $post_type_class = esc_attr( 'post-type-' . $post_type ); |
1664 | 1671 | |
1665 | | return array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] ); |
| 1672 | // Determine if the post type is hierarchical |
| 1673 | $post_type_hierarchical_class = is_post_type_hierarchical( $post_type ) ? 'pages' : 'posts'; |
| 1674 | |
| 1675 | // Return the array of classes |
| 1676 | return array( |
| 1677 | 'widefat', |
| 1678 | 'fixed', |
| 1679 | 'striped', |
| 1680 | $mode_class, |
| 1681 | $post_type_class, |
| 1682 | $post_type_hierarchical_class, |
| 1683 | ); |
1666 | 1684 | } |
1667 | 1685 | |
| 1686 | |
1668 | 1687 | /** |
1669 | 1688 | * Generates the table navigation above or below the table |
1670 | 1689 | * |