Make WordPress Core

Ticket #56191: 56191.diff

File 56191.diff, 890 bytes (added by lovor, 3 years ago)
  • src/wp-includes/l10n.php

     
    10151015 * @return string|false The translated strings in JSON encoding on success,
    10161016 *                      false if the script textdomain could not be loaded.
    10171017 */
    1018 function load_script_textdomain( $handle, $domain = 'default', $path = null ) {
     1018function load_script_textdomain( $handle, $domain = 'default', $path = '' ) {
    10191019        $wp_scripts = wp_scripts();
    10201020
    10211021        if ( ! isset( $wp_scripts->registered[ $handle ] ) ) {
     
    10221022                return false;
    10231023        }
    10241024
    1025         $path   = untrailingslashit( $path );
     1025        $path   = untrailingslashit( null !== $path ? $path : '' );
    10261026        $locale = determine_locale();
    10271027
    10281028        // If a path was given and the handle file exists simply return it.