[wp-trac] [WordPress Trac] #17050: Built in Thickbox close image relative path error
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 5 00:36:43 UTC 2011
#17050: Built in Thickbox close image relative path error
--------------------------------+------------------------
Reporter: maorb | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: External Libraries | Version: 3.1
Severity: normal | Resolution: duplicate
Keywords: |
--------------------------------+------------------------
Changes (by dd32):
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Comment:
You cant use absolute paths (relative to root) because not all WordPress
installs are rooted at /
The thickbox script contains paths designed for use within the admin area,
If you want to use it on the front end you need to add something similar
to the following to your head:
{{{
<script type="text/javascript">
//<![CDATA[
var tb_pathToImage = "<?php echo site_url('/wp-
includes/js/thickbox/loadingAnimation.gif'); ?>";
var tb_closeImage = "<?php echo site_url('/wp-includes/js/thickbox/tb-
close.png'); ?>";
//]]>
</script>
}}}
See #6453
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17050#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list