Ticket #770: bp-core.patch
File bp-core.patch, 1.4 KB (added by , 16 years ago) |
---|
-
bp-core.php
21 21 if ( !defined( 'CUSTOM_USER_META_TABLE' ) ) 22 22 define( 'CUSTOM_USER_META_TABLE', $wpdb->base_prefix . 'usermeta' ); 23 23 24 /* Load the language file */25 if ( file_exists( BP_PLUGIN_DIR . '/bp-languages/buddypress-' . get_locale() . '.mo' ) )26 load_textdomain( 'buddypress', BP_PLUGIN_DIR . '/bp-languages/buddypress-' . get_locale() . '.mo' );27 28 24 /* Load the files containing functions that we globally will need. */ 29 25 require ( BP_PLUGIN_DIR . '/bp-core/bp-core-catchuri.php' ); 30 26 require ( BP_PLUGIN_DIR . '/bp-core/bp-core-classes.php' ); … … 1526 1522 wp_cache_delete( 'newest_users' ); 1527 1523 } 1528 1524 1525 /** 1526 * bp_load_buddypress_textdomain() 1527 * 1528 * Load the buddypress translation file for current language 1529 * 1530 * @package BuddyPress Core 1531 */ 1532 function bp_load_buddypress_textdomain() { 1533 $locale = get_locale(); 1534 $locale = apply_filters('buddypress_locale', $locale); 1535 $mofile = BP_PLUGIN_DIR . "/bp-languages/buddypress-$locale.mo"; 1536 load_textdomain( 'buddypress', $mofile ); 1537 } 1538 add_action ( 'plugins_loaded', 'bp_load_buddypress_textdomain', 9); 1539 1529 1540 // List actions to clear object caches on 1530 1541 add_action( 'bp_core_delete_avatar', 'bp_core_clear_user_object_cache' ); 1531 1542 add_action( 'bp_core_avatar_save', 'bp_core_clear_user_object_cache' );