Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save badabingbreda/3aaad7a84e86b50e22b03fa06a9e0a17 to your computer and use it in GitHub Desktop.
Save badabingbreda/3aaad7a84e86b50e22b03fa06a9e0a17 to your computer and use it in GitHub Desktop.
Toolbox Filter - adding conditional filter
<?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