multisite-global-media icon indicating copy to clipboard operation
multisite-global-media copied to clipboard

Restoring image edit for current blog, preserving global media tab editing lock

Open darkfire56j opened this issue 4 years ago • 1 comments
trafficstars

I was struggling with a bug. All is fine with your plugin except one thing:

Enabling this plugin in my wordpress version (latest at today) suddenly introduce a bug: clicking in "edit image" for local blog images (I mean the regular Browse tab, not yours) does not work.

I fixed this changing your global-media.js file and reintroducing this to Select extend:

this.on('content:render:edit-image', this.editImageContent, this); and then:

editImageContent: function() {
    var image = this.state().get('image'),
        view = new wp.media.view.EditImage( { model: image, controller: this } ).render();

    this.content.set( view );

    // After creating the wrapper view, load the actual editor via an Ajax call.
    view.loadEditor();
},

I share this bugfix with you because I really appreciate your work <3

darkfire56j avatar Nov 08 '21 13:11 darkfire56j

Thanks @darkfire56j Would you create a fix for that, creating of a Pull Request?

bueltge avatar Nov 09 '23 08:11 bueltge