Make WordPress Core


Ignore:
Timestamp:
07/28/2020 04:17:13 PM (4 years 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.