Media Library: After [36546] restore the "Add new" functionality.
Rework handling of the `'toggle:upload:attachment'` event using `.on` vs `.listenTo` for better compatibility with the current version of Backbone. Props adamsilverstein. See #34350. Fixes #35853. Built from https://develop.svn.wordpress.org/trunk@36575 git-svn-id: http://core.svn.wordpress.org/trunk@36542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -3754,7 +3754,7 @@ AttachmentsBrowser = View.extend({
|
||||
AttachmentView: wp.media.view.Attachment.Library
|
||||
});
|
||||
|
||||
this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) );
|
||||
this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );
|
||||
this.controller.on( 'edit:selection', this.editSelection );
|
||||
this.createToolbar();
|
||||
if ( this.options.sidebar ) {
|
||||
|
||||
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36574';
|
||||
$wp_version = '4.5-alpha-36575';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user