Ticket #29211: 29211.diff
File 29211.diff, 21.7 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/customize-controls.js
1850 1850 this.btnNew.on( 'click', this.openMedia ); 1851 1851 this.btnRemove.on( 'click', this.removeImage ); 1852 1852 1853 api. HeaderTool.currentHeader = this.getInitialHeaderImage();1853 api.ImageCrop.currentHeader = this.getInitialHeaderImage(); 1854 1854 1855 new api. HeaderTool.CurrentView({1856 model: api. HeaderTool.currentHeader,1855 new api.ImageCrop.CurrentView({ 1856 model: api.ImageCrop.currentHeader, 1857 1857 el: '#customize-control-header_image .current .container' 1858 1858 }); 1859 1859 1860 new api. HeaderTool.ChoiceListView({1861 collection: api. HeaderTool.UploadsList = new api.HeaderTool.ChoiceList(),1860 new api.ImageCrop.ChoiceListView({ 1861 collection: api.ImageCrop.UploadsList = new api.ImageCrop.ChoiceList(), 1862 1862 el: '#customize-control-header_image .choices .uploaded .list' 1863 1863 }); 1864 1864 1865 new api. HeaderTool.ChoiceListView({1866 collection: api. HeaderTool.DefaultsList = new api.HeaderTool.DefaultsList(),1865 new api.ImageCrop.ChoiceListView({ 1866 collection: api.ImageCrop.DefaultsList = new api.ImageCrop.DefaultsList(), 1867 1867 el: '#customize-control-header_image .choices .default .list' 1868 1868 }); 1869 1869 1870 api. HeaderTool.combinedList = api.HeaderTool.CombinedList = new api.HeaderTool.CombinedList([1871 api. HeaderTool.UploadsList,1872 api. HeaderTool.DefaultsList1870 api.ImageCrop.combinedList = api.ImageCrop.CombinedList = new api.ImageCrop.CombinedList([ 1871 api.ImageCrop.UploadsList, 1872 api.ImageCrop.DefaultsList 1873 1873 ]); 1874 1874 }, 1875 1875 1876 1876 /** 1877 * Returns a new instance of api. HeaderTool.ImageModel based on the currently1877 * Returns a new instance of api.ImageCrop.ImageModel based on the currently 1878 1878 * saved header image (if any). 1879 1879 * 1880 1880 * @since 4.2.0 … … 1883 1883 */ 1884 1884 getInitialHeaderImage: function() { 1885 1885 if ( ! api.get().header_image || ! api.get().header_image_data || _.contains( [ 'remove-header', 'random-default-image', 'random-uploaded-image' ], api.get().header_image ) ) { 1886 return new api. HeaderTool.ImageModel();1886 return new api.ImageCrop.ImageModel(); 1887 1887 } 1888 1888 1889 1889 // Get the matching uploaded image object. … … 1899 1899 }; 1900 1900 } 1901 1901 1902 return new api. HeaderTool.ImageModel({1902 return new api.ImageCrop.ImageModel({ 1903 1903 header: currentHeaderObject, 1904 1904 choice: currentHeaderObject.url.split( '/' ).pop() 1905 1905 }); … … 1925 1925 realWidth = attachment.get('width'); 1926 1926 realHeight = attachment.get('height'); 1927 1927 1928 this.headerImage = new api. HeaderTool.ImageModel();1928 this.headerImage = new api.ImageCrop.ImageModel(); 1929 1929 this.headerImage.set({ 1930 1930 themeWidth: xInit, 1931 1931 themeHeight: yInit, … … 2050 2050 }, 2051 2051 2052 2052 /** 2053 * Creates a new wp.customize. HeaderTool.ImageModel from provided2053 * Creates a new wp.customize.ImageCrop.ImageModel from provided 2054 2054 * header image data and inserts it into the user-uploaded headers 2055 2055 * collection. 2056 2056 * … … 2078 2078 data.height = height; 2079 2079 } 2080 2080 2081 choice = new api. HeaderTool.ImageModel({2081 choice = new api.ImageCrop.ImageModel({ 2082 2082 header: data, 2083 2083 choice: url.split('/').pop() 2084 2084 }); 2085 api. HeaderTool.UploadsList.add(choice);2086 api. HeaderTool.currentHeader.set(choice.toJSON());2085 api.ImageCrop.UploadsList.add(choice); 2086 api.ImageCrop.currentHeader.set(choice.toJSON()); 2087 2087 choice.save(); 2088 2088 choice.importImage(); 2089 2089 }, … … 2093 2093 * the currently selected one. 2094 2094 */ 2095 2095 removeImage: function() { 2096 api. HeaderTool.currentHeader.trigger('hide');2097 api. HeaderTool.CombinedList.trigger('control:removeImage');2096 api.ImageCrop.currentHeader.trigger('hide'); 2097 api.ImageCrop.CombinedList.trigger('control:removeImage'); 2098 2098 } 2099 2099 2100 2100 }); -
src/wp-includes/class-wp-customize-control.php
997 997 } 998 998 999 999 /** 1000 * Customize HeaderImage Control class.1000 * Customize Cropped Image Control class. 1001 1001 * 1002 * @since 3.4.01002 * @since 4.3.0 1003 1003 * 1004 1004 * @see WP_Customize_Image_Control 1005 1005 */ 1006 class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { 1007 public $type = 'header'; 1008 public $uploaded_headers; 1009 public $default_headers; 1006 class WP_Customize_Cropped_Image_Control extends WP_Customize_Image_Control { 1007 public $type = 'cropped-image'; 1010 1008 1011 /** 1012 * @param WP_Customize_Manager $manager 1013 */ 1014 public function __construct( $manager ) { 1015 parent::__construct( $manager, 'header_image', array( 1016 'label' => __( 'Header Image' ), 1017 'settings' => array( 1018 'default' => 'header_image', 1019 'data' => 'header_image_data', 1020 ), 1021 'section' => 'header_image', 1022 'removed' => 'remove-header', 1023 'get_url' => 'get_header_image', 1024 ) ); 1009 protected $width = 150; 1010 protected $height = 150; 1011 protected $flex_width = false; 1012 protected $flex_height = false; 1013 protected $localized_name; 1014 protected $current_title = ''; 1025 1015 1026 } 1016 protected $uploaded_images = array(); 1017 protected $default_images = array(); 1027 1018 1028 1019 /** 1029 1020 * @access public … … 1034 1025 1035 1026 $this->prepare_control(); 1036 1027 1037 wp_localize_script( 'customize-views', '_wpCustomizeHeader', array(1028 wp_localize_script( 'customize-views', $this->localized_name, array( 1038 1029 'data' => array( 1039 'width' => absint( get_theme_support( 'custom-header', 'width' ) ), 1040 'height' => absint( get_theme_support( 'custom-header', 'height' ) ), 1041 'flex-width' => absint( get_theme_support( 'custom-header', 'flex-width' ) ), 1042 'flex-height' => absint( get_theme_support( 'custom-header', 'flex-height' ) ), 1043 'currentImgSrc' => $this->get_current_image_src(), 1030 'width' => absint( $this->width ), 1031 'height' => absint( $this->height ), 1032 'flex-width' => absint( $this->flex_width ), 1033 'flex-height' => absint( $this->flex_height ), 1044 1034 ), 1045 1035 'nonces' => array( 1046 1036 'add' => wp_create_nonce( 'header-add' ), 1047 1037 'remove' => wp_create_nonce( 'header-remove' ), 1048 1038 ), 1049 'uploads' => $this->uploaded_headers,1050 'defaults' => $this->default_ headers1039 'uploads' => $this->uploaded_images, 1040 'defaults' => $this->default_images 1051 1041 ) ); 1052 1042 1053 1043 parent::enqueue(); … … 1054 1044 } 1055 1045 1056 1046 /** 1057 *1058 * @global Custom_Image_Header $custom_image_header1059 */1060 public function prepare_control() {1061 global $custom_image_header;1062 if ( empty( $custom_image_header ) ) {1063 return;1064 }1065 1066 // Process default headers and uploaded headers.1067 $custom_image_header->process_default_headers();1068 $this->default_headers = $custom_image_header->get_default_header_images();1069 $this->uploaded_headers = $custom_image_header->get_uploaded_header_images();1070 }1071 1072 /**1073 1047 * @access public 1074 1048 */ 1075 public function print_ header_image_template() {1049 public function print_crop_image_template() { 1076 1050 ?> 1077 <script type="text/template" id="tmpl-header-choice"> 1078 <# if (data.random) { #> 1079 <button type="button" class="button display-options random"> 1080 <span class="dashicons dashicons-randomize dice"></span> 1081 <# if ( data.type === 'uploaded' ) { #> 1082 <?php _e( 'Randomize uploaded headers' ); ?> 1083 <# } else if ( data.type === 'default' ) { #> 1084 <?php _e( 'Randomize suggested headers' ); ?> 1085 <# } #> 1086 </button> 1087 1088 <# } else { #> 1089 1090 <# if (data.type === 'uploaded') { #> 1091 <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button> 1092 <# } #> 1093 1094 <button type="button" class="choice thumbnail" 1095 data-customize-image-value="{{{data.header.url}}}" 1096 data-customize-header-image-data="{{JSON.stringify(data.header)}}"> 1097 <span class="screen-reader-text"><?php _e( 'Set image' ); ?></span> 1098 <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}"> 1099 </button> 1100 1101 <# } #> 1102 </script> 1103 1104 <script type="text/template" id="tmpl-header-current"> 1051 <script type="text/template" id="tmpl-cropped-current"> 1105 1052 <# if (data.choice) { #> 1106 1053 <# if (data.random) { #> 1107 1054 … … 1138 1085 } 1139 1086 1140 1087 /** 1141 * @return string|void1142 */1143 public function get_current_image_src() {1144 $src = $this->value();1145 if ( isset( $this->get_url ) ) {1146 $src = call_user_func( $this->get_url, $src );1147 return $src;1148 }1149 }1150 1151 /**1152 1088 * @access public 1153 1089 */ 1154 1090 public function render_content() { 1155 $this->print_ header_image_template();1156 $visibility = $this->get_current_image_src() ? '' : ' style="display:none" '; 1157 $width = absint( get_theme_support( 'custom-header', 'width' ));1158 $height = absint( get_theme_support( 'custom-header', 'height' ));1091 $this->print_crop_image_template(); 1092 1093 $width = absint( $this->width ); 1094 $height = absint( $this->height ); 1159 1095 ?> 1160 1096 1161 1162 1097 <div class="customize-control-content"> 1163 1098 <p class="customizer-section-intro"> 1164 1099 <?php 1165 1100 if ( $width && $height ) { 1166 printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a headersize of <strong>%s × %s</strong> pixels.' ), $width, $height );1101 printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a size of <strong>%s × %s</strong> pixels.' ), $width, $height ); 1167 1102 } elseif ( $width ) { 1168 printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a headerwidth of <strong>%s</strong> pixels.' ), $width );1103 printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a width of <strong>%s</strong> pixels.' ), $width ); 1169 1104 } else { 1170 printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a he ader height of <strong>%s</strong> pixels.' ), $height );1105 printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a height of <strong>%s</strong> pixels.' ), $height ); 1171 1106 } 1172 1107 ?> 1173 1108 </p> 1174 1109 <div class="current"> 1175 1110 <span class="customize-control-title"> 1176 <?php _e( 'Current header' ); ?>1111 <?php echo $this->current_title; ?> 1177 1112 </span> 1178 1113 <div class="container"> 1179 1114 </div> 1180 1115 </div> 1181 1116 <div class="actions"> 1182 <?php /* translators: Hide as in hide headerimage via the Customizer */ ?>1183 <button type="button" <?php echo $visibility ?> class="button remove"><?php _ex( 'Hide image', 'custom header' ); ?></button>1184 <?php /* translators: New as in add new headerimage via the Customizer */ ?>1185 <button type="button" class="button new"><?php _ex( 'Add new image', ' headerimage' ); ?></button>1117 <?php /* translators: Hide as in hide cropped image via the Customizer */ ?> 1118 <button type="button" class="button remove"><?php _ex( 'Hide image', 'crop image' ); ?></button> 1119 <?php /* translators: New as in add new cropped image via the Customizer */ ?> 1120 <button type="button" class="button new"><?php _ex( 'Add new image', 'cropped image' ); ?></button> 1186 1121 <div style="clear:both"></div> 1187 1122 </div> 1188 1123 <div class="choices"> 1189 <span class="customize-control-title header-previously-uploaded">1190 <?php _ex( 'Previously uploaded', 'c ustom headers' ); ?>1124 <span class="customize-control-title cropped-image-previously-uploaded"> 1125 <?php _ex( 'Previously uploaded', 'cropped images' ); ?> 1191 1126 </span> 1192 1127 <div class="uploaded"> 1193 1128 <div class="list"> 1194 1129 </div> 1195 1130 </div> 1196 <span class="customize-control-title header-default">1197 <?php _ex( 'Suggested', 'c ustom headers' ); ?>1131 <span class="customize-control-title cropped-image-default"> 1132 <?php _ex( 'Suggested', 'cropped images' ); ?> 1198 1133 </span> 1199 1134 <div class="default"> 1200 1135 <div class="list"> … … 1207 1142 } 1208 1143 1209 1144 /** 1145 * Customize Header Image Control class. 1146 * 1147 * @since 3.4.0 1148 * 1149 * @see WP_Customize_Cropped_Image_Control 1150 */ 1151 class WP_Customize_Header_Image_Control extends WP_Customize_Cropped_Image_Control { 1152 public $type = 'header'; 1153 1154 /** 1155 * @param WP_Customize_Manager $manager 1156 */ 1157 public function __construct( $manager ) { 1158 parent::__construct( $manager, 'header_image', array( 1159 'label' => __( 'Header Image' ), 1160 'settings' => array( 1161 'default' => 'header_image', 1162 'data' => 'header_image_data', 1163 ), 1164 'section' => 'header_image', 1165 'removed' => 'remove-header', 1166 'get_url' => 'get_header_image', 1167 'current_title' => __( 'Current header' ), 1168 ) ); 1169 1170 $this->width = get_theme_support( 'custom-header', 'width' ); 1171 $this->height = get_theme_support( 'custom-header', 'height' ); 1172 $this->flex_width = get_theme_support( 'custom-header', 'flex-width' ); 1173 $this->flex_height = get_theme_support( 'custom-header', 'flex-height' ); 1174 $this->localized_name = '_wpCustomizeHeader'; 1175 } 1176 1177 /** 1178 * 1179 * @global Custom_Image_Header $custom_image_header 1180 */ 1181 public function prepare_control() { 1182 global $custom_image_header; 1183 1184 if ( empty( $custom_image_header ) ) { 1185 return; 1186 } 1187 1188 // Process default headers and uploaded headers. 1189 $custom_image_header->process_default_headers(); 1190 $this->default_images = $custom_image_header->get_default_header_images(); 1191 $this->uploaded_images = $custom_image_header->get_uploaded_header_images(); 1192 } 1193 1194 /** 1195 * @access public 1196 */ 1197 public function print_header_image_template() { 1198 ?> 1199 <script type="text/template" id="tmpl-header-choice"> 1200 <# if (data.random) { #> 1201 <button type="button" class="button display-options random"> 1202 <span class="dashicons dashicons-randomize dice"></span> 1203 <# if ( data.type === 'uploaded' ) { #> 1204 <?php _e( 'Randomize uploaded headers' ); ?> 1205 <# } else if ( data.type === 'default' ) { #> 1206 <?php _e( 'Randomize suggested headers' ); ?> 1207 <# } #> 1208 </button> 1209 1210 <# } else { #> 1211 1212 <# if (data.type === 'uploaded') { #> 1213 <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button> 1214 <# } #> 1215 1216 <button type="button" class="choice thumbnail" 1217 data-customize-image-value="{{{data.header.url}}}" 1218 data-customize-header-image-data="{{JSON.stringify(data.header)}}"> 1219 <span class="screen-reader-text"><?php _e( 'Set image' ); ?></span> 1220 <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}"> 1221 </button> 1222 1223 <# } #> 1224 </script> 1225 <?php 1226 } 1227 1228 /** 1229 * @access public 1230 */ 1231 public function render_content() { 1232 $this->print_header_image_template(); 1233 1234 parent::render_content(); 1235 } 1236 } 1237 1238 /** 1210 1239 * Customize Theme Control class. 1211 1240 * 1212 1241 * @since 4.2.0 -
src/wp-includes/js/customize-models.js
1 1 /* globals _wpCustomizeHeader, _ */ 2 2 (function( $, wp ) { 3 3 var api = wp.customize; 4 api. HeaderTool= {};4 api.ImageCrop = {}; 5 5 6 6 7 7 /** 8 * wp.customize. HeaderTool.ImageModel8 * wp.customize.ImageCrop.ImageModel 9 9 * 10 10 * A header image. This is where saves via the Customizer API are 11 11 * abstracted away, plus our own AJAX calls to add images to and remove … … 16 16 * @constructor 17 17 * @augments Backbone.Model 18 18 */ 19 api. HeaderTool.ImageModel = Backbone.Model.extend({19 api.ImageCrop.ImageModel = Backbone.Model.extend({ 20 20 defaults: function() { 21 21 return { 22 22 header: { … … 43 43 44 44 destroy: function() { 45 45 var data = this.get('header'), 46 curr = api. HeaderTool.currentHeader.get('header').attachment_id;46 curr = api.ImageCrop.currentHeader.get('header').attachment_id; 47 47 48 48 // If the image we're removing is also the current header, unset 49 49 // the latter 50 50 if (curr && data.attachment_id === curr) { 51 api. HeaderTool.currentHeader.trigger('hide');51 api.ImageCrop.currentHeader.trigger('hide'); 52 52 } 53 53 54 54 wp.ajax.post( 'custom-header-remove', { … … 75 75 } 76 76 } 77 77 78 api. HeaderTool.combinedList.trigger('control:setImage', this);78 api.ImageCrop.combinedList.trigger('control:setImage', this); 79 79 }, 80 80 81 81 importImage: function() { … … 123 123 124 124 125 125 /** 126 * wp.customize. HeaderTool.ChoiceList126 * wp.customize.ImageCrop.ChoiceList 127 127 * 128 128 * @constructor 129 129 * @augments Backbone.Collection 130 130 */ 131 api. HeaderTool.ChoiceList = Backbone.Collection.extend({132 model: api. HeaderTool.ImageModel,131 api.ImageCrop.ChoiceList = Backbone.Collection.extend({ 132 model: api.ImageCrop.ImageModel, 133 133 134 134 // Ordered from most recently used to least 135 135 comparator: function(model) { … … 137 137 }, 138 138 139 139 initialize: function() { 140 var current = api. HeaderTool.currentHeader.get('choice').replace(/^https?:\/\//, ''),140 var current = api.ImageCrop.currentHeader.get('choice').replace(/^https?:\/\//, ''), 141 141 isRandom = this.isRandomChoice(api.get().header_image); 142 142 143 143 // Overridable by an extending class … … 230 230 231 231 232 232 /** 233 * wp.customize. HeaderTool.DefaultsList233 * wp.customize.ImageCrop.DefaultsList 234 234 * 235 235 * @constructor 236 * @augments wp.customize. HeaderTool.ChoiceList236 * @augments wp.customize.ImageCrop.ChoiceList 237 237 * @augments Backbone.Collection 238 238 */ 239 api. HeaderTool.DefaultsList = api.HeaderTool.ChoiceList.extend({239 api.ImageCrop.DefaultsList = api.ImageCrop.ChoiceList.extend({ 240 240 initialize: function() { 241 241 this.type = 'default'; 242 242 this.data = _wpCustomizeHeader.defaults; 243 api. HeaderTool.ChoiceList.prototype.initialize.apply(this);243 api.ImageCrop.ChoiceList.prototype.initialize.apply(this); 244 244 } 245 245 }); 246 246 -
src/wp-includes/js/customize-views.js
5 5 6 6 7 7 /** 8 * wp.customize. HeaderTool.CurrentView8 * wp.customize.ImageCrop.CurrentView 9 9 * 10 * Displays the currently selected headerimage, or a placeholder in lack10 * Displays the currently selected image, or a placeholder in lack 11 11 * thereof. 12 12 * 13 * Instantiate with model wp.customize. HeaderTool.currentHeader.13 * Instantiate with model wp.customize.ImageCrop.currentHeader. 14 14 * 15 15 * @constructor 16 16 * @augments wp.Backbone.View 17 17 */ 18 api. HeaderTool.CurrentView = wp.Backbone.View.extend({19 template: wp.template(' header-current'),18 api.ImageCrop.CurrentView = wp.Backbone.View.extend({ 19 template: wp.template('cropped-current'), 20 20 21 21 initialize: function() { 22 22 this.listenTo(this.model, 'change', this.render); … … 81 81 82 82 83 83 /** 84 * wp.customize. HeaderTool.ChoiceView84 * wp.customize.ImageCrop.ChoiceView 85 85 * 86 86 * Represents a choosable header image, be it user-uploaded, 87 87 * theme-suggested or a special Randomize choice. 88 88 * 89 * Takes a wp.customize. HeaderTool.ImageModel.89 * Takes a wp.customize.ImageCrop.ImageModel. 90 90 * 91 * Manually changes model wp.customize. HeaderTool.currentHeader via the91 * Manually changes model wp.customize.ImageCrop.currentHeader via the 92 92 * `select` method. 93 93 * 94 94 * @constructor 95 95 * @augments wp.Backbone.View 96 96 */ 97 api. HeaderTool.ChoiceView = wp.Backbone.View.extend({97 api.ImageCrop.ChoiceView = wp.Backbone.View.extend({ 98 98 template: wp.template('header-choice'), 99 99 100 100 className: 'header-view', … … 113 113 this.listenTo(this.model, 'change:selected', this.toggleSelected); 114 114 115 115 if (_.contains(properties, api.get().header_image)) { 116 api. HeaderTool.currentHeader.set(this.extendedModel());116 api.ImageCrop.currentHeader.set(this.extendedModel()); 117 117 } 118 118 }, 119 119 … … 135 135 }); 136 136 }, 137 137 138 getHeight: api. HeaderTool.CurrentView.prototype.getHeight,138 getHeight: api.ImageCrop.CurrentView.prototype.getHeight, 139 139 140 setPlaceholder: api. HeaderTool.CurrentView.prototype.setPlaceholder,140 setPlaceholder: api.ImageCrop.CurrentView.prototype.setPlaceholder, 141 141 142 142 select: function() { 143 143 this.preventJump(); 144 144 this.model.save(); 145 api. HeaderTool.currentHeader.set(this.extendedModel());145 api.ImageCrop.currentHeader.set(this.extendedModel()); 146 146 }, 147 147 148 148 preventJump: function() { … … 163 163 164 164 165 165 /** 166 * wp.customize. HeaderTool.ChoiceListView166 * wp.customize.ImageCrop.ChoiceListView 167 167 * 168 168 * A container for ChoiceViews. These choices should be of one same type: 169 169 * user-uploaded headers or theme-defined ones. 170 170 * 171 * Takes a wp.customize. HeaderTool.ChoiceList.171 * Takes a wp.customize.ImageCrop.ChoiceList. 172 172 * 173 173 * @constructor 174 174 * @augments wp.Backbone.View 175 175 */ 176 api. HeaderTool.ChoiceListView = wp.Backbone.View.extend({176 api.ImageCrop.ChoiceListView = wp.Backbone.View.extend({ 177 177 initialize: function() { 178 178 this.listenTo(this.collection, 'add', this.addOne); 179 179 this.listenTo(this.collection, 'remove', this.render); … … 191 191 addOne: function(choice) { 192 192 var view; 193 193 choice.set({ collection: this.collection }); 194 view = new api. HeaderTool.ChoiceView({ model: choice });194 view = new api.ImageCrop.ChoiceView({ model: choice }); 195 195 this.$el.append(view.render().el); 196 196 }, 197 197 … … 208 208 209 209 210 210 /** 211 * wp.customize. HeaderTool.CombinedList211 * wp.customize.ImageCrop.CombinedList 212 212 * 213 * Aggregates wp.customize. HeaderTool.ChoiceList collections (or any213 * Aggregates wp.customize.ImageCrop.ChoiceList collections (or any 214 214 * Backbone object, really) and acts as a bus to feed them events. 215 215 * 216 216 * @constructor 217 217 * @augments wp.Backbone.View 218 218 */ 219 api. HeaderTool.CombinedList = wp.Backbone.View.extend({219 api.ImageCrop.CombinedList = wp.Backbone.View.extend({ 220 220 initialize: function(collections) { 221 221 this.collections = collections; 222 222 this.on('all', this.propagate, this);