Created
November 9, 2015 12:46
-
-
Save JudeRosario/21cfb9b43f6a784e61cf to your computer and use it in GitHub Desktop.
Swap out shortcodes
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
add_filter( 'the_content', 'swap_out_shortcodes', 20 ); | |
function swap_out_shortcodes( $content ) { | |
$content = str_replace("[s2If !is_user_logged_in()]","[s2If !current_user_can(access_s2member_level1)]", $content ); | |
$content = str_replace("[s2If is_user_logged_in()]","[s2If current_user_can(access_s2member_level1)]", $content ); | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment