Make WordPress Core

Changeset 9212


Ignore:
Timestamp:
10/16/2008 08:44:39 PM (16 years ago)
Author:
ryan
Message:

Add optional path arg to load_theme_textdomain(). Props filosofo. fixes #6951

File:
1 edited

Legend:

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

    r9211 r9212  
    302302 * @param string $domain Unique identifier for retrieving translated strings
    303303 */
    304 function load_theme_textdomain($domain) {
     304function load_theme_textdomain($domain, $path = false) {
    305305    $locale = get_locale();
    306306
    307     $mofile = get_template_directory() . "/$locale.mo";
     307    $path = ( empty( $path ) ) ? get_template_directory() : $path;
     308
     309    $mofile = "$path/$locale.mo";
    308310    load_textdomain($domain, $mofile);
    309311}
Note: See TracChangeset for help on using the changeset viewer.