Skip to content

Instantly share code, notes, and snippets.

@anthonybudd
Last active December 1, 2017 20:28
Show Gist options
  • Save anthonybudd/1bc88a0af5ea43960f8a81c50a8155e5 to your computer and use it in GitHub Desktop.
Save anthonybudd/1bc88a0af5ea43960f8a81c50a8155e5 to your computer and use it in GitHub Desktop.
<?php
function explicitPermissionGrantedCallback($user){
if(!is_null($user)){
var_dump($user); // WP_User
echo $user->user_nicename . 'has just just given permission';
}else{
// User is not logged in.
}
}
add_action('AIO_GDPR_explicit_permission_granted', 'explicitPermissionGrantedCallback');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment