Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8940785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:08:05+00:00 2026-06-15T11:08:05+00:00

I have a plugin that sucesfully calls thickbox to open an iframe of external

  • 0

I have a plugin that sucesfully calls thickbox to open an iframe of external content. It does it with the following codes:

function user_avatar_admin_print_styles() {
    global $hook_suffix;
    wp_enqueue_script("thickbox");
    wp_enqueue_style("thickbox");
    wp_enqueue_style('user-avatar', plugins_url('/user-avatar/css/user-avatar.css'),
     'css');
    }

and

<a id="user-avatar-link" class="button-primary thickbox" href="<?php echo 
admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=1&uid=<?php echo 
$profile->ID; ?>&TB_iframe=true&width=720&height=450" title="<?php _e('Upload and 
Crop an Image to be Displayed','user-avatar'); ?>" ><?php _e('Update Picture',
'user-avatar'); ?></a> 

So the important three codes are the wp_enqueue_script, wp_enqueue_style and the a class which all reference thickbox. Now, Thickbox completely messes up my website and doesn’t interact with my other plugins well. So I decided to go with colorbox… I simply changed the three codes that referenced “thickbox” and changed them to “colorbox”. It sounds simple, but there were no other codes in the plugin that reference thickbox accept the three that I listed. Changing the codes to “colorbox” did not work. I also tried installing lightbox, and lightbox plus and then changing the codes.. nothing worked.

Does this a class “button-primary thickbox” only work with thickbox, is there more to it then that? Can I change the code to work with colorbox, lightbox or some other plugin that acts the same way? Any help would truly be appreciated. 🙂

Quick Update:

I found this code within thickbox that has to do with a classes. My plugin that calls thickbox uses the code

Here is the code:
function add_thickbox_class_to_attachment_link($link) {
if (thickbox_get_option(OPTION_THICKBOX_ADD_CLASS) == false)
return $link;

$use_smoothbox = thickbox_get_option(OPTION_THICKBOX_USE_SMOOTHBOX);
# Since SmoothBox doesn't come with WordPress we don't add the class here
if (use_wordpress_default_script_and_style() and $use_smoothbox == true)
    return $link;

$class = $use_smoothbox == true ? 'smoothbox' : 'thickbox';
return str_replace('<a', '<a class="'.$class.'"', $link);
}
if (function_exists('add_filter'))
add_filter('wp_get_attachment_link', 'add_thickbox_class_to_attachment_link');

I also found away to use a classes with colorbox, but it didn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:08:06+00:00Added an answer on June 15, 2026 at 11:08 am

    I ended up using the plugin “PrettyPhoto” and simply adding in the code

    rel="PrettyPhoto" 
    

    instead of the a class to call the plugin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a plugin that is loaded by this application.. This plugin calls some
does jquery have any plugin that prevents entering any input to a textbox that
I have tied this jQuery Bar Graph plugin with a function that I created.
I have made a very simple NSIS plugin that has one function in it.
I have used a plugin that uses prototype js, it's working fine but the
I have a jQuery plugin that moves an element on the screen, but has
I have a C# plugin that uses a separate C++ DLL. The only reference
i have multiple Elipse plugin projects that depend on each other. Several questions concerning
I have created a plugin in that i included one component.. So in that
I have an Eclipse RCP plugin that requires a DLL. What is the recommended

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.