foundation 4 reveal popup pass a variable
foundation 4 reveal popup pass a variable
foundation 4 reveal popup pass a variable
It seems that if the default images sizes have been changed, then there will be an instance when the item.sizes.thumbnail will be underfined. I ended up building in a check for this and if thumbnail was not defined, then I use the original image instead
Sometimes it happens when the JavaScript for the Modal plugin gets loaded twice. Please check to make sure that it isn’t getting double loaded. Some of the common ones are: bootstrap.js (the full BootStrap JS suite) bootstrap.min.js (same as above, just minified) bootstrap-modal.js (the standalone plugin) Similar Problem.
A little late but I think Extending the WordPress Media Uploader: Embed Options should work. I’m trying to do the same.
I think I got it , if (wp.media) { wp.media.view.Modal.prototype.on(‘open’, function(data) { console.log(wp.media.frame.modal.clickedOpenerEl); }); } let me know if there is better solution.
Media modal in IE9 not working when included from plugin with wp admin scripts minified
Media Modal not updating with file upload
Similar question can be found here and here. I use the following method, adapted from here: When your theme/plugin initializes: wp_enqueue_media(); Handle the media dialog in Javascript: var wp_media_dialog_field; function selectMedia() { var custom_uploader; if (custom_uploader) { custom_uploader.open(); return; } custom_uploader = wp.media.frames.file_frame = wp.media({ title: ‘Choose Image’, button: { text: ‘Choose Image’ }, multiple: … Read more
I don’t know of any good way to do that as the problem is most likely that the images are way larger than they should be. However, there are a couple of things that you could do to resolve the problem. First, re-size your images before uploading them if at all possible. For most applications, … Read more
You can try the following script: var MEDIAmedia_library: function() { var formfield = null; var wireframe; $(‘body’).on(‘click’, ‘#click-event-selector’,function(e) { e.preventDefault(); if (wireframe) { wireframe.open(); return; } wireframe = wp.media.frames.wireframe = wp.media({ title: ‘Media Library Title’, button: { text: ‘Media Library Button Title’ }, multiple: false }); wireframe.on(‘select’, function() { attachment = wireframe.state().get(‘selection’).first().toJSON(); console.log(attachment); $(‘#input-field-selector’).val(attachment.url); }); … Read more