diff --git bp-core/bp-core-functions.php bp-core/bp-core-functions.php
index eb7917b..ecb2978 100644
|
|
function bp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) { |
1267 | 1267 | * @package BuddyPress Core |
1268 | 1268 | */ |
1269 | 1269 | function bp_core_load_buddypress_textdomain() { |
1270 | | $locale = apply_filters( 'buddypress_locale', get_locale() ); |
1271 | | $mofile = sprintf( 'buddypress-%s.mo', $locale ); |
1272 | | $mofile_global = WP_LANG_DIR . '/' . $mofile; |
1273 | | $mofile_local = BP_PLUGIN_DIR . 'bp-languages/' . $mofile; |
1274 | | |
1275 | | if ( file_exists( $mofile_global ) ) |
1276 | | return load_textdomain( 'buddypress', $mofile_global ); |
1277 | | elseif ( file_exists( $mofile_local ) ) |
1278 | | return load_textdomain( 'buddypress', $mofile_local ); |
1279 | | else |
1280 | | return false; |
| 1270 | $locale = apply_filters( 'buddypress_locale', get_locale() ); |
| 1271 | |
| 1272 | // BuddyPress language packs are stored in wp-content/languages |
| 1273 | $plugin_rel_path = '../languages'; |
| 1274 | |
| 1275 | // Legacy support for .mo files stored in bp-languages |
| 1276 | $legacy_mofile = BP_PLUGIN_DIR . 'bp-languages/' . sprintf( 'buddypress-%s.mo', $locale ); |
| 1277 | if ( file_exists( $legacy_mofile ) ) { |
| 1278 | $plugin_rel_path = 'buddypress/bp-languages'; |
| 1279 | } |
| 1280 | |
| 1281 | return load_plugin_textdomain( 'buddypress', false, $plugin_rel_path ); |
1281 | 1282 | } |
1282 | | add_action ( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' ); |
| 1283 | add_action( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' ); |
1283 | 1284 | |
1284 | 1285 | /** |
1285 | 1286 | * A javascript free implementation of the search functions in BuddyPress |