Last active
June 21, 2022 21:30
-
-
Save greathmaster/c9985b6f4354bce532173982dcccad56 to your computer and use it in GitHub Desktop.
Glue code for PMPro Add On Packages and PMPro bbPress. Allows you to sell access to individual forums by using the PMPro Add On Packages
This file contains 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
/* | |
Glue code for PMPro Add On Packages and PMPro bbPress. Allows you to sell access to individual forums by using the PMPro Add On Packages | |
*/ | |
function my_pmproap_supported_post_types($post_types) | |
{ | |
$post_types[] = 'forum'; | |
return $post_types; | |
} | |
add_filter('pmproap_supported_post_types', 'my_pmproap_supported_post_types'); | |
function my_bbp_template_include_theme_compat($template) | |
{ | |
bbp_restore_all_filters('the_content'); | |
$template = bbp_get_theme_compat_templates(); | |
return $template; | |
} | |
function my_init() | |
{ | |
remove_action( 'template_redirect', 'pmprobbp_check_forum' ); | |
} | |
add_action('init', 'my_init'); | |
add_filter('bbp_template_include_theme_compat', 'my_bbp_template_include_theme_compat'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment