Manipulating Media uploader

what i ended up doing was launching the thickbox uploaded manually via a jquery click event. then with setInterval i was able to hide the pieces i wanted. jQuery(document).ready(function($) { $(‘.specialclass’).click(function() { //get post id from somewhere (for me this was the row column string = $(this).parents(‘tr.type-portfolio’).attr(‘id’); if(/post-(\d+)/.exec(string)[1]) post_id = parseInt(/post-(\d+)/.exec(string)[1], 10); tbframe_interval = setInterval(function() … Read more

how to use thickbox in admin?

Below, an example of what’s needed to use ThickBox. <?php wp_enqueue_style(‘thickbox’); wp_enqueue_script(‘thickbox’); ?> <a href=”#” id=”taxonomy_banner_image” class=”taxonomy_banner_image”> Click Here </a> <script type=”text/javascript”> jQuery(document).ready(function() { jQuery(“#taxonomy_banner_image”).click(function() { tb_show(“”, “filename?TB_iframe=true”); return false; }); }); </script> tb_show parameters: title of the box. url of file and with parameter iframe=true I think this will give you an idea how … Read more

ThickBox width can’t be changed in admin

Your are correct it cannot be changed and it looks like there has been no change on this since your question. There is a ticket if anyone is interested in working on this in the WordPress core… WordPress Core Trac

Thickbox hacking – removing fields

Tricky but once you understand how WordPress sets the sizes and the fields then the rest is easy: function thickbox_fields($form_fields, $post){ unset( $form_fields[‘post_title’], //disables “Title” field and so forth… $form_fields[‘url’], $form_fields[‘image_alt’], $form_fields[‘post_excerpt’], $form_fields[‘post_content’], $form_fields[‘align’], $form_fields[‘image-size’] ); //create the size input for full only and set display to none $size=”full”; $css_id = “image-size-{$size}-{$post->ID}”; $html = “<div … Read more

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

Lightbox popup on WooCommerce add_to_cart action

The following works for me for product archive pages (these include both the main shop page as well as archive pages for product categories, for example). It will show the current cart contents in a thickbox. I chose to show this for this example just because that’s the data that one gets back through Ajax … Read more

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