Backbone.js and WP API

I haven’t used the WP-API/JSON REST client plugin so far, but this is what I can see in source: The ~/js/models.js is the entry point for all requests, it seems. And every of the wp.api.models (to name a few: Page, Post, Media, Revision, etc.) is just an extension of Backbone.Model. And looking into the actual … Read more

Add filter function in media modal box

The wonderful world of Backbone.js and WP (of which I know barely anything). I think the problem is you are just calling the same default media.view, instead I believe you need to initialize a new one. For example: /** * Replace the media-toolbar with our own */ var myDrop = media.view.AttachmentsBrowser; media.view.AttachmentsBrowser = media.view.AttachmentsBrowser.extend({ createToolbar: … Read more