diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
index 547a5d5..f1ddc60 100644
|
|
function bp_is_get_request() { |
1746 | 1746 | * @return bool True on success, false on failure. |
1747 | 1747 | */ |
1748 | 1748 | function bp_core_load_buddypress_textdomain() { |
1749 | | // Try to load via load_plugin_textdomain() first, for future |
1750 | | // wordpress.org translation downloads |
1751 | | if ( load_plugin_textdomain( 'buddypress', false, 'buddypress/bp-languages' ) ) { |
1752 | | return true; |
1753 | | } |
1754 | | |
1755 | | // Nothing found in bp-languages, so try to load from WP_LANG_DIR |
1756 | | $locale = apply_filters( 'buddypress_locale', get_locale() ); |
1757 | | $mofile = WP_LANG_DIR . '/buddypress-' . $locale . '.mo'; |
| 1749 | $domain = 'buddypress'; |
| 1750 | $mofile_custom = sprintf( '%s-%s.mo', $domain, apply_filters( 'buddypress_locale', get_locale() ) ); |
| 1751 | |
| 1752 | $locations = apply_filters( 'buddypress_locale_locations', array( |
| 1753 | trailingslashit( WP_LANG_DIR ), |
| 1754 | trailingslashit( WP_LANG_DIR . '/' . $domain ), |
| 1755 | ) ); |
| 1756 | |
| 1757 | // Try custom locations in WP_LANG_DIR |
| 1758 | foreach ( $locations as $location ) { |
| 1759 | if ( load_textdomain( 'buddypress', $location . $mofile_custom ) ) { |
| 1760 | return true; |
| 1761 | } |
| 1762 | } |
1758 | 1763 | |
1759 | | return load_textdomain( 'buddypress', $mofile ); |
| 1764 | // default to WP and glotpress |
| 1765 | return load_plugin_textdomain( $domain );; |
1760 | 1766 | } |
1761 | 1767 | add_action ( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' ); |
1762 | 1768 | |
… |
… |
function bp_core_get_suggestions( $args ) { |
2080 | 2086 | } |
2081 | 2087 | |
2082 | 2088 | return apply_filters( 'bp_core_get_suggestions', $retval, $args ); |
2083 | | } |
2084 | | No newline at end of file |
| 2089 | } |