WordPress.org

Make WordPress Core

Changeset 48668


Ignore:
Timestamp:
07/28/2020 04:17:13 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Administration: Pull the table_view_mode filter for now.

The extensibility of list table view modes will be explored in a future release.

Props audrasjb.
See #49715.

Location:
trunk/src/wp-admin/includes
Files:
3 edited

Legend:

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

    r48615 r48668  
    12711271        $mode = get_user_setting( 'posts_list_mode', 'list' );
    12721272
    1273         /** This filter is documented in wp-admin/includes/class-wp-screen.php */
    1274         $mode = apply_filters( 'table_view_mode', $mode );
    1275 
    12761273        $mode_class = esc_attr( 'table-view-' . $mode );
    12771274
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r48594 r48668  
    602602    protected function get_table_classes() {
    603603        global $mode;
    604 
    605         /** This filter is documented in wp-admin/includes/class-wp-screen.php */
    606         $mode = apply_filters( 'table_view_mode', $mode );
    607604
    608605        $mode_class = esc_attr( 'table-view-' . $mode );
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r48574 r48668  
    13161316        $mode = get_user_setting( 'posts_list_mode', 'list' );
    13171317
    1318         /**
    1319          * Filters the current view mode.
    1320          *
    1321          * @since 5.5.0
    1322          *
    1323          * @param string $mode The current selected mode. Defaults to the value
    1324          *                     of 'posts_list_mode' user setting.
    1325          */
    1326         $mode = apply_filters( 'table_view_mode', $mode );
    1327 
    13281318        // This needs a submit button.
    13291319        add_filter( 'screen_options_show_submit', '__return_true' );
    13301320        ?>
    13311321        <fieldset class="metabox-prefs view-mode">
    1332         <legend><?php _e( 'View mode' ); ?></legend>
    1333                 <label for="list-view-mode">
    1334                     <input id="list-view-mode" type="radio" name="mode" value="list" <?php checked( 'list', $mode ); ?> />
    1335                     <?php _e( 'Compact view' ); ?>
    1336                 </label>
    1337                 <label for="excerpt-view-mode">
    1338                     <input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> />
    1339                     <?php _e( 'Extended view' ); ?>
    1340                 </label>
    1341                 <?php
    1342                 /**
    1343                  * Fires at the end of the table view modes screen option.
    1344                  *
    1345                  * @since 5.5.0
    1346                  *
    1347                  * @param string $mode The currently selected mode.
    1348                  */
    1349                 do_action( 'wp_table_view_modes', $mode );
    1350                 ?>
     1322            <legend><?php _e( 'View mode' ); ?></legend>
     1323            <label for="list-view-mode">
     1324                <input id="list-view-mode" type="radio" name="mode" value="list" <?php checked( 'list', $mode ); ?> />
     1325                <?php _e( 'Compact view' ); ?>
     1326            </label>
     1327            <label for="excerpt-view-mode">
     1328                <input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> />
     1329                <?php _e( 'Extended view' ); ?>
     1330            </label>
    13511331        </fieldset>
    13521332        <?php
Note: See TracChangeset for help on using the changeset viewer.