Make WordPress Core

Changeset 31918


Ignore:
Timestamp:
03/28/2015 10:08:32 PM (10 years ago)
Author:
ocean90
Message:

Theme Switcher: Use the global panel back button instead of adding a new one.

This ensures the back button is visible on iOS devices. Same as in [29610].

see #31794.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/customize-controls.css

    r31917 r31918  
    946946}
    947947
    948 .themes-panel-back:before {
    949     top: 13px;
     948.in-themes-panel .control-panel-back:before {
     949    content: "\f345";
    950950    left: 14px;
    951951}
    952952
    953 .in-themes-panel .themes-panel-back {
     953.in-themes-panel .control-panel-back {
    954954    left: 0;
    955955}
    956956
    957 .in-sub-panel .themes-panel-back {
    958     display: none;
    959 }
    960 
    961 .control-panel-back.themes-panel-back:before {
    962     content: "\f345";
     957.in-themes-panel .control-panel-back:before {
    963958}
    964959
  • trunk/src/wp-admin/js/customize-controls.js

    r31916 r31918  
    599599            });
    600600
    601             section.container.find( '.themes-panel-back' ).on( 'click keydown', function( event ) {
     601
     602            $( '#customize-header-actions' ).on( 'click keydown', '.control-panel-back', function( event ) {
    602603                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    603604                    return;
     
    606607                event.preventDefault(); // Keep this AFTER the key filter above
    607608
    608                 section.collapse();
     609                if ( section.expanded() ) {
     610                    section.collapse();
     611                }
    609612            });
    610613
     
    692695                siblings = container.find( '.open' ),
    693696                topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ),
    694                 backBtn = overlay.find( '.themes-panel-back' ),
     697                backBtn = overlay.find( '.control-panel-back' ),
    695698                panelTitle = section.find( '.accordion-section-title' ).first(),
    696699                content = section.find( '.control-panel-content' );
  • trunk/src/wp-includes/class-wp-customize-section.php

    r31905 r31918  
    346346                <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span>
    347347            </h3>
    348             <span class="control-panel-back themes-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>
    349348            <div class="customize-themes-panel control-panel-content themes-php">
    350349                <h2><?php esc_html_e( 'Themes' ); ?>
Note: See TracChangeset for help on using the changeset viewer.