Is there a hook to put stylesheet and/or JS inside iframes (thickbox or tinyMCE) in admin area

You could over-ride the CSS by using the admin_print_scripts admin_head-media-upload-popup and add css to match your needs. This can be done via the functions.php file or by creating a plugin. Here is the code in a plugin format to begin adding style: <?php /* Plugin Name: Some Name Description: Custom Thickbox Styles */ add_action(‘admin_head-media-upload-popup’, ‘custom_tb_styles’); … Read more

Refresh wp.media after ajax call

So, I followed your links and this is working for me. This test works the same for my upload callbacks so hopefully it works for you. In the iframe function myTab_save_frame() { global $redir_tab; $redir_tab = ‘mytab’; media_upload_header(); ?> <button>Test Trigger</button> <script> var switchAndReload = function() { // get wp outside iframe var wp = … Read more

Give Author users the right to embed

The capability you are after is called unfiltered_html. Some options: Modify author capabilities in your theme functions.php. This is saved in the DB, so you can access a page, make sure it works then remove it from your functions.php file. A better option would be to run it on theme activation. See this page on … Read more

Make fonts.com font work in TinyMCE (iframe referrer issue)

I ran into this issue with Typekit, here’s my solution: http://www.tomjn.com/150/typekit-wp-editor-styles/ add_filter(“mce_external_plugins”, “tomjn_mce_external_plugins”); function tomjn_mce_external_plugins($plugin_array){ $plugin_array[‘typekit’] = get_template_directory_uri().’/typekit.tinymce.js’; return $plugin_array; } and this js: (function() { tinymce.create(‘tinymce.plugins.typekit’, { init: function(ed, url) { ed.onPreInit.add(function(ed) { // Get the DOM document object for the IFRAME var doc = ed.getDoc(); // Create the script we will add to … Read more

Adding iframe Content to Sidebar Widget

Just create a widget that doesn’t filter your input. This is probably the most simple widget with user input you can build. Here is the widget I use in my plugin Magic Widgets. /** * Simplified variant of the native text widget class. * * @author Fuxia Scholz * @version 1.0 */ class Unfiltered_Text_Widget extends … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)