WordPress 4.5
[autoinstalls/wordpress.git] / wp-admin / customize.php
index aa949e54404611eb8dd46a113e8295be5497bba0..7f667d373d913d3dc93c9ebc17d3089599ce1cd3 100644 (file)
@@ -127,7 +127,7 @@ do_action( 'customize_controls_print_scripts' );
                        </a>
                </div>
 
-               <div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat -->
+               <div id="widgets-right" class="wp-clearfix"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat -->
                <div class="wp-full-overlay-sidebar-content" tabindex="-1">
                        <div id="customize-info" class="accordion-section customize-info">
                                <div class="accordion-section-title">
@@ -148,6 +148,26 @@ do_action( 'customize_controls_print_scripts' );
                </div>
 
                <div id="customize-footer-actions" class="wp-full-overlay-footer">
+                       <?php $previewable_devices = $wp_customize->get_previewable_devices(); ?>
+                       <?php if ( ! empty( $previewable_devices ) ) : ?>
+                       <div class="devices">
+                               <?php foreach ( (array) $previewable_devices as $device => $settings ) : ?>
+                                       <?php
+                                       if ( empty( $settings['label'] ) ) {
+                                               continue;
+                                       }
+                                       $active = ! empty( $settings['default'] );
+                                       $class = 'preview-' . $device;
+                                       if ( $active ) {
+                                               $class .= ' active';
+                                       }
+                                       ?>
+                                       <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>">
+                                               <span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span>
+                                       </button>
+                               <?php endforeach; ?>
+                       </div>
+                       <?php endif; ?>
                        <button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
                                <span class="collapse-sidebar-arrow"></span>
                                <span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>