Last active
June 3, 2016 23:57
-
-
Save danieliser/086acb7ac597425a9c5e to your computer and use it in GitHub Desktop.
Filter example: remove a modal when user is logged in.
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 | |
add_filter('emodal_print_modals', 'remove_my_modal'); | |
function remove_my_modal($modals) | |
{ | |
$id_of_hidden_modal = 2;//The id of your modal. | |
if(is_user_logged_in()) | |
{ | |
unset($modals[$id_of_hidden_modal]); | |
} | |
return $modals; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment