jQuery .ready in a dynamically inserted iframe

We are using jQuery thickbox to dynamically display an iframe when someone clicks on a picture. In this iframe, we are using galleria a javascript library to display multiple pictures. The problem seems to be that $(document).ready in the iframe seems to be fired too soon and the iframe content isn’t even loaded yet, so … Read more

Custom height/width for thickbox in WP Backend

I use thickbox in the WP backend for preview or other content. On own pages in the backend works my script very fine and a can use custom width and height for the thickbox. below my code: <script type=”text/javascript”> <!– var viewportwidth; var viewportheight; if (typeof window.innerWidth != ‘undefined’) { viewportwidth = window.innerWidth-80, viewportheight = … Read more

Access tinymce from thickbox

Basically, I have a custom tinymce button which opens a thickbox window in iframe mode. Is there a way to access the tinymce from the iframe? WordPress media uploader seems to do it somehow. Stuff like $(‘#content’, window.parent.document).tinymce().getContent() does not work. PS. If that’s impossible, I’ll have to do use the tinymce default popup window, … Read more

WordPress native thickbox language

Is there any clean way (not overwriting wp-includes\js\thickbox\thickbox.js file) to translate english next/ prev/ image # of # and Close tooltip in WordPress native Thickbox script? 2 Answers 2 Localize WordPress or write and load special localization for your language specialy for thickbox. Thickbox dialogs support localization provided by WP Update – Let’s Check 1. … Read more

Open upload media dialog from thickbox

I’m using Thickbox (lightbox) built-in in WordPress to display some controls for user, some of controls using javascript to open dialogs like Upload Media that is already works fine outside the Thickbox. I know that the Thickbox creates a new div with a unique-ID [TB_window] so i made a stand-alone js file for all scripts … Read more

Getting RID of thickbox!

I want to get rid of the complete thickbox css js and loading gif. Can anybody give me the correct way to get rid of it all via functions.php ? Cheers, Alex 2 Answers 2 I’m guessing front end only, right? function wpse71503_init() { if (!is_admin()) { wp_deregister_style(‘thickbox’); wp_deregister_script(‘thickbox’); } } add_action(‘init’, ‘wpse71503_init’);

custom tabs in media uploader

I’ve managed to add a custom tab to the media uploader, but for some reason it doesn’t come with the same layout – it doesn’t load the media-uploader-header that contain all the other tabs: add_filter(‘media_upload_tabs’, ‘my_media_upload_tabs_filter’); function my_media_upload_tabs_filter($tabs) { unset($tabs[“type_url”]); unset($tabs[‘library’]); $newtab = array(‘ell_insert_gmap_tab’ => __(‘Google Map’,’insertgmap’)); return array_merge($tabs,$newtab); } add_action(‘media_upload_ell_insert_gmap_tab’, ‘media_upload_ell_gmap_tab’); function media_upload_ell_gmap_tab() { … Read more