Last active
September 20, 2016 08:02
-
-
Save imath/4490df55cb4e6c3e12ac1e896c68ba77 to your computer and use it in GitHub Desktop.
put this in any random file into /wp-content/mu-plugins/ to get your custom language files back in bbPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Exit if accessed directly | |
defined( 'ABSPATH' ) || exit; | |
function fix_bbpress_custom_language_packs( $bbpress = null ) { | |
// No need to perform this action, it's too late! | |
remove_action( 'bbp_load_textdomain', array( $bbpress, 'load_textdomain' ), 5 ); | |
/** | |
* To be sure the custom language pack is loaded, let's be the first to load the textdomain | |
* | |
* NB: bbp_loaded is hooking 'plugins_loaded' at 10. Hooking 'plugins_loaded' later than 10 | |
* won't load the custom language pack | |
*/ | |
add_action( 'bbp_loaded', array( $bbpress, 'load_textdomain' ), 0 ); | |
} | |
add_action( 'bbp_after_setup_actions', 'fix_bbpress_custom_language_packs', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment