Created
June 1, 2016 14:34
-
-
Save travislima/810682f3165fea2eb2600d71157e6cdd to your computer and use it in GitHub Desktop.
PMPro - Hide TOS Page for Free Level
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 | |
//copy lines 4 - 14 into your theme's functions.php or custom plugin | |
function my_option_pmpro_tospage( $option ){ | |
global $pmpro_level; | |
//hide the TOS link if free level | |
if( pmpro_isLevelFree($pmpro_level) ){ | |
$option = false; | |
} | |
return $option; | |
} | |
add_filter('option_pmpro_tospage', 'my_option_pmpro_tospage', 10, 2); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment