Changeset 40510 for trunk/src/wp-admin/customize.php
- Timestamp:
- 04/21/2017 05:15:29 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/customize.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/customize.php
r40368 r40510 172 172 173 173 <div id="customize-footer-actions" class="wp-full-overlay-footer"> 174 <?php $previewable_devices = $wp_customize->get_previewable_devices(); ?>175 <?php if ( ! empty( $previewable_devices ) ) : ?>176 <div class="devices">177 <?php foreach ( (array) $previewable_devices as $device => $settings ) : ?>178 <?php179 if ( empty( $settings['label'] ) ) {180 continue;181 }182 $active = ! empty( $settings['default'] );183 $class = 'preview-' . $device;184 if ( $active ) {185 $class .= ' active';186 }187 ?>188 <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>">189 <span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span>190 </button>191 <?php endforeach; ?>192 </div>193 <?php endif; ?>194 174 <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php echo esc_attr( _x( 'Hide Controls', 'label for hide controls button without length constraints' ) ); ?>"> 195 175 <span class="collapse-sidebar-arrow"></span> 196 176 <span class="collapse-sidebar-label"><?php _ex( 'Hide Controls', 'short (~12 characters) label for hide controls button' ); ?></span> 197 177 </button> 178 <?php $previewable_devices = $wp_customize->get_previewable_devices(); ?> 179 <?php if ( ! empty( $previewable_devices ) ) : ?> 180 <div class="devices-wrapper"> 181 <div class="devices"> 182 <?php foreach ( (array) $previewable_devices as $device => $settings ) : ?> 183 <?php 184 if ( empty( $settings['label'] ) ) { 185 continue; 186 } 187 $active = ! empty( $settings['default'] ); 188 $class = 'preview-' . $device; 189 if ( $active ) { 190 $class .= ' active'; 191 } 192 ?> 193 <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>"> 194 <span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span> 195 </button> 196 <?php endforeach; ?> 197 </div> 198 </div> 199 <?php endif; ?> 198 200 </div> 199 201 </form>
Note: See TracChangeset
for help on using the changeset viewer.