- Timestamp:
- 11/01/2014 07:55:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r29810 r30154 23 23 $this->detached = ( isset( $_REQUEST['attachment-filter'] ) && 'detached' === $_REQUEST['attachment-filter'] ); 24 24 25 $this->modes = array( 26 'list' => __( 'List View' ), 27 'grid' => __( 'Grid View' ) 28 ); 29 25 30 parent::__construct( array( 26 31 'plural' => 'media', … … 146 151 147 152 parent::pagination( $which ); 148 }149 150 /**151 * Display a view switcher152 *153 * @since 3.1.0154 * @access protected155 */156 protected function view_switcher( $current_mode ) {157 $modes = array(158 'list' => __( 'List View' ),159 'grid' => __( 'Grid View' )160 );161 162 ?>163 <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />164 <div class="view-switch">165 <?php166 foreach ( $modes as $mode => $title ) {167 $classes = array( 'view-' . $mode );168 if ( $current_mode == $mode )169 $classes[] = 'current';170 printf(171 "<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",172 esc_url( add_query_arg( 'mode', $mode ) ),173 implode( ' ', $classes ),174 $title175 );176 }177 ?>178 </div>179 <?php180 153 } 181 154
Note: See TracChangeset
for help on using the changeset viewer.