WordPress.org

Make WordPress Core

Changeset 8565


Ignore:
Timestamp:
08/06/08 01:00:33 (7 years ago)
Author:
azaozz
Message:

Revert 8562 (last was incorrect)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r8564 r8565  
    183183define('WPINC', 'wp-includes'); 
    184184 
    185 if ( constant('WP_POST_REVISIONS') ) { 
    186     /* 
    187      * PEAR Text_Diff depends on the include path matching its directory 
    188      * structure. This prevents modifying source code and maintaining the 
    189      * modifications when the package is updated. 
     185if ( !defined('WP_LANG_DIR') ) { 
     186    /** 
     187     * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR 
     188     * and uses that folder if it exists. Or it uses the "languages" folder in WPINC. 
     189     * 
     190     * @since 2.1.0 
    190191     */ 
    191     if ( function_exists( 'set_include_path' ) ) 
    192         set_include_path( get_include_path() . PATH_SEPARATOR . ABSPATH . WPINC ); 
    193     else if ( function_exists( 'ini_set' ) ) 
    194         ini_set( 'include_path',  ini_get('include_path') . PATH_SEPARATOR . ABSPATH . WPINC ); 
    195     else 
    196         define('WP_INCLUDE_PATH_DISABLED', true); 
     192    if ( file_exists(WP_CONTENT_DIR . '/languages') && @is_dir(WP_CONTENT_DIR . '/languages') ) { 
     193        define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH 
     194        if (!defined('LANGDIR')) { 
     195            // Old static relative path maintained for limited backwards compatibility - won't work in some cases 
     196            define('LANGDIR', 'wp-content/languages'); 
     197        } 
     198    } else { 
     199        define('WP_LANG_DIR', ABSPATH . WPINC . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH 
     200        if (!defined('LANGDIR')) { 
     201            // Old relative path maintained for backwards compatibility 
     202            define('LANGDIR', WPINC . '/languages'); 
     203        } 
     204    } 
    197205} 
    198206 
Note: See TracChangeset for help on using the changeset viewer.