[wp-trac] [WordPress Trac] #30325: WP List Table: allow filtering view switcher modes
WordPress Trac
noreply at wordpress.org
Wed Mar 11 18:44:56 UTC 2015
#30325: WP List Table: allow filtering view switcher modes
-------------------------+---------------------------------
Reporter: ragulka | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses: ui, administration
-------------------------+---------------------------------
Changes (by ocean90):
* keywords: has-patch commit => has-patch
* milestone: 4.2 => Future Release
Comment:
Punted from 4.2 per the bug scrub. The patch doesn't handle the case when
`$current_mode` is removed from the list.
Also posts and media list table have a harcoded whitelist:
{{{
// Posts
$mode = $_REQUEST['mode'] == 'excerpt' ? 'excerpt' : 'list';
set_user_setting ( 'posts_list_mode', $mode );
// Media
$mode = get_user_option( 'media_library_mode', get_current_user_id() ) ?
get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
$modes = array( 'grid', 'list' );
if ( isset( $_GET['mode'] ) && in_array( $_GET['mode'], $modes ) ) {
$mode = $_GET['mode'];
update_user_option( get_current_user_id(), 'media_library_mode',
$mode );
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30325#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list