thickbox.js relative image paths break on children pages
|Reported by:||layotte||Owned by:||azaozz|
I originally found this little bug when trying to implement thickbox in WPMU on a page in a subsite, it also affects WP as well for child pages.
Currrently in thickbox.js the images are relatively assigned this way (line 9 & 12):
tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif";
tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";
I'm enqueueing WordPress' thickbox in my theme's function.php:
wp_enqueue_script( 'thickbox', , 'jquery', , true );
wp_enqueue_style( 'thickbox' );
Here is an example of the issue, the images work fine on:
But not on:
For my needs, I am able to remove the ".." for the relative path, however that will break it for users whose WP installation is not in the root directory of their site.