Make WordPress Core

Changeset 25246


Ignore:
Timestamp:
09/04/2013 09:16:00 PM (11 years ago)
Author:
nacin
Message:

Ensure zxcvbn.min.js loads when we are guessing the wp-includes URL.

props iandunn, SergeyBiryukov.
fixes #25201.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r25157 r25246  
    5050function wp_default_scripts( &$scripts ) {
    5151
    52     if ( !$guessurl = site_url() )
     52
     53    if ( ! $guessurl = site_url() ) {
     54        $guessed_url = true;
    5355        $guessurl = wp_guess_url();
     56    }
    5457
    5558    $scripts->base_url = $guessurl;
     
    312315    $scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' );
    313316    did_action( 'init' ) && $scripts->localize( 'zxcvbn-async', '_zxcvbnSettings', array(
    314         'src' => includes_url( '/js/zxcvbn.min.js' ),
     317        'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js',
    315318    ) );
    316319
Note: See TracChangeset for help on using the changeset viewer.