Pass image URL's to thickbox via L10n in script-loader.php. Allows thickbox to be used on any page in the install without defining the image URL variables. Fixes #17050
git-svn-id: https://develop.svn.wordpress.org/trunk@17596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
739e666801
commit
bf777d1369
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
if ( typeof tb_pathToImage != 'string' ) {
|
||||
var tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif";
|
||||
var tb_pathToImage = thickboxL10n.loadingAnimation;
|
||||
}
|
||||
if ( typeof tb_closeImage != 'string' ) {
|
||||
var tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";
|
||||
var tb_closeImage = thickboxL10n.closeImage;
|
||||
}
|
||||
|
||||
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
|
|
|
@ -184,7 +184,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), '20090102' );
|
||||
$scripts->add_data( 'jquery-table-hotkeys', 'group', 1 );
|
||||
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20100407');
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20110405');
|
||||
$scripts->add_data( 'thickbox', 'group', 1 );
|
||||
$scripts->localize( 'thickbox', 'thickboxL10n', array(
|
||||
'next' => __('Next >'),
|
||||
|
@ -193,6 +193,8 @@ function wp_default_scripts( &$scripts ) {
|
|||
'of' => __('of'),
|
||||
'close' => __('Close'),
|
||||
'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),
|
||||
'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'),
|
||||
'closeImage' => includes_url('js/thickbox/tb-close.png'),
|
||||
'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue