Yesterday, I needed to create a modal, but I didn’t want to create a modal.
“Surely, this is already in WordPress.”Corey Salzano
Why Thickbox in WordPress is great
- It’s a modal API built into core
- It’s a simple white box with an optional title, close button, and no offensive styling
- You don’t have to build it
Perhaps Also Not Great
Thickbox’s fate as a part of WordPress core is questionable. Here’s a six year discussion of whether it should still be included, and WordPress core also bundles jQuery UI Dialog via the ‘jquery-ui-dialog’ script handle.
Even if WordPress core drops this library in a future version, a plugin could be written to maintain compatibility. Today, I prefer thickbox because its implementation is so simple.