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. Built from https://develop.svn.wordpress.org/trunk@48668 git-svn-id: http://core.svn.wordpress.org/trunk@48430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3db534a988
commit
2bf5b5749f
|
@ -1270,9 +1270,6 @@ class WP_List_Table {
|
|||
protected function get_table_classes() {
|
||||
$mode = get_user_setting( 'posts_list_mode', 'list' );
|
||||
|
||||
/** This filter is documented in wp-admin/includes/class-wp-screen.php */
|
||||
$mode = apply_filters( 'table_view_mode', $mode );
|
||||
|
||||
$mode_class = esc_attr( 'table-view-' . $mode );
|
||||
|
||||
return array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] );
|
||||
|
|
|
@ -602,9 +602,6 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||
protected function get_table_classes() {
|
||||
global $mode;
|
||||
|
||||
/** This filter is documented in wp-admin/includes/class-wp-screen.php */
|
||||
$mode = apply_filters( 'table_view_mode', $mode );
|
||||
|
||||
$mode_class = esc_attr( 'table-view-' . $mode );
|
||||
|
||||
return array( 'widefat', 'fixed', 'striped', $mode_class, is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );
|
||||
|
|
|
@ -1315,39 +1315,19 @@ final class WP_Screen {
|
|||
|
||||
$mode = get_user_setting( 'posts_list_mode', 'list' );
|
||||
|
||||
/**
|
||||
* Filters the current view mode.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param string $mode The current selected mode. Defaults to the value
|
||||
* of 'posts_list_mode' user setting.
|
||||
*/
|
||||
$mode = apply_filters( 'table_view_mode', $mode );
|
||||
|
||||
// This needs a submit button.
|
||||
add_filter( 'screen_options_show_submit', '__return_true' );
|
||||
?>
|
||||
<fieldset class="metabox-prefs view-mode">
|
||||
<legend><?php _e( 'View mode' ); ?></legend>
|
||||
<label for="list-view-mode">
|
||||
<input id="list-view-mode" type="radio" name="mode" value="list" <?php checked( 'list', $mode ); ?> />
|
||||
<?php _e( 'Compact view' ); ?>
|
||||
</label>
|
||||
<label for="excerpt-view-mode">
|
||||
<input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> />
|
||||
<?php _e( 'Extended view' ); ?>
|
||||
</label>
|
||||
<?php
|
||||
/**
|
||||
* Fires at the end of the table view modes screen option.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param string $mode The currently selected mode.
|
||||
*/
|
||||
do_action( 'wp_table_view_modes', $mode );
|
||||
?>
|
||||
<legend><?php _e( 'View mode' ); ?></legend>
|
||||
<label for="list-view-mode">
|
||||
<input id="list-view-mode" type="radio" name="mode" value="list" <?php checked( 'list', $mode ); ?> />
|
||||
<?php _e( 'Compact view' ); ?>
|
||||
</label>
|
||||
<label for="excerpt-view-mode">
|
||||
<input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> />
|
||||
<?php _e( 'Extended view' ); ?>
|
||||
</label>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-beta4-48667';
|
||||
$wp_version = '5.5-beta4-48668';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue