Created
August 12, 2015 19:47
-
-
Save strangerstudios/0864d4a16574edd3f3c4 to your computer and use it in GitHub Desktop.
Use pmpro_levels_array filter to hide specific (in this case free) levels.
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
function my_pmpro_levels_array($levels) | |
{ | |
$newlevels = array(); | |
foreach($levels as $level) | |
{ | |
if(!pmpro_isLevelFree($level)) | |
$newlevels[] = $level; | |
} | |
return $newlevels; | |
} | |
add_filter("pmpro_levels_array", "my_pmpro_levels_array"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment