Make WordPress Core

Ticket #45528: 45528.7.diff

File 45528.7.diff, 841 bytes (added by dimadin, 6 years ago)
  • src/wp-includes/l10n.php

    diff --git src/wp-includes/l10n.php src/wp-includes/l10n.php
    index b073cb32d5..adff55cb3a 100644
    function load_script_textdomain( $handle, $domain, $path = null ) { 
    901901                return load_script_translations( $path . '/' . $handle_filename, $handle, $domain );
    902902        }
    903903
    904         $obj = $wp_scripts->registered[ $handle ];
     904        $src = $wp_scripts->registered[ $handle ]->src;
    905905
    906         $src = $obj->src;
    907906        if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && 0 === strpos( $src, $wp_scripts->content_url ) ) ) {
    908907                $src = $wp_scripts->base_url . $src;
    909908        }
    910         /** This filter is documented in wp-includes/class.wp-scripts.php */
    911         $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) );
    912909
    913910        $relative       = false;
    914911        $languages_path = WP_LANG_DIR;