JavaScript library with models, collections and views. Requires Underscore.js or Lo-Dash.

learn more… | top users | synonyms

0
votes
0answers
10 views

How could I add button next to “edit image” button in “Attachment Details”

How could I add button next to "edit image" button in "Attachment Details" This is the location I would like to add button, Do you have any recommend?
0
votes
0answers
3 views

Why are wp.mce.views re-created each time?

If you look in the mce-views.js of Wordpress you'll see something interesting - it references views by the text shortcode and looks them up in an array: /** * Get a view instance. * ...
0
votes
0answers
56 views

Modified wp.media.view.Settings.Gallery in Backbone JS, but editing doesn't work

I've added to the normal WordPress gallery popup (when clicking "Add Media" in the WordPress editor), in order to allow my custom gallery type to be selected (which interacts with / uses the main ...
1
vote
1answer
98 views

Adding fields to the media uploader with jquery listeners

So I have the code to successfully add a select field to my media uploader (gallery view) which is cool, but I also need to add some jquery listeners to that field. I'm using the ...
2
votes
0answers
98 views

Updating Post Meta with Backbone and the REST API

I'm getting started with a project that is making use of Backbone and the WP REST API, but I"m having a little trouble. Using the built in API JS for models and collections allows me to pretty easily ...
1
vote
1answer
139 views

How to check an ajax nonce in PHP

I'm modifying the media modal adding a new menu item to add external attachments to the media library. From the JS code I'm calling a PHP function that touches the database and accepts three ...
1
vote
1answer
110 views

How to retrieve a value from an input field in a media view template

I've created a media view template with two input fields (width and height) and I was wondering how to retrieve the values entered in them in a media controller o view. PHP: function ...
1
vote
0answers
97 views

How to trigger a refresh in the media modal

I'm developing a plugin that adds a new tab to the media modal, and I need to know a way trigger a refresh of the attachments tab so it shows newly added attachments. This is the code I'm using: ...
1
vote
1answer
128 views

Switch to the library tab in the media uploader

I'm developing a plugin that adds a tab to the media uploader to add external videos to the media library via oembed. Everything works as expected but I need to switch to the library tab after adding ...
1
vote
0answers
116 views

Refreshing collections in the admin media manager

I know this question is very similar to this previously asked question; however, I was wondering if there was a more up-to-date/official way to refresh content programmatically in the WordPress admin ...
0
votes
1answer
204 views

i'm trying to get all my media query attachments via ajax in wordpress

i'm trying to load all my media files via ajax: $.ajax({ url: '/wp-admin/admin-ajax.php', type: 'post', data: { 'action': 'query-attachments', 'post_id': 0, ...
0
votes
0answers
51 views

Why can't wp.mce.views system register an element shortcode?

The Wordpress wp-view system is a neat way to integrate wysiwyg shortcodes into the editor - Wordpress uses it for gallery and other shortcodes. But unfortunately it seems it only works for [shortcode ...
6
votes
1answer
212 views

Best approach when modifying the Media Manager

I am trying to edit the Media Manager to allow the selection of a new option in the "Link to" select field. This Backbone template is currently defined in media-template.php <label ...
0
votes
0answers
121 views

WordPress integration with Backbone or AngularJS

I'm learning AngularJS, but I notice that a lot of people use Backbone when doing themes with WordPress. Is the decision based on personal preference? or are there parts of the WordPress API made to ...
1
vote
2answers
359 views

Backbone.js and WP API

I'm creating a theme based on the underscore theme with Backbone.js integration. I am struggling to find any clear examples/documentation on the WP-API plugin's capabilities, and starting to find it ...
0
votes
0answers
50 views

Featured-image first image is broken image

I had recently noticed a problem specific to a theme I'm working on, where the "featured image" section fails on the post-editor page. It doesn't give a JS error, and comparing the source with the ...
0
votes
1answer
40 views

What does the “Show Images” do for Wordpress music playlist?

In the new audio playlist in Wordpress 3.9, you can check the options: Show Tracklist Show Artist Name in Tracklist Show Images The last option doesn't really make sense. There is no option to ...
5
votes
1answer
428 views

How to hook in and modify the new revisions UI (3.6+)?

Let's say I want to add some post_meta into the "new" revisions UI. I'm saving some meta on revisions only, and want to display it on this screen. Normally, I'd open up wp-admin/revisions.php look ...
0
votes
0answers
36 views

Backbone is breaking the media uploader

Greets, when using backbone in a plugin of mine the media uploader on the post edit page stops working properly. The uplaod button doesn't work anymore and the drag and drop functionality doesnt ...
0
votes
0answers
357 views

Custom shortcode editor [BackboneJS & TinyMCE)

I'm using Wordpress 3.9.1 and I wrote a custom shortcode that working, but I'd like to custom it a little bit When I use my shortcode, this is the render in the admin page : [toggles ...
0
votes
1answer
447 views

Implementing backbone.js to retrieve category posts using JSON API

Note: I reformulated this post after solving my original problem because I immediately ran into another problem that can fit under the same title. First I'll summarize the first problem and my ...
2
votes
0answers
566 views

Customizing the 3.5 “Add Media” popup (Backbone.js)

Here's yet another question in regard to the new(ish) 3.5 "Add Media" popup and how to customize it! What I'm trying to do I'm attempting to do four main things: 1) Create a custom tab titled ...
2
votes
2answers
640 views

Elegantly using JavaScript on widget admin forms

I'm working on a project involving a lot of widgets, and I'm thinking it'd be really great to have a "More options" section built using jQuery UI Accordion that expands when clicked. So, I've ...
7
votes
2answers
920 views

Using Backbone with the WordPress AJAX API

I'm attempting to build out a simple TODO plugin using Backbone and have run into an issue with the AJAX API. In order to get the correct AJAX call back you have to pass in the "action" parameter ...
2
votes
0answers
837 views

Pros and cons of using Backbone for WordPress theming [closed]

I've been noticing how Backbone seems to be the latest trend for WordPress theme development. A few data points: Backbone.js and WordPress development resources Theme Foundry's Collections theme. ...
5
votes
1answer
341 views

print_media_templates not applied in media manager plugin

I'm trying to build a media library where users can choose pictures that are being retrieved from custom folders, which they can specify the basefolder of. I am getting the correct images back, but ...
2
votes
1answer
385 views

Is there a hook to process a backbone restful PUT request inside wordpress?

I play around with Backbone.js (Great !) and want to synchronize my model data with the wordpress ajax api (3.6.1) on the server-side. Adapted to this ...
10
votes
1answer
2k views

Add filter function in media modal box

I'm trying to extend the media modal, but I cant' find any documentation / tutorials about it. I'm not a master of backbone too ;-) I want to add a select box for each taxonomy that is attached to ...
28
votes
1answer
1k views

Pre populate WordPress wp_media modal with image selection

I'm the developer of the Advanced Custom Fields plugin and am hoping you can help me out with an issue I am facing. I have a button where you can edit an image. This button will launch a WP 3.5 media ...
5
votes
1answer
2k views

Display attachments by ID in a wp.media frame

I'm trying to use the new wp.media uploader frame for an app I'm building. I've read up a lot on other questions, blog posts, etc etc. The code I pasted below is working already quite fine and even ...
3
votes
1answer
932 views

Using Underscore Templates in WordPress

I've noticed that since WP 3.5 that we now have the Backbone.js and Underscore.js libraries included. The new Media Modal uses Underscore templates and I was wondering how would I be able to insert ...