WordPress.org

Make WordPress Core

Changeset 17596


Ignore:
Timestamp:
04/05/2011 03:58:25 AM (7 years ago)
Author:
dd32
Message:

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

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/thickbox/thickbox.js

    r14030 r17596  
    77
    88if ( typeof tb_pathToImage != 'string' ) {
    9     var tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif";
     9    var tb_pathToImage = thickboxL10n.loadingAnimation;
    1010}
    1111if ( typeof tb_closeImage != 'string' ) {
    12     var tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";
     12    var tb_closeImage = thickboxL10n.closeImage;
    1313}
    1414
  • trunk/wp-includes/script-loader.php

    r17587 r17596  
    185185    $scripts->add_data( 'jquery-table-hotkeys', 'group', 1 );
    186186
    187     $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20100407');
     187    $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20110405');
    188188    $scripts->add_data( 'thickbox', 'group', 1 );
    189189    $scripts->localize( 'thickbox', 'thickboxL10n', array(
     
    194194            'close' => __('Close'),
    195195            'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),
     196            'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'),
     197            'closeImage' => includes_url('js/thickbox/tb-close.png'),
    196198            'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};'
    197199    ) );
Note: See TracChangeset for help on using the changeset viewer.