Make WordPress Core


Ignore:
Timestamp:
11/21/2018 01:02:46 AM (8 years ago)
Author:
pento
Message:

i18n: Remove the wp_get_jed_locale_data() function.

This function was used as a translation workaround in the Gutenberg plugin, it has been replaced in core with the wp_set_script_translations() functionality, instead.

See #45111.

File:
1 edited

Legend:

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

    r43898 r43910  
    14701470        return $wp_locale_switcher->is_switched();
    14711471}
    1472 
    1473 /**
    1474  * Returns Jed-formatted localization data.
    1475  *
    1476  * @since 5.0.0
    1477  *
    1478  * @param string $domain Translation domain.
    1479  * @return array Jed-formatted localization data.
    1480  */
    1481 function wp_get_jed_locale_data( $domain ) {
    1482         $translations = get_translations_for_domain( $domain );
    1483 
    1484         $locale = array(
    1485                 '' => array(
    1486                         'domain' => $domain,
    1487                         'lang'   => determine_locale(),
    1488                 ),
    1489         );
    1490 
    1491         if ( ! empty( $translations->headers['Plural-Forms'] ) ) {
    1492                 $locale['']['plural_forms'] = $translations->headers['Plural-Forms'];
    1493         }
    1494 
    1495         foreach ( $translations->entries as $msgid => $entry ) {
    1496                 $locale[ $msgid ] = $entry->translations;
    1497         }
    1498 
    1499         return $locale;
    1500 }
Note: See TracChangeset for help on using the changeset viewer.