Ticket #30689: 30689.diff
| File 30689.diff, 2.9 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/js/customize-controls.js
1049 1049 */ 1050 1050 initFrame: function() { 1051 1051 this.frame = wp.media({ 1052 // The title of the media modal.1053 title: this.params.button_labels.frame_title,1054 1055 // Restrict the library to specified mime type.1056 library: {1057 type: this.params.mime_type1058 },1059 1052 button: { 1060 // Change the submit button label.1061 1053 text: this.params.button_labels.frame_button 1062 1054 }, 1063 multiple: false 1055 states: [ 1056 new wp.media.controller.Library({ 1057 title: this.params.button_labels.frame_title, 1058 library: wp.media.query({ type: this.params.mime_type }), 1059 multiple: false, 1060 date: false 1061 }) 1062 ] 1064 1063 }); 1065 1064 1066 1065 // When a file is selected, run a callback. … … 1264 1263 title: l10n.chooseImage, 1265 1264 library: wp.media.query({ type: 'image' }), 1266 1265 multiple: false, 1266 date: false, 1267 1267 priority: 20, 1268 1268 suggestedWidth: _wpCustomizeHeader.data.width, 1269 1269 suggestedHeight: _wpCustomizeHeader.data.height -
src/wp-includes/js/media-views.js
2598 2598 sortable: state.get('sortable'), 2599 2599 search: state.get('searchable'), 2600 2600 filters: state.get('filterable'), 2601 date: state.get('date'), 2601 2602 display: state.has('display') ? state.get('display') : state.get('displaySettings'), 2602 2603 dragInfo: state.get('dragInfo'), 2603 2604 … … 6227 6228 * Accepts 'uploaded' and 'all'. 6228 6229 * @param {object} [options.search=true] Whether to show the search interface in the 6229 6230 * browser's toolbar. 6231 * @param {object} [options.date=true] Whether to show the date filter in the 6232 * browser's toolbar. 6230 6233 * @param {object} [options.display=false] Whether to show the attachments display settings 6231 6234 * view in the sidebar. 6232 6235 * @param {bool|string} [options.sidebar=true] Whether to create a sidebar for the browser. … … 6240 6243 _.defaults( this.options, { 6241 6244 filters: false, 6242 6245 search: true, 6246 date: true, 6243 6247 display: false, 6244 6248 sidebar: true, 6245 6249 AttachmentView: media.view.Attachment.Library … … 6453 6457 }).render() ); 6454 6458 } 6455 6459 6456 } else {6460 } else if ( this.options.date ) { 6457 6461 // DateFilter is a <select>, screen reader text needs to be rendered before 6458 6462 this.toolbar.set( 'dateFilterLabel', new media.view.Label({ 6459 6463 value: l10n.filterByDate,
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)