Questions tagged [media-modal]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
640 views

Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?

The post editor helpfully removes default arguments like columns="3" from the [gallery] shortcode. How do you tell it to remove a custom attribute that has a default value? The answer at Enhance ...
kitchin's user avatar
  • 261
1 vote
1 answer
2k views

Passing jQuery into the Wordpress media uploader

In a Wordpress plugin that I am working on, I am using the built-in Wordpress media uploader function ( wp.media ) to add photos. I am using the selection option to pre-select images in the media ...
ndiego's user avatar
  • 68
0 votes
0 answers
31 views

Insert into post or

I am about to delve into wp media upload/edit code, I want to add another option where you can insert into post I want to add a use as title graphic option. Hoping someone may have braced this before ...
Liam Bailey's user avatar
0 votes
1 answer
140 views

Media Manager selectection state does not have thumbnail size

I have written a plugin that uses the new media manager UI to insert images into a custom gallery custom post type. Everything works 100% but on a specific user's site something strange is happending ...
vinnie's user avatar
  • 133
8 votes
3 answers
3k views

Adding custom input for data attribute in insert media modal

I'm trying to add a text input to the "Insert Media" modal in the hopes of being able to add an html5 data- attribute to the images' parent anchor. <a class="fancybox" href="..." data-fancybox-...
apaul's user avatar
  • 133
3 votes
0 answers
187 views

Category checkboxes in upload modal

In a project I'm working on, I've enabled categories for attachments using: register_taxonomy_for_object_type('category', 'attachment'); In the edit attachment screen in the Media Library you see ...
leemon's user avatar
  • 1,806
15 votes
2 answers
3k views

Delete an attachment in the WP media modal window

I'm trying to create an option in the WP modal media window to detect duplicate files and delete a newer file if an older duplicate is found. I have the following code working (in conjunction with the ...
bcorkins's user avatar
  • 505
1 vote
1 answer
426 views

Capability to prevent upload of files

I need the ability to allow users to insert media (images) into a page / post, but not allow them to upload the files. The only capability I can see is 'upload_files', which allows a user to upload / ...
Dan Smart's user avatar
  • 346
3 votes
1 answer
2k views

Media manager multiple selection

I was creating a plugin, and its part should by adding files to custom posts. I managed script to work, but after few changes, to better look and function, it allows only one file to be added, than no ...
sjiamnocna's user avatar
3 votes
1 answer
1k views

Modify the array of selected images in media modal

I'm creating a plugin which checks for duplicate media items on upload. If a file is uploaded, and it already exists in the media library, I'm presenting the user with the option to delete the ...
bcorkins's user avatar
  • 505
1 vote
1 answer
687 views

Media upload not working on theme option in WordPress 3.8.1

I have this jQuery code in my plugin to display a media box preferably to upload an image or to pick an image from the media gallery: (function($){ jQuery(document).ready(function() { $('#...
Juliver Galleto's user avatar
1 vote
1 answer
1k views

Adding Media Upload to Custom Options Panel breaks "Insert into Post"

I've created a custom site options page as a top-level admin page in my theme. The options are pretty basic but include a couple of images. I initially found a lot of examples for using Media ...
frankV's user avatar
  • 195
1 vote
1 answer
1k views

Calling WP Gallery Uploader/Selector From Metabox

When I click the Add Media button on a Post/Page, I have the option to Add Media. After selecting media, I click Insert Into Post, and the images are inserted. However, there is another option, which ...
Kelderic's user avatar
  • 251
1 vote
1 answer
404 views

Media Manager (since 3.5): How to show an empty Media Library when creating a media frame?

Is there a way to make sure the "Media Library" tab does not show any images until I start uploading some in the "Upload Files" tab? I am creating a wp.media frame with the following code: var ...
Sascha's user avatar
  • 21
5 votes
1 answer
3k views

Modifying the media-template.php file, the right way?

The [gallery] shortcode accepts the columns='0' as an attribute so that it doesn't insert any breaks in the HTML between gallery items, however this option is not available in Gallery Settings ...
Michael Ruta's user avatar
6 votes
1 answer
1k 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 "...
Designer 17's user avatar
0 votes
1 answer
936 views

How to let a user select a media from the media library

Sorry for the low level of research but the media JS code was always a mystery to me, and googling doesn't show any current and reasonable answers. The scenario is simple, I have a form in which I ...
Mark Kaplun's user avatar
  • 23.2k
0 votes
1 answer
2k views

3.8 Media Upload and Custom Meta Box

I've been using Tammy Hart's Reusable Custom MetaBox code for some time now but with the recent 3.8 update the media upload seems to be no longer functioning, and the code is no longer supported. ...
Picard102's user avatar
  • 933
4 votes
3 answers
7k views

Disable media library tab for non admins in uploader screen

I am developing a plugin in which i am required to allow front end users to upload media, which I am able to do. But I don't want to let them sneak into media library which comes as tab with uploader ...
Prince Singh's user avatar
0 votes
0 answers
737 views

foundation 4 reveal popup pass a variable

I have an Archive and there is a reveal popup button for "see brief information" on each posts. it's from foundation 4. When you click it shows the brief information of the post. so I need to pass $...
pulla's user avatar
  • 693
9 votes
2 answers
2k views

ThickBox replacement

I'm searching, unsuccessfully unfortunately, for a ThickBox replacement used in Media Uploader. Any search fails on how to leverage Media Uploader and nothing about a script used for modal windows. ...
Domagoj's user avatar
  • 155
5 votes
2 answers
8k views

Is it possible to trigger some JavaScript when Media Popup is opened?

On one of my custom posts edit page I have a button that triggers the media popup onclick, with: wp.media.editor.open(); and while it brings up the media manager I'm not sure if that's the proper way ...
jayarjo's user avatar
  • 498
1 vote
2 answers
3k views

Lightbox Plus ColorBox plugin and auto playing YouTube video

I'm using WP v3.6 and v2.6 of the plugin and using inline lightboxes to open a YouTube video embeded with an iframe. My boss wants the video to play when the lightbox opens. So originally I tried: ...
Robert's user avatar
  • 23
13 votes
1 answer
5k 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 ...
Horttcore's user avatar
  • 1,113
1 vote
2 answers
3k views

Show selected images on top in Media Manager

I've searched numerous StackOverflow and Wordpress Awnsers questions, but I couldn't find any solution that matches my situation or even remotely points me in the right direction. I have a custom ...
Ogier Schelvis's user avatar
14 votes
1 answer
2k views

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 ...
Dworsf01's user avatar
  • 141
30 votes
2 answers
6k views

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, ...
bueltge's user avatar
  • 17k
5 votes
2 answers
6k views

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 ...
MTT's user avatar
  • 3,526
4 votes
1 answer
2k 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 ...
Manny Fleurmond's user avatar
3 votes
2 answers
2k views

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 ...
Ünsal Korkmaz's user avatar
1 vote
0 answers
1k views

Extending wp.media.model, query media from different blog on network and refresh view

I'm trying to extend the new wp.media.model to allow users to be able to choose any blog across the network and pull down the associated media library into the library content view. In the old ...
Chris_O's user avatar
  • 20.6k
1 vote
2 answers
398 views

How to change the image size in new Media Uploader (ie use medium vs thumbnail)

Is it possible to change the image size of the thumbnails in the new media uploader? For example images are currently displayed using the "thumbnail" image crop size and I would like them to be the "...
MTT's user avatar
  • 3,526
8 votes
5 answers
5k views

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" ...
Marcin Bobowski's user avatar
25 votes
4 answers
4k views

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 ...
Richard Sweeney's user avatar
5 votes
2 answers
2k views

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 ...
rzepak's user avatar
  • 88
4 votes
2 answers
3k views

Hook for image edit popup

Is there a hook for the popup window which shows up when you click on the edit button on an image in a post?
Stephan S.'s user avatar

1 2
3