Media Grid: Screen Options for grid have to play nice with Screen Options for list. This was fun.
See #24716. Built from https://develop.svn.wordpress.org/trunk@29078 git-svn-id: http://core.svn.wordpress.org/trunk@28864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -419,7 +419,11 @@ function wp_print_media_templates() {
|
||||
if ( _.contains( data.controller.options.mode, 'grid' ) ) { #>
|
||||
<div class="data-fields">
|
||||
<?php
|
||||
$hidden = get_hidden_columns( get_current_screen() );
|
||||
$option = get_user_option( 'manageuploadgridcolumnshidden' );
|
||||
$hidden = array();
|
||||
if ( ! empty( $option ) ) {
|
||||
$hidden = $option;
|
||||
}
|
||||
$fields = array( 'title', 'uploadedTo', 'dateFormatted', 'mime' );
|
||||
foreach ( $fields as $field ):
|
||||
$class_name = in_array( $field, $hidden ) ? 'data-field data-hidden' : 'data-field data-visible';
|
||||
|
||||
Reference in New Issue
Block a user