Make WordPress Core


Ignore:
Timestamp:
12/04/2018 01:12:47 AM (6 years ago)
Author:
pento
Message:

l10n: Ensure JavaScript language packages are loaded for the user locale.

load_script_textdomain() had a reversed check to decide if the user locale should be loaded. This check is now replaced with determine_local().

Props ocean90.
See #45465.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/l10n.php

    r43910 r43959  
    890890
    891891    $path   = untrailingslashit( $path );
    892     $locale = is_admin() ? get_locale() : get_user_locale();
     892    $locale = determine_locale();
    893893
    894894    // If a path was given and the handle file exists simply return it.
Note: See TracChangeset for help on using the changeset viewer.