[wp-trac] [WordPress Trac] #27068: JS var thickboxL10n is added twice
WordPress Trac
noreply at wordpress.org
Sat Feb 8 09:41:23 UTC 2014
#27068: JS var thickboxL10n is added twice
---------------------------+------------------------------
Reporter: finalwebsites | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: 3.8.1
Severity: normal | Resolution:
Keywords: needs-testing | Focuses:
---------------------------+------------------------------
Changes (by finalwebsites):
* keywords: => needs-testing
* component: I18N => Script Loader
Comment:
I found the problem located in wp-includes/script-loader.php.
The localization function need be called before the thickbox script is
added.
If you switch position the problem is solved:
{{{
did_action( 'init' ) && $scripts->localize( 'thickbox',
'thickboxL10n', array(
'next' => __('Next >'),
'prev' => __('< Prev'),
'image' => __('Image'),
'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'),
) );
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js",
array('jquery'), '3.1-20121105', 1 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27068#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list