Created
June 29, 2020 07:46
-
-
Save andrewlimaza/371850f89d146664c32e1efa06d02557 to your computer and use it in GitHub Desktop.
Remove PMPro Series filter for posts to use default restricted content messages.
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
<?php | |
/** | |
* Remove PMPro Series (This post belongs to series X) message. Show default content restriction instead. | |
* Follow this guide to add code to your WordPress site: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_remove_series_filter() { | |
remove_filter( 'pmpro_non_member_text_filter', 'pmpros_pmpro_text_filter' ); | |
remove_filter( 'pmpro_not_logged_in_text_filter', 'pmpros_pmpro_text_filter' ); | |
} | |
add_action( 'init', 'my_pmpro_remove_series_filter' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment