Skip to:
Content

BuddyPress.org

Ticket #770: bp-core.patch

File bp-core.patch, 1.4 KB (added by johnjamesjacoby, 16 years ago)

bp-core.php patch file

  • bp-core.php

     
    2121if ( !defined( 'CUSTOM_USER_META_TABLE' ) )
    2222        define( 'CUSTOM_USER_META_TABLE', $wpdb->base_prefix . 'usermeta' );
    2323
    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 
    2824/* Load the files containing functions that we globally will need. */
    2925require ( BP_PLUGIN_DIR . '/bp-core/bp-core-catchuri.php' );
    3026require ( BP_PLUGIN_DIR . '/bp-core/bp-core-classes.php' );
     
    15261522        wp_cache_delete( 'newest_users' );
    15271523}
    15281524
     1525/**
     1526 * bp_load_buddypress_textdomain()
     1527 *
     1528 * Load the buddypress translation file for current language
     1529 *
     1530 * @package BuddyPress Core
     1531 */
     1532function 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}
     1538add_action ( 'plugins_loaded', 'bp_load_buddypress_textdomain', 9);
     1539
    15291540// List actions to clear object caches on
    15301541add_action( 'bp_core_delete_avatar', 'bp_core_clear_user_object_cache' );
    15311542add_action( 'bp_core_avatar_save', 'bp_core_clear_user_object_cache' );