Customize Widgets: Don't return undefined items in getWidgetFormControls method.
props westonruter. fixes #31465. Built from https://develop.svn.wordpress.org/trunk@31570 git-svn-id: http://core.svn.wordpress.org/trunk@31551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8f44036ea7
commit
789cd2e824
|
@ -1709,20 +1709,20 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Get the widget_form Customize controls associated with the current sidebar.
|
||||
*
|
||||
* @since 3.9
|
||||
* @return {wp.customize.controlConstructor.widget_form[]}
|
||||
*/
|
||||
getWidgetFormControls: function() {
|
||||
var formControls;
|
||||
var formControls = [];
|
||||
|
||||
formControls = _( this.setting() ).map( function( widgetId ) {
|
||||
_( this.setting() ).each( function( widgetId ) {
|
||||
var settingId = widgetIdToSettingId( widgetId ),
|
||||
formControl = api.control( settingId );
|
||||
|
||||
if ( ! formControl ) {
|
||||
return;
|
||||
if ( formControl ) {
|
||||
formControls.push( formControl );
|
||||
}
|
||||
|
||||
return formControl;
|
||||
} );
|
||||
|
||||
return formControls;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31569';
|
||||
$wp_version = '4.2-alpha-31570';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue