WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/21/2006 08:46:39 PM (14 years ago)
Author:
ryan
Message:

Turn hard-coded paths to defines. Pull gettext includes int wp-settings. Props mdawaffe. fixes #3157

File:
1 edited

Legend:

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

    r3870 r4202  
    11<?php
    2 
    3 if ( defined('WPLANG') && '' != constant('WPLANG') ) {
    4     include_once(ABSPATH . 'wp-includes/streams.php');
    5     include_once(ABSPATH . 'wp-includes/gettext.php');
    6 }
    7 
    82function get_locale() {
    93    global $locale;
     
    7670
    7771    $locale = get_locale();
    78     $mofile = ABSPATH . "wp-includes/languages/$locale.mo";
     72    $mofile = ABSPATH . LANGDIR . "/$locale.mo";
    7973
    8074    load_textdomain('default', $mofile);
    8175}
    8276
    83 function load_plugin_textdomain($domain, $path = 'wp-content/plugins') {
     77function load_plugin_textdomain($domain, $path = false) {
    8478    $locale = get_locale();
     79    if ( false === $path )
     80        $path = PLUGINDIR;
    8581
    8682    $mofile = ABSPATH . "$path/$domain-$locale.mo";
Note: See TracChangeset for help on using the changeset viewer.