mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Media Grid: Move toggling of visible fields to Screen Options. This moves us in a better direction... but this will probably need to be massaged again.
See #24716. git-svn-id: https://develop.svn.wordpress.org/trunk@29077 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1019,7 +1019,12 @@ final class WP_Screen {
|
||||
?>
|
||||
<div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
|
||||
<form id="adv-settings" action="" method="post">
|
||||
<?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
|
||||
<?php if (
|
||||
isset( $wp_meta_boxes[ $this->id ] )
|
||||
|| $this->get_option( 'per_page' )
|
||||
|| $this->get_option( 'media_grid_title' )
|
||||
|| ( $columns && empty( $columns['_title'] ) )
|
||||
) : ?>
|
||||
<h5><?php _e( 'Show on screen' ); ?></h5>
|
||||
<?php
|
||||
endif;
|
||||
@@ -1071,6 +1076,17 @@ final class WP_Screen {
|
||||
?>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php elseif ( $this->get_option( 'media_grid_title' ) ): ?>
|
||||
<div class="metabox-prefs media-grid-prefs">
|
||||
<?php foreach ( $this->_options as $column => $args ) {
|
||||
$id = "$column-hide";
|
||||
echo '<label for="' . $id . '">';
|
||||
$saved = str_replace( 'media_grid_', '', $column );
|
||||
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $saved, $hidden ), true, false ) . ' />';
|
||||
echo $args['label'] . "</label>\n";
|
||||
} ?>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
$this->render_screen_layout();
|
||||
|
||||
Reference in New Issue
Block a user