Works as Billed but Slows Site Significantly
-
This string swap plugin works as intended but it was adding almost 2 seconds of load time to my bbPress installation per the P3 Plugin Performance Profiler. I had to disable it as a result.
For those trying to achieve this without the slowdown, I was able to successfully change the names on my Forum software using the following code, added to the end of my Functions.php page in my theme:
add_filter( 'bbp_get_dynamic_roles', 'my_bbp_custom_role_names'); function my_bbp_custom_role_names(){ return array( // Keymaster bbp_get_keymaster_role() => array( 'name' => __( 'CHANGE THIS TO YOUR NAME', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) ), // Moderator bbp_get_moderator_role() => array( 'name' => __( 'Moderator', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) ), // Participant bbp_get_participant_role() => array( 'name' => __( 'Participant', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) ), // Spectator bbp_get_spectator_role() => array( 'name' => __( 'Spectator', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() ) ), // Blocked bbp_get_blocked_role() => array( 'name' => __( 'Blocked', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() ) ) ); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Works as Billed but Slows Site Significantly’ is closed to new replies.