Questions tagged [media-modal]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

remove links in pop-up media gallery

Is it possible to remove certain links in the pop-up media upload screen? Is there a filter for the output of those links? We need to remove the links crossed out in this screenshot: We can hide them ...
shanebp's user avatar
  • 5,048
0 votes
0 answers
29 views

How to modify the uploads directory for wp.media.frame assigning an subfolder name

To be better organized I must be able to manage the media independently of the user. So in addition to restrict user to see only these files(images, docs, videos), I need to insert media for each ...
imagIne's user avatar
  • 41
0 votes
0 answers
21 views

image block select modal > custom tab on the media modal with filtered media and allow select media

I want to do a plugin to mark some media files as Favorite and then the favorite media marked allow be displayed on the Select image modal that is showed when a user try to add or replace an image via ...
juanbits's user avatar
  • 101
1 vote
0 answers
27 views

Is there any halfway decent documentation on the wp.media JS class?

Sorry for the somewhat rambly question, but has anyone ever seen any good piece of documentation, or maybe even a tutorial on the wp.media JS class? All that i could find documentation-wise is this ...
TimMKuehle's user avatar
0 votes
1 answer
77 views

How to add extra EXIF data when images are uploaded?

I have a function to add EXIF information to an image after the image is uploaded to a website. How do I get the EXIF information to be automatically added to the image after the image is uploaded or ...
Kelvin Ngo's user avatar
0 votes
0 answers
25 views

Remove Edit Attachment Button in Wordpress Mediathek -> see Screenshot

i would like to remove the button via css or hook, thanks for your help!!
Lothar's user avatar
  • 3
0 votes
0 answers
107 views

Set a minimum and maximum limit of images to select in the MediaUpload component for Block

Say that I am making a Block that accepts between 2 and 5 images with the MediaUpload component as input. How would I go about that? Ideally for UI I would like the multiple and addToGallery props to ...
Ben Toth's user avatar
0 votes
1 answer
81 views

Programtically selecting image URL in Media Library modal

I've been struggling with Backbone for a few hours now while I'm trying to select a custom image URL in the media modal. The idea is to have a button that I've coded already and when the user clicks ...
Hardeep Asrani's user avatar
1 vote
1 answer
116 views

Use custom image size in admin panel

I have add some image size like: add_image_size( 'custom-small', 600, 600 ); add_image_size( 'custom-medium', 1280, 1280 ); add_image_size( 'custom-large', 2560, 2560 ); and I have removed all the ...
doy's user avatar
  • 13
1 vote
0 answers
60 views

How to enable sorting in custom media uploader in plugin

In my plugin I need a media uploader exactly like the one you see when you select a post's featured image. I managed to do almost everything with this code: media_uploader = window.wp.media({ ...
Pacicio's user avatar
  • 21
0 votes
1 answer
24 views

Launch Media Library for specific MU site

I have a form on my front end that I'd like to call a media library modal, but I want the library accessed to be a specific MU subsite. I trued to switch_to_blog around the wp_enqueue_media function, ...
Picard102's user avatar
  • 933
0 votes
1 answer
247 views

Query data after an Ajax insert

After a successful insertion with Ajax of an entry I would like to see what the ID and url of that same entry is and show it in a modal window Any way to get that data? <script> ajax_url = &...
juan's user avatar
  • 1
0 votes
0 answers
40 views

Modal dialog under the backdrop

I am using Bootstrap 5 and modal is kinda tricky. Do you happen to know why the dialog is under the backdrop? I've compared the modal example on Bootstrap website and on my code. I haven't changed any ...
ddd's user avatar
  • 7
0 votes
2 answers
514 views

Implementing a modal(lightbox) for all images in all post-gallery posts

I'm trying to make a photo gallery page for all my photos in my post-gallery post and have a modal open when you click on the photos. In the page there will probably be almost 100 photos and i'm not ...
Jomeb's user avatar
  • 1
1 vote
0 answers
178 views

Display attachments by the ID of the post being edited in the wp.media frame (frontend)

There is a button in the frontend on the post page to upload images. How do I display attachments that are attached to this post in the wp.media frame? How to intercept wp.media's AJAX request for ...
Svetoslav Luchezarniy's user avatar
2 votes
1 answer
267 views

Adding image to visual editor popup for shortcode with wp.media and wp.mce: changing image duplicates shortcode

tl;dr: Why does using media manager popup within a TinyMCE popup cause duplications of shortcodes? Is it my code or just the way life is? [Spoiler: It was my code] I've written a small plugin to ...
Andy Macaulay-Brook's user avatar
0 votes
1 answer
460 views

Get selected image URL from wp.media.editor.attachment into text input fails. What am I doing wrong?

I have placed a media button as a post meta field to insert an image URL into a text field when Insert Into Page button is clicked. It works up to the point of opening the media repository window, ...
Nadal's user avatar
  • 89
0 votes
0 answers
66 views

Display WP Meta Details in Bootstrap Modal

This question relates directly to a previous question I asked in Wordpress StackExchange: display WP image posts in Bootstrap 4 modal that was superbly solved by Sally CJ I further developed the ...
inputforcolor's user avatar
1 vote
0 answers
23 views

Suggested image dimensions Gutenberg Hook

I just migrated to Gutenberg block editor and I simply love it. After migration, I saw a dimension suggestion for images when trying to select the featured image. The problem is that we already have ...
MadWR's user avatar
  • 11
0 votes
0 answers
331 views

Insert HTML markup to page content from the Media Frame modal

TL;DR How do I get the HTML markup created in the Media Frame modal and insert it into the editor/page content? I'm trying to insert media from a custom router-tab in the media frame. But I have no ...
Mads Hansen's user avatar
0 votes
1 answer
281 views

Media Library modal customization

I have a fashion website and I use a large amount of images on my website, As I add new products I should add product images and for that I use media library modal but the problem is working with ...
ahmad shahoseini's user avatar
1 vote
0 answers
29 views

How to open default wp image editor screen dynamically?

I'm displaying gallery images of the logged-in users on the frontend with the edit button. Now I want to link that edit button with the default WP Image Editor screen that includes tools like crop, ...
Rameez Iqbal's user avatar
2 votes
1 answer
880 views

Filter medias from the Media Uploader (wp.media) modal with a post meta

I would like to have a media uploader modal that displays only image medias having a specific post meta, let's say 'my_image_meta'. How could I achieve this ? Here's my actual code, which just filters ...
gordie's user avatar
  • 482
0 votes
1 answer
1k views

overwrite wordpress gallery with custom gallery shortcode

I want to overwrite the default WordPress gallery shortcode with a custom one. This because I need to add a field that will contain an url for each image I want to add inside a gallery. I'm not sure ...
sialfa's user avatar
  • 319
0 votes
1 answer
1k views

How do I link to a dynamic ACF button from a Custom Post type?

I have a custom post type archive that has articles that call some ACF content on each post. I've used WP_Query to pull these articles onto the archive page, and there's a button in each article that ...
Xero1's user avatar
  • 149
3 votes
1 answer
1k views

Restrict file types in the uploader of a wp.media frame

When creating a wp.media frame in JS, is it possible to specify allowed file types for the uploads tab? wp.media({ title: 'Pick a PDF', button: { text: 'Use this file...' }, ...
ax1mx2's user avatar
  • 131
0 votes
0 answers
556 views

JQuery modal not loading video on popup, only displaying it after multiple reopenings

I am trying to load a PHP function into a modal, containing a video. I'm currently using jquerymodal.com's plugin to achieve that. Here's the current .js code I'm using: https://jmp.sh/v/...
festgebaeck's user avatar
0 votes
1 answer
348 views

Forbidden permission and editor error after update to Wordpress 5.1.1

Our website was recently update to Wordpress 5.1.1. From this recent update we had some issues that we have trouble debugging. 1. Cannot view media files on post editor Clicking the "Add media" ...
fsace's user avatar
  • 1
0 votes
1 answer
3k views

Opening a JQuery modal window on click of a button with a JQuery plugin

I am trying to open a Jquery Modal window on click of a button. And inserting this Button into a plugins content template (WP SHow posts). I'm using jquerymodal.com's modal code, since I don't need a ...
festgebaeck's user avatar
1 vote
1 answer
11k views

admin_enqueue_scripts not working

enqueue.php function sunset_load_admin_scripts( $hook ) { if($hook != 'toplevel_page_mypluginname') { return; } wp_enqueue_media(); wp_register_script('sunset-admin-script',...
abudo loky's user avatar
0 votes
0 answers
267 views

custom post type not showed with bootstrap 4 modal and template part

I've created a showcase template part that will get all my custom post_type for a showcase. The problem is that I've 18 entries added and the template part will only show 10 entries. I've used a ...
ZWPDev's user avatar
  • 96
4 votes
1 answer
875 views

'Add Media' button doesn't work when editor is initialized from javascript

I am trying to instantiate the wp_editor with javascript, which works nicely except the 'Add Media' button does not work. There are no errors, but clicking the button does nothing. The simplest test ...
Jesse Norell's user avatar
1 vote
0 answers
68 views

WordPress 4.9.8 Trying to add filename over image in Media Browser

Need to add filenames of images in the media browser (not the media library, the browser when you are adding media to a post or page). I used this snippet to do that but it no longer works in ...
DTFK's user avatar
  • 11
0 votes
2 answers
6k views

Bootstrap Modal isn't working in WordPress Plugin with Template Avada [closed]

I tried to develop a simple Wordpress plugin which shows a bootstrap modal and unfortunately I failed. The modal opens shortly but disappears directly again. This happens because the template Avada ...
Human's user avatar
  • 3
0 votes
1 answer
800 views

Modal opens all post IDs

This is my modal code. The first code displays and image, job title and name of each post ID. When the user clicks on the more info link it should open a button with more info about the post, but ...
Remco's user avatar
  • 125
2 votes
1 answer
2k views

trigger('change') not working

I am using wp.media modal attachment API to import images to customizer. Along with the images, I have imported their meta data as well ( Title, Description, Alt Text etc.). These are in the form of ...
Divjot Singh's user avatar
2 votes
1 answer
6k views

Upload images from custom plugin using the media modal

I'm creating a custom plugin and I need users to be able to upload multiple images. I want them to be able to do this through the built-in media page but through a modal/pop up from the plugins ...
Brandon Benefield's user avatar
0 votes
0 answers
124 views

Wordpress Media Uploader : How to add custom button on featured image tab

We are working on the plugin and try to add a custom button near 'set featured image' but we can not able to find out any solution or clue how to add it using media library function. Can someone ...
Bhushan Gohel's user avatar
2 votes
1 answer
3k views

How to set additional parameter in wp.media?

I have this code. $('.custom-browse-button').on('click', function(e) { e.preventDefault(); var wpMedia = wp.media.frames.file_frame = wp.media({ 'library': { type: 'image'...
vee's user avatar
  • 231
0 votes
1 answer
317 views

admin notice on Insert Media popup screen

I want an admin notice box on all media upload pages. I did that for media library page by code add_action( 'load-upload.php', array( $this, 'media_library_message_load' ) ); public function ...
Meenakshi Khandelwal's user avatar
0 votes
1 answer
1k views

Keeping CSS model open after form submission

Using a simple CSS modal popup to display a form ( gravity form ) which works as expected but id like to make the user experience better. Currently when the modal button is pressed <label ...
Randomer11's user avatar
2 votes
1 answer
1k views

Is it possible to hide media details sidebar when wp.media popup is being opened?

Let's cut to the chase: popup = wp.media({ frame: 'post', state: 'insert', library: { type: [ 'image' ] }, multiple: false }); There is a list of arguments I use when ...
Daniel's user avatar
  • 181
0 votes
1 answer
262 views

Creating custom setting in add media popup

I am creating a checkbox in the Add Media popup screen to add HTML to the $html output when inserting an image. This is working fine. However, once I have added an image with the checkbox selected. ...
Robert L's user avatar
0 votes
2 answers
277 views

WordPress Dropdown image select

I know this is much common and I did not find the right answer. So to show all possible image sizes I have done: add_filter( 'image_size_names_choose', 'fashmag_image_sizes_choose' ); function ...
Sadia Mehjabin's user avatar
0 votes
1 answer
494 views

Changed media upload path for plugin, but generates error & shows wrong url

I'm writing a plugin that, as part of its functionality, uploads custom fonts. I'm using the new-since-Wordpress-3.5 media uploader & API. I've read dozens of tutorials on how to change the ...
Chris J. Zähller's user avatar
0 votes
1 answer
46 views

What's the best way to add taxonomy's image in 2017?

Need to build image upload for custom taxonomies. I used Categories Images plugin before, but now I need 2 images and this plugin doesn't fit anymore. I'm looking for a best solution. Does anybody ...
okonik's user avatar
  • 91
1 vote
0 answers
814 views

Modal working only on home page

I have created a modal pop up using JavaScript. The HTML for the modal is in a get_template_part("content","contact")` file. The issue is, only on the home page does the modal pop up Through a click ...
Leroy's user avatar
  • 13
2 votes
0 answers
190 views

Perform a custom (bulk) action in media view

I wish to figure out how to add a custom action button in the media grid view ( upload.php screen) and how to perform a custom (bulk) action to the selected attachments, as shown in the screenshot ...
Virgo's user avatar
  • 99
0 votes
1 answer
1k views

How to create different media uploader frames / filter library depending on a custom action

Here is the thing. I am using the WP media uploader on the frontend. What I need is to have it behave differently depending on a certain action. I am attaching the media in a specific custom post ...
Nosebleed's user avatar
  • 349
0 votes
1 answer
288 views

update_user_meta inside a popup/modal

I'm trying to create a popup/modal notification if a logged-in user has reached a certain level. I use the following code (simplified): function theme_achievements() { $value = user_total_posts(...
kiarashi's user avatar
  • 294