Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save greathmaster/c9985b6f4354bce532173982dcccad56 to your computer and use it in GitHub Desktop.
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
/*
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