mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Customizer: Defer rendering theme controls until the section is displayed.
see #31793. Built from https://develop.svn.wordpress.org/trunk@31944 git-svn-id: http://core.svn.wordpress.org/trunk@31923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
efb2740e88
commit
79a29b077e
@ -1859,6 +1859,28 @@
|
||||
|
||||
touchDrag: false,
|
||||
|
||||
/**
|
||||
* Defer rendering the theme control until the section is displayed.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
renderContent: function () {
|
||||
var control = this,
|
||||
renderContentArgs = arguments;
|
||||
|
||||
api.section( control.section(), function ( section ) {
|
||||
if ( section.expanded() ) {
|
||||
api.Control.prototype.renderContent.apply( control, renderContentArgs );
|
||||
} else {
|
||||
section.expanded.bind( function ( expanded ) {
|
||||
if ( expanded ) {
|
||||
api.Control.prototype.renderContent.apply( control, renderContentArgs );
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* @since 4.2.0
|
||||
*/
|
||||
|
4
wp-admin/js/customize-controls.min.js
vendored
4
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-beta3-31943';
|
||||
$wp_version = '4.2-beta3-31944';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user