Make WordPress Core

Changeset 12840


Ignore:
Timestamp:
01/26/2010 05:25:31 PM (16 years ago)
Author:
ryan
Message:

Move load_muplugin_textdomain() to l10n.php

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r12733 r12840  
    384384
    385385/**
     386 * Load the translated strings for a plugin residing in the mu-plugins dir.
     387 *
     388 * @since 3.0
     389 *
     390 * @param string $domain Unique identifier for retrieving translated strings
     391 */
     392function load_muplugin_textdomain($domain, $path = false) {
     393    $locale = get_locale();
     394    if ( empty($locale) )
     395        $locale = 'en_US';
     396
     397    /* @todo $path is not used.  Was it ever used and was it expected to be an arbitrary absolute dir?
     398     * Ideally, it should be relative to WPMU_PLUGIN_DUR.
     399    if ( false === $path )
     400        $path = WPMU_PLUGIN_DIR;
     401    */
     402
     403    $mofile = WPMU_PLUGIN_DIR . "/$domain-$locale.mo";
     404    load_textdomain($domain, $mofile);
     405}
     406
     407/**
    386408 * Loads the theme's translated strings.
    387409 *
  • trunk/wp-includes/ms-functions.php

    r12839 r12840  
    55 * @package WordPress
    66 */
    7 
    8 function load_muplugin_textdomain($domain, $path = false) {
    9     $locale = get_locale();
    10     if ( empty($locale) )
    11         $locale = 'en_US';
    12 
    13     if ( false === $path )
    14         $path = WPMU_PLUGIN_DIR;
    15 
    16     $mofile = WPMU_PLUGIN_DIR . "/$domain-$locale.mo";
    17     load_textdomain($domain, $mofile);
    18 }
    197
    208// @todo use update_blog_details
Note: See TracChangeset for help on using the changeset viewer.