Creating a modal dialog without jQuery

I am writing a plugin that depends on modal dialogs for screen space.

Right now I am using jQuery to create the dialogs, but I want a way that integrates better into the admin theme.

Read More

Obviously WP has to have some sort of native dialog system (it’s used for uploads). How do I access it?

Related posts

Leave a Reply

1 comment

  1. The WordPress admin area uses Thickbox, which is still a jQuery plugin (jQuery is used all over the admin area). You need to enqueue the script and style (add_thickbox() does this for you), and then all links that have class thickbox will be converted. You need to add some URL parameters too, for example the image upload link looks like this: media-upload.php?post_id=735&type=image&TB_iframe=1&width=640&height=285. post_id and type are WordPress-specific, but TB_iframe, width and height are needed for Thickbox, and you should use them in your own links too.