mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
Customizer: Allow custom accordion items with obsolete structure.
In [59224], customizer accordion item HTML structure was changed to include a `button` element as the interactive control. However, some themes inject custom markup for panel headings. Fix `controls.js` to handle both the new markup and the old markup, which is relatively common in themes. Props paullb, desrosj, sabernhardt, joedolson, jorbin. Fixes #62494. Built from https://develop.svn.wordpress.org/trunk@59555 git-svn-id: http://core.svn.wordpress.org/trunk@58941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
988751f0bf
commit
c05ab18981
|
|
@ -1530,7 +1530,7 @@
|
|||
}
|
||||
|
||||
// Expand/Collapse accordion sections on click.
|
||||
section.container.find( '.accordion-section-title button, .customize-section-back' ).on( 'click keydown', function( event ) {
|
||||
section.container.find( '.accordion-section-title button, .customize-section-back, .accordion-section-title[tabindex]' ).on( 'click keydown', function( event ) {
|
||||
if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1605,7 +1605,7 @@
|
|||
content = section.contentContainer,
|
||||
overlay = section.headContainer.closest( '.wp-full-overlay' ),
|
||||
backBtn = content.find( '.customize-section-back' ),
|
||||
sectionTitle = section.headContainer.find( '.accordion-section-title button' ).first(),
|
||||
sectionTitle = section.headContainer.find( '.accordion-section-title button, .accordion-section-title[tabindex]' ).first(),
|
||||
expand, panel;
|
||||
|
||||
if ( expanded && ! content.hasClass( 'open' ) ) {
|
||||
|
|
@ -2694,7 +2694,7 @@
|
|||
container = section.headContainer.closest( '.wp-full-overlay-sidebar-content' ),
|
||||
content = section.contentContainer,
|
||||
backBtn = content.find( '.customize-section-back' ),
|
||||
sectionTitle = section.headContainer.find( '.accordion-section-title button' ).first(),
|
||||
sectionTitle = section.headContainer.find( '.accordion-section-title button, .accordion-section-title[tabindex]' ).first(),
|
||||
body = $( document.body ),
|
||||
expand, panel;
|
||||
|
||||
|
|
@ -2833,7 +2833,7 @@
|
|||
var meta, panel = this;
|
||||
|
||||
// Expand/Collapse accordion sections on click.
|
||||
panel.headContainer.find( '.accordion-section-title button' ).on( 'click keydown', function( event ) {
|
||||
panel.headContainer.find( '.accordion-section-title button, .accordion-section-title[tabindex]' ).on( 'click keydown', function( event ) {
|
||||
if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2937,7 +2937,7 @@
|
|||
accordionSection = panel.contentContainer,
|
||||
overlay = accordionSection.closest( '.wp-full-overlay' ),
|
||||
container = accordionSection.closest( '.wp-full-overlay-sidebar-content' ),
|
||||
topPanel = panel.headContainer.find( '.accordion-section-title button' ),
|
||||
topPanel = panel.headContainer.find( '.accordion-section-title button, .accordion-section-title[tabindex]' ),
|
||||
backBtn = accordionSection.find( '.customize-panel-back' ),
|
||||
childSections = panel.sections(),
|
||||
skipTransition;
|
||||
|
|
|
|||
2
wp-admin/js/customize-controls.min.js
vendored
2
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59554';
|
||||
$wp_version = '6.8-alpha-59555';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user