wp_set_lang_dir [ WordPress Function ]
| Access: |
|
| Defined at: |
|
Sets the location of the language directory.
To set directory manually, define
WP_LANG_DIR
in wp-config.php.
If the language directory exists within WP_CONTENT_DIR, that is used. Otherwise if the language directory exists within WPINC, that's used. Finally, if neither of the preceding directories are found, WP_CONTENT_DIR/languages is used.
The WP_LANG_DIR constant was introduced in 2.1.0.
Source
<?php
function wp_set_lang_dir() {
if ( !defined( 'WP_LANG_DIR' ) ) {
if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) || !@is_dir(ABSPATH . WPINC . '/languages') ) {
define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' ); // no leading slash, no trailing slash, full path, not relative to ABSPATH
if ( !defined( 'LANGDIR' ) ) {
// Old static relative path maintained for limited backwards compatibility - won't work in some cases
define( 'LANGDIR', 'wp-content/languages' );
}
} else {
define( 'WP_LANG_DIR', ABSPATH . WPINC . '/languages' ); // no leading slash, no trailing slash, full path, not relative to ABSPATH
if ( !defined( 'LANGDIR' ) ) {
// Old relative path maintained for backwards compatibility
define( 'LANGDIR', WPINC . '/languages' );
}
}
}
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_set_lang_dir (WordPress Function) - WPSeek.com
WordPress lookup for wp_set_lang_dir, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - wp_set_lang_dir
PHPXref.com - WordPress 3.0.1 - Function Reference: wp_set_lang_dir()
phpxref.com - WordPress › Support » Tags — wp_set_lang_dir
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » wp_set_lang_dir. Tag: wp_set_lang_dir Add New » ...
wordpress.org - PHPXRef 0.7 : WordPress : Function Reference: wp_set_lang_dir()
Function and Method Cross Reference. wp_set_lang_dir(). Defined at: /wp- includes/load.php -> line 283. Referenced 1 times: /wp-settings.php -> line 65 ...
phpxref.ftwr.co.uk