Created
May 8, 2018 20:01
-
-
Save badabingbreda/3aaad7a84e86b50e22b03fa06a9e0a17 to your computer and use it in GitHub Desktop.
Toolbox Filter - adding conditional filter
This file contains hidden or 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 | |
// simple example of a conditional filter | |
add_filter( 'conditional_filter_check_userloggedin' , 'my_check_userloggedin' ,10 ,2 ); | |
function my_check_userloggedin( $is_visible , $node ) { | |
return is_user_logged_in(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment