Articles of media model

Wp3.5 Media Gallery Edit modal: change captions to title

How can i change those editing inputs to title from caption? Some sources i found about new upload system: Using the WordPress 3.5 Media Uploader within plugins How to Add the WordPress 3.5 Media Manager Interface Basically looking for a proper solution like this: // // If you want to have the editor default […]

Add control in image detail panel

I am trying to add a checkbox control in the image details popup (when editing image in a post). I have added the following code in my template function.php but I can’t manage to display the checkbox in the popup. What am I missing? function bluesolutions_customize_register($wp_customize) { $wp_customize->add_section(‘bluesolutions_use_lighbox_section’, array( ‘title’ => __(‘Lightbox’, ‘mytheme’), ‘description’ => […]

Refresh after ajax call

I’m building a plugin where I add a tab to the media manager and can add stuff from another source. I add the tab with this, which generates a iframe: add_filter(‘media_upload_tabs’, ‘add_myUpload_tab’); function add_myUpload_tab($tabs) { $tabs[‘myTab’] = “My tab”; Return $tabs; } add_action(‘media_upload_myTab’, ‘add_myUpload_save_page’); function add_myUpload_save_page() { wp_iframe( ‘myTab_save_frame’ ); } function myTab_save_frame() { echo […]

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 them, especially in the admin side of things.Is there a correct way to insert these?

Expanding new Media Uploader in WordPress 3.5

In current version of WordPress it is quite easy to expand the attachments fields using attachment_fields_to_edit filter, but in latest WordPress 3.5 RC2 it’s not working. We can expand it using custom meta fields, but using this requires editing each attachment in Media tb. I was wondering if it is possible to expand fields in […]

How to restrict images in v3.5 Media Library modal to only those from a specific post id?

How can someone restrict the images which appear in the v3.5 Media Library modal to only show those that are attached to a specific post id? I’m creating a front-end management template that allows multiple authors to edit any particular post, hence the need to restrict what is shown on a post-by-post basis rather than […]

WordPress 3.5 Media Manager – add a button

In my plugin, I would like to add two buttons to Media Manager (to the left of “Insert Into Post” in “media-toolbar-primary” section), and connect a jQuery action to it. First one – The “Select All” button shoud allow to select all availabe images (only images), depending on option value selected (eg. All Media Items, […]

Using the WordPress 3.5 Media Uploader window as a modal popup

I have a general question: is it possible to use the new WordPress 3.5 Media Uploader window for other purposes (i.e., as a modal popup window for content)? I would like to do this and have spent a lot of time trying to figure out if/how to do it but have had NO luck. I’m […]

Enhance Media Manager for Gallery

I would like to enhance the Media Editor, after WordPress 3.5, on the gallery view. I want to add a new select field on the right side and send the selected values to the gallery shortcode. I think, the function in wp-includes/js/media-editor.js is the default function to insert the gallery shortcode. I want to […]

Trigger refresh for new media manager in 3.5

I’m trying to figure out how it’s possible to ‘refresh’ the media library in the new media dialogue in 3.5. I’m adding images from an external image library to the WordPress library (via a tab/iFrame combo in the media dialogue) which works ok, but I have to close and reopen the dialogue in order to […]