functions.php: add a fix for bbpress not showing js editor support
This commit is contained in:
parent
901183399f
commit
f8b87c9bf8
@ -470,3 +470,15 @@ function prevent_multisite_signup()
|
||||
die();
|
||||
}
|
||||
add_action( 'signup_header', 'prevent_multisite_signup' );
|
||||
|
||||
/* Fix for missing js support in bbpress editor */
|
||||
add_filter ('bbp_body_class', 'rew_unset_no_js') ;
|
||||
|
||||
function rew_unset_no_js($classes) {
|
||||
if (in_array ('single-forum', $classes) || in_array ('single-topic', $classes)) {
|
||||
if (($key = array_search('no-js', $classes)) !== false) {
|
||||
unset($classes[$key]);
|
||||
}
|
||||
}
|
||||
return $classes ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user