- Timestamp:
- 12/15/2014 08:26:54 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r30871 r30872 1061 1061 initFrame: function() { 1062 1062 this.frame = wp.media({ 1063 // The title of the media modal.1064 title: this.params.button_labels.frame_title,1065 1066 // Restrict the library to specified mime type.1067 library: {1068 type: this.params.mime_type1069 },1070 1063 button: { 1071 // Change the submit button label.1072 1064 text: this.params.button_labels.frame_button 1073 1065 }, 1074 multiple: false 1066 states: [ 1067 new wp.media.controller.Library({ 1068 title: this.params.button_labels.frame_title, 1069 library: wp.media.query({ type: this.params.mime_type }), 1070 multiple: false, 1071 date: false 1072 }) 1073 ] 1075 1074 }); 1076 1075 … … 1276 1275 library: wp.media.query({ type: 'image' }), 1277 1276 multiple: false, 1277 date: false, 1278 1278 priority: 20, 1279 1279 suggestedWidth: _wpCustomizeHeader.data.width, -
trunk/src/wp-includes/js/media-views.js
r30792 r30872 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'), … … 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. … … 6241 6244 filters: false, 6242 6245 search: true, 6246 date: true, 6243 6247 display: false, 6244 6248 sidebar: true, … … 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({
Note: See TracChangeset
for help on using the changeset viewer.