Make WordPress Core

Ticket #30689: 30689.diff

File 30689.diff, 2.9 KB (added by wonderboymusic, 12 years ago)
  • src/wp-admin/js/customize-controls.js

     
    10491049                 */
    10501050                initFrame: function() {
    10511051                        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_type
    1058                                 },
    10591052                                button: {
    1060                                         // Change the submit button label.
    10611053                                        text: this.params.button_labels.frame_button
    10621054                                },
    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                                ]
    10641063                        });
    10651064
    10661065                        // When a file is selected, run a callback.
     
    12641263                                                title:     l10n.chooseImage,
    12651264                                                library:   wp.media.query({ type: 'image' }),
    12661265                                                multiple:  false,
     1266                                                date: false,
    12671267                                                priority:  20,
    12681268                                                suggestedWidth: _wpCustomizeHeader.data.width,
    12691269                                                suggestedHeight: _wpCustomizeHeader.data.height
  • src/wp-includes/js/media-views.js

     
    25982598                                sortable:   state.get('sortable'),
    25992599                                search:     state.get('searchable'),
    26002600                                filters:    state.get('filterable'),
     2601                                date:       state.get('date'),
    26012602                                display:    state.has('display') ? state.get('display') : state.get('displaySettings'),
    26022603                                dragInfo:   state.get('dragInfo'),
    26032604
     
    62276228         *                                              Accepts 'uploaded' and 'all'.
    62286229         * @param {object}      [options.search=true]   Whether to show the search interface in the
    62296230         *                                              browser's toolbar.
     6231         * @param {object}      [options.date=true]     Whether to show the date filter in the
     6232         *                                              browser's toolbar.
    62306233         * @param {object}      [options.display=false] Whether to show the attachments display settings
    62316234         *                                              view in the sidebar.
    62326235         * @param {bool|string} [options.sidebar=true]  Whether to create a sidebar for the browser.
     
    62406243                        _.defaults( this.options, {
    62416244                                filters: false,
    62426245                                search:  true,
     6246                                date:  true,
    62436247                                display: false,
    62446248                                sidebar: true,
    62456249                                AttachmentView: media.view.Attachment.Library
     
    64536457                                        }).render() );
    64546458                                }
    64556459
    6456                         } else {
     6460                        } else if ( this.options.date ) {
    64576461                                // DateFilter is a <select>, screen reader text needs to be rendered before
    64586462                                this.toolbar.set( 'dateFilterLabel', new media.view.Label({
    64596463                                        value: l10n.filterByDate,