Right path to lang dir
Right init

With bbp_init action we don't need to check if bbPress active because
bbp_init is bbPress specific action.
Delete unnecessary check
The right way to check if bbPress exists
New logic

Completely new logic to add rewrite rules and filters to create the
right permalinks to posts (forums, topics, replies).
— No check if (class_exists ('bbPress')) because we use bbPress
specific action bbp_init.
— Check permalink_structure type only once and decide what type on
links we need (-1 function call, super optimization).
— Two different functions instead of bbp_permalinks_post_type_link (see
previous list item).