Changeset 41961
- Timestamp:
- 10/21/2017 08:50:43 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r41960 r41961 7636 7636 // Create Panels 7637 7637 $.each( api.settings.panels, function ( id, data ) { 7638 var Constructor = api.panelConstructor[ data.type ] || api.Panel; 7639 api.panel.add( new Constructor( id, data ) ); 7638 var Constructor = api.panelConstructor[ data.type ] || api.Panel, options; 7639 options = _.extend( { params: data }, data ); // Inclusion of params alias is for back-compat for custom panels that expect to augment this property. 7640 api.panel.add( new Constructor( id, options ) ); 7640 7641 }); 7641 7642 7642 7643 // Create Sections 7643 7644 $.each( api.settings.sections, function ( id, data ) { 7644 var Constructor = api.sectionConstructor[ data.type ] || api.Section; 7645 api.section.add( new Constructor( id, data ) ); 7645 var Constructor = api.sectionConstructor[ data.type ] || api.Section, options; 7646 options = _.extend( { params: data }, data ); // Inclusion of params alias is for back-compat for custom sections that expect to augment this property. 7647 api.section.add( new Constructor( id, options ) ); 7646 7648 }); 7647 7649 7648 7650 // Create Controls 7649 7651 $.each( api.settings.controls, function( id, data ) { 7650 var Constructor = api.controlConstructor[ data.type ] || api.Control; 7651 api.control.add( new Constructor( id, data ) ); 7652 var Constructor = api.controlConstructor[ data.type ] || api.Control, options; 7653 options = _.extend( { params: data }, data ); // Inclusion of params alias is for back-compat for custom controls that expect to augment this property. 7654 api.control.add( new Constructor( id, options ) ); 7652 7655 }); 7653 7656
Note: See TracChangeset
for help on using the changeset viewer.