Customizer: Remove date filter from the Header/Background Image upload frames.

Adds an option to `wp.media.view.AttachmentsBrowser` to hide the date filter added in [29813].

see #30689.

git-svn-id: https://develop.svn.wordpress.org/trunk@30872 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-12-15 20:26:54 +00:00
parent c17317912a
commit 663d12c8f8
2 changed files with 14 additions and 10 deletions

View File

@@ -1060,18 +1060,17 @@
*/
initFrame: function() {
this.frame = wp.media({
// The title of the media modal.
title: this.params.button_labels.frame_title,
// Restrict the library to specified mime type.
library: {
type: this.params.mime_type
},
button: {
// Change the submit button label.
text: this.params.button_labels.frame_button
},
multiple: false
states: [
new wp.media.controller.Library({
title: this.params.button_labels.frame_title,
library: wp.media.query({ type: this.params.mime_type }),
multiple: false,
date: false
})
]
});
// When a file is selected, run a callback.
@@ -1275,6 +1274,7 @@
title: l10n.chooseImage,
library: wp.media.query({ type: 'image' }),
multiple: false,
date: false,
priority: 20,
suggestedWidth: _wpCustomizeHeader.data.width,
suggestedHeight: _wpCustomizeHeader.data.height