Changeset 44404 for branches/5.0/src/wp-includes/class.wp-scripts.php
- Timestamp:
- 01/06/2019 05:05:24 PM (6 years ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
-
branches/5.0/src/wp-includes/class.wp-scripts.php
r43898 r44404 533 533 } 534 534 535 $output = '(function( translations ){' . 536 'translations.locale_data.messages[""].domain = "' . $domain . '";' . 537 'wp.i18n.setLocaleData( translations.locale_data.messages, "' . $domain . '" );' . 538 '})(' . $json_translations . ');'; 535 $output = <<<JS 536 ( function( domain, translations ) { 537 var localeData = translations.locale_data[ domain ] || translations.locale_data.messages; 538 localeData[""].domain = domain; 539 wp.i18n.setLocaleData( localeData, domain ); 540 } )( "{$domain}", {$json_translations} ); 541 JS; 539 542 540 543 if ( $echo ) { … … 547 550 /** 548 551 * Determines script dependencies. 549 552 * 550 553 * @since 2.1.0 551 554 *
Note: See TracChangeset
for help on using the changeset viewer.