[wp-hackers] Thickbox in listing page?

Diana K. C dianakac at gmail.com
Fri Sep 28 20:59:32 UTC 2012


Works ok, I'm adding thickbox so just using the default calls:


add_action('admin_print_scripts', 'pe_admin_script_generic' );

function pe_admin_script_generic() {
     global $parent_file;
     if('edit.php?post_type=pet' == $parent_file){
     wp_enqueue_script('thickbox',null,array('jquery'));
     wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', 
null, '1.0');
 }
}


Don't know why the box is smaller and renders a scrollbar :S but is quite 
nice, better than nothing :)


Thanks Rafa


----- Original Message ----- 
From: "Rafael Ehlers" <rafaehlers at gmail.com>
To: <wp-hackers at lists.automattic.com>
Sent: Friday, September 28, 2012 5:46 PM
Subject: Re: [wp-hackers] Thickbox in listing page?


Sorry for the pt_BR guys, my bad, here is the code:

add_action('admin_print_scripts', 'pe_admin_script_generic' );

function pe_admin_script_generic() {
    global $parent_file;
    if('edit.php?post_type=pedido' == $parent_file){
wp_enqueue_script('pedido', plugin_dir_url(__FILE__).'js/pedidos.js');
 }
}

2012/9/28 Rafael Ehlers <rafaehlers at gmail.com>

> Diana, tu consegue colocar na mesma função que tu usou para fazer aparecer
> o thumb ali.
>
> 2012/9/28 Diana K. C <dianakac at gmail.com>
>
> Hi there,
>>
>> In this post type listing panel (backend) I added a link so editor can
>> set the featured image there, works ok but I can't make use thickbox. Is
>> there some filter I can use to add thickbox in this page?
>> (edit.php?post_type=pet)
>>
>> I only found how to add scripts in plugin pages, no on existent pages.
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers 



More information about the wp-hackers mailing list