Questions tagged [media-modal]

The tag has no usage guidance.

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

VC Modal Pop Up only works when logged in to wordpress Admin [closed]

so the Problem is our company website uses visual composer modal Plugin at one Page. When I'm logged in into wordpress admin the Pop Up works fine and looks like this: The URL is: https://www.saracus....
1
vote
0answers
10 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 ...
0
votes
0answers
30 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 ...
0
votes
1answer
20 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 ...
0
votes
0answers
8 views

Adding a view to wp.media modal & getting back to gallery view

I am trying to add a new view to wp.media modal. Once I finish working on the view, I should be able to get back to the gallery view on a button click. I have failed to find any proper documentation ...
0
votes
0answers
10 views

A method to force open the Media Manager UI when directly uploading in the editor

I am trying to find a way to force open the Media Manager UI after uploading an image (or simply use the Media Manager rather than the Upload button, if easier). The reason for this approach is that I ...
1
vote
0answers
12 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, ...
0
votes
0answers
13 views

Changing Slider Revolution modal window display velocity

I'm creating a web page and I'm using Slider Revolution. My issue is that when I implement some modal windows, the modal takes a lot of time to display and a lot of time to close and I do want to ...
0
votes
0answers
15 views

Is there an api documentation or good tutorial for the WordPress Media Uploader javascript Api?

I checked the developer docs and the codex, but I seem to be unable to find something on the Media Uploader javascript Api. Anybody knows some good resources on what can be done with the Media ...
0
votes
0answers
12 views

How to add user based tab to media upload manager with custom set of images?

By following the below link, I am able to create user-based tabs. https://wordpress.stackexchange.com/questions/185271/how-to-add-new-tab-to-media-upload-manager-with-custom-set-of-images I need to ...
1
vote
1answer
122 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 ...
0
votes
1answer
143 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 ...
0
votes
1answer
321 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 ...
1
vote
0answers
262 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...' }, ...
0
votes
0answers
326 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/...
0
votes
1answer
141 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" ...
0
votes
1answer
1k 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 ...
1
vote
1answer
4k 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',...
0
votes
0answers
116 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 ...
4
votes
1answer
415 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 ...
1
vote
0answers
52 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 ...
0
votes
2answers
3k 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 ...
0
votes
1answer
347 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 ...
2
votes
1answer
1k 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 ...
2
votes
1answer
4k 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 ...
0
votes
0answers
76 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 ...
0
votes
1answer
1k 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'...
0
votes
1answer
140 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 ...
0
votes
1answer
711 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 ...
1
vote
1answer
681 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 ...
0
votes
1answer
166 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. ...
0
votes
2answers
133 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 ...
0
votes
1answer
322 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 ...
0
votes
1answer
38 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 ...
1
vote
0answers
547 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 ...
2
votes
0answers
108 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 ...
0
votes
1answer
993 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 ...
0
votes
1answer
172 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(...
1
vote
1answer
297 views

Is there a native wp.media way to detect who “opened” wp.media.frame

I added few custom fields via attachment_fields_to_edit and would like to show them only when certain theme or page builder image option opens the wp.media.iframe. Currently they are visible ...
0
votes
1answer
309 views

How to destroy or dispose wordpress uploder/manager?

Can someone help me, I want to destroy my previous media uploder frame and remove all elements they have created to change the media file type but I cant do that, In last of my search, I have found in ...
2
votes
0answers
434 views

Add guid filter to attachment in media library grid mode

I'm trying to show in media modal box, attachments from a specific folder in my website and, correct me if I'm wrong, the best way to proceed is a like filter on wp_posts field GUID. Something like ...
0
votes
1answer
718 views

wp_enqueue_media(); in multiple widgets

I have this code which works perfectly if you use a single widget. However if you create another widget the uploader will overwrite both widgets settings. Does anyone know how this script can be ...
1
vote
0answers
290 views

How to submit data between wp_iframe and backbone.js in media upload

In short: On a post/page edit.php I want to be able to click Add media and open the default media uploader instead of Create Gallery on the left-side menu there is a custom tab. on this custom ...
1
vote
1answer
482 views

Only displaying zip files with wp media

I'm using wp.media() to invoke the WordPress media library modal in a custom taxonomy. In the pop up I only want to display zip files. I know I can limit the media library to just audio or video ...
0
votes
2answers
2k views

Displaying a specific sub-category's posts from wp_query

I have a modal category and in my modal category i have three sub-categories in it. Here is the structure of my modal category. -Modal -Water Pumps -Water Heaters -Electrical Here, i want to ...
0
votes
1answer
66 views

wordpress thumbnail onclick then modal will come out

I have a thumbnail in wordpress, now when the thumbnail image is click, i want a modal to appear. Something just a bootstrap modal. How Can i do this? . any tutoria with this?. there are only few ...
9
votes
2answers
2k views

List of available events for wp.media

Is there a list of available events for wp.media object? By doing some googling, I managed to find following events: for wp.media.view.Modal.prototype: open, ready - they are triggered, when user ...
1
vote
1answer
570 views

Use wp.media templates to create totally custom modal

Following up on this answer I'm trying to determine how to create a modal with completely unique menu items/content than the media modal. If you add a new state you can add a new menu tab and have ...
1
vote
0answers
190 views

How to get the return value of wp.media({ frame: 'post' }) in all cases?

When the user is in an edit.php page or post-new.php, the wp.media global is available and I want to use it to open a special insertion view that allows videos. var frame = wp.media({ frame: '...
0
votes
1answer
852 views

WP Media Uploader modal conflicts with Bootstrap modal

I was creating a form in a Bootstrap Modal to allow users to create new posts from the frontend. Everything seemed alright until I wanted to upload a file to the media library or choose one already ...