Make WordPress Core


Ignore:
Timestamp:
07/10/2014 08:59:12 PM (11 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/screen.php

    r28500 r29077  
    10201020        <div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
    10211021        <form id="adv-settings" action="" method="post">
    1022         <?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
     1022        <?php if (
     1023            isset( $wp_meta_boxes[ $this->id ] )
     1024            || $this->get_option( 'per_page' )
     1025            || $this->get_option( 'media_grid_title' )
     1026            || ( $columns && empty( $columns['_title'] ) )
     1027        ) : ?>
    10231028            <h5><?php _e( 'Show on screen' ); ?></h5>
    10241029        <?php
     
    10721077                <br class="clear" />
    10731078            </div>
     1079        <?php elseif ( $this->get_option( 'media_grid_title' ) ): ?>
     1080            <div class="metabox-prefs media-grid-prefs">
     1081            <?php foreach ( $this->_options as $column => $args ) {
     1082                $id = "$column-hide";
     1083                echo '<label for="' . $id . '">';
     1084                $saved = str_replace( 'media_grid_', '', $column );
     1085                echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $saved, $hidden ), true, false ) . ' />';
     1086                echo $args['label'] . "</label>\n";
     1087            } ?>
     1088                <br class="clear" />
     1089            </div>
    10741090        <?php endif;
    10751091
Note: See TracChangeset for help on using the changeset viewer.