Make WordPress Core


Ignore:
Timestamp:
07/12/2020 11:34:18 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Administration: Restore the excerpt key for the Extended view mode for backward compatibility for now.

Props Offereins.
See #49715.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r48424 r48450  
    145145
    146146        if ( ! empty( $_REQUEST['mode'] ) ) {
    147             $mode = 'extended' === $_REQUEST['mode'] ? 'extended' : 'list';
     147            $mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';
    148148            set_user_setting( 'posts_list_mode', $mode );
    149149        } else {
     
    10521052        echo "</strong>\n";
    10531053
    1054         if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'extended' === $mode && current_user_can( 'read_post', $post->ID ) ) {
     1054        if ( 'excerpt' === $mode
     1055            && ! is_post_type_hierarchical( $this->screen->post_type )
     1056            && current_user_can( 'read_post', $post->ID )
     1057        ) {
    10551058            if ( post_password_required( $post ) ) {
    10561059                echo '<span class="protected-post-excerpt">' . esc_html( get_the_excerpt() ) . '</span>';
     
    11121115         * @param WP_Post $post        Post object.
    11131116         * @param string  $column_name The column name.
    1114          * @param string  $mode        The list display mode ('extended' or 'list').
     1117         * @param string  $mode        The list display mode ('excerpt' or 'list').
    11151118         */
    11161119        $status = apply_filters( 'post_date_column_status', $status, $post, 'date', $mode );
     
    11311134         * @param WP_Post $post        Post object.
    11321135         * @param string  $column_name The column name.
    1133          * @param string  $mode        The list display mode ('extended' or 'list').
     1136         * @param string  $mode        The list display mode ('excerpt' or 'list').
    11341137         */
    11351138        echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
     
    15011504        }
    15021505
    1503         $m            = ( isset( $mode ) && 'extended' === $mode ) ? 'extended' : 'list';
     1506        $m            = ( isset( $mode ) && 'excerpt' === $mode ) ? 'excerpt' : 'list';
    15041507        $can_publish  = current_user_can( $post_type_object->cap->publish_posts );
    15051508        $core_columns = array(
Note: See TracChangeset for help on using the changeset viewer.