Ticket #31289: 31289.2.diff
File 31289.2.diff, 7.3 KB (added by , 6 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
852 852 display: block; 853 853 } 854 854 855 .customize-themes-panel .customize-info { 856 padding: 12px 7px 15px; 857 } 858 859 .customize-themes-panel .customize-info .preview-action { 860 font-size: 13px; 861 line-height: 24px; 862 display: block; 863 } 864 865 .customize-themes-panel .customize-info .panel-title { 866 font-size: 20px; 867 font-weight: 200; 868 line-height: 24px; 869 } 870 871 .customize-themes-panel .customize-info .title-count { 872 top: -1px; 873 padding: 2px 8px; 874 } 875 876 .customize-themes-panel .customize-info .button { 877 float: right; 878 margin-top: -2px; 879 position: relative; 880 } 881 882 .customize-themes-panel .customize-section-title { 883 background: #fff; 884 color: #222; 885 padding: 10px 10px 11px 14px; 886 line-height: 21px; 887 cursor: pointer; 888 margin: 0 -8px 12px -8px; 889 } 890 891 .customize-section-title .action, 892 .accordion-section-title .action { 893 float: right; 894 background: #f5f5f5; 895 color: #222; 896 border-left: 1px solid #eee; 897 font-weight: bold; 898 font-size: 12px; 899 line-height: 42px; 900 margin: -10px -10px -11px 0; 901 padding: 0 12px; 902 transition: color .1s ease-in-out, 903 background .1s ease-in-out; 904 } 905 906 .customize-section-title .action { 907 background: #fff; 908 color: #0073aa; 909 } 910 911 .customize-section-title:hover .action, 912 .customize-section-title:focus .action, 913 .accordion-section-title:hover .action, 914 .accordion-section-title:focus .action { 915 background: #ddd; 916 color: #000; 917 border-left-color: #d9d9d9 918 } 919 920 .customize-section-title:hover .action, 921 .customize-section-title:focus .action { 922 background: #0073aa; 923 color: #fff; 924 } 925 855 926 #customize-theme-controls .customize-themes-panel .accordion-section-content { 856 927 background: transparent; 857 928 display: block; … … 889 960 890 961 /* Panel-like behavior */ 891 962 #accordion-section-themes .accordion-section-title:after { 892 content: "\f148";963 display: none; 893 964 } 894 965 895 .rtl #accordion-section-themes .accordion-section-title:after {896 -webkit-transform: rotate(180deg);897 -ms-transform: rotate(180deg);898 transform: rotate(180deg);899 }900 901 966 #customize-theme-controls .control-section.current-panel > h3.accordion-section-title { 902 967 left: 0; 903 968 } -
src/wp-admin/js/customize-controls.js
573 573 var section = this; 574 574 575 575 // Expand/Collapse section/panel. 576 section.container.find( '.accordion-section-title ' ).on( 'click keydown', function( event ) {576 section.container.find( '.accordion-section-title, .customize-section-title' ).on( 'click keydown', function( event ) { 577 577 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 578 578 return; 579 579 } … … 586 586 } 587 587 }); 588 588 589 section.container.find( '.themes-panel-back' ).on( 'click keydown', function( event ) {590 if ( api.utils.isKeydownButNotEnterEvent( event ) ) {591 return;592 }593 594 event.preventDefault(); // Keep this AFTER the key filter above595 596 section.collapse();597 });598 599 589 // Theme navigation in details view. 600 590 section.container.on( 'click keydown', '.left', function( event ) { 601 591 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { … … 679 669 container = section.closest( '.accordion-container' ), 680 670 siblings = container.find( '.open' ), 681 671 topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ), 682 backBtn = overlay.find( '.themes-panel-back' ),672 backBtn = section.find( '.customize-section-title' ), 683 673 panelTitle = section.find( '.accordion-section-title' ).first(), 684 674 content = section.find( '.control-panel-content' ); 685 675 … … 709 699 } 710 700 } ); 711 701 topPanel.attr( 'tabindex', '-1' ); 712 backBtn.attr( 'tabindex', '0' );713 702 backBtn.focus(); 714 703 } else { 715 704 siblings.removeClass( 'open' ); … … 722 711 } 723 712 } ); 724 713 topPanel.attr( 'tabindex', '0' ); 725 backBtn.attr( 'tabindex', '-1' );726 714 panelTitle.focus(); 727 715 container.scrollTop( 0 ); 728 716 } -
src/wp-includes/class-wp-customize-manager.php
1139 1139 // Theme Controls. 1140 1140 $themes = wp_prepare_themes_for_js(); 1141 1141 foreach ( $themes as $theme ) { 1142 if ( $theme['active'] ) { 1143 continue; 1144 } 1142 1145 $theme_id = 'theme_' . $theme['id']; 1143 1146 $this->add_control( new WP_Customize_Theme_Control( $this, $theme_id, array( 1144 1147 'theme' => $theme, -
src/wp-includes/class-wp-customize-section.php
343 343 <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>"> 344 344 <h3 class="accordion-section-title" tabindex="0"> 345 345 <?php echo esc_html( $this->title ); ?> 346 <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span> 346 <span class="action"><?php _e( 'Change' ); ?></span> 347 <span class="screen-reader-text"><?php _e( 'Press return or enter to change themes' ); ?></span> 347 348 </h3> 348 <span class="control-panel-back themes-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>349 349 <div class="customize-themes-panel control-panel-content themes-php"> 350 <h2><?php esc_html_e( 'Themes' ); ?> 351 <span class="title-count theme-count"><?php echo count( $this->controls ) - 1; ?></span> 352 <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?> 353 <a href="<?php echo admin_url( 'theme-install.php' ); ?>" target="_top" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a> 354 <?php endif; ?> 355 </h2> 350 <div class="customize-info"> 351 <span class="preview-notice"><span class="preview-action"><?php 352 echo sprintf( __( 'You are browsing %s' ), '</span><strong class="panel-title">' . __( 'Themes' ) . '</strong>' ); 353 ?><span class="title-count theme-count"><?php echo count( $this->controls ) - 1; ?></span> 354 </span> 355 <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?> 356 <a href="<?php echo admin_url( 'theme-install.php' ); ?>" target="_top" class="button"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a> 357 <?php endif; ?> 358 </div> 359 <h3 class="customize-section-title" tabindex="0"> 360 <?php echo sprintf( __( 'Previewing: %s' ), $this->manager->theme()->display('Name') ); ?> 361 <span class="action"><?php _e( 'Customize' ); ?></span> 362 <span class="screen-reader-text"><?php _e( 'Press return or enter to return to customize' ); ?></span> 363 </h3> 356 364 <div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme details' ); ?>"></div> 357 365 <div id="customize-container"></div> 358 366 <?php if ( 6 < count( $this->controls ) ) : ?>