Ticket #3315: lang_in_content_dir.diff

File lang_in_content_dir.diff, 0.8 kB (added by markjaquith, 2 years ago)

slightly more streamlined logic

  • wp-settings.php

    old new  
    8282        require (ABSPATH . 'wp-content/advanced-cache.php'); 
    8383 
    8484define('WPINC', 'wp-includes'); 
    85 if ( !defined('LANGDIR') ) 
    86         define('LANGDIR', WPINC . '/languages');   // no leading slash, no trailing slash 
     85 
     86if ( !defined('LANGDIR') ) { 
     87        if ( file_exists(ABSPATH . 'wp-content/languages') && @is_dir(ABSPATH . 'wp-content/languages') ) 
     88                define('LANGDIR', 'wp-content/languages'); // no leading slash, no trailing slash 
     89        else 
     90                define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash 
     91
     92 
    8793if ( !defined('PLUGINDIR') ) 
    8894        define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash 
    8995if ( file_exists(ABSPATH . 'wp-content/db.php') )