Created
May 22, 2019 18:34
-
-
Save greathmaster/cdfe801e526f43f4d71f3cc4c5ddf735 to your computer and use it in GitHub Desktop.
Set flag to hide members from the directory upon new user creation by an admin
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
/*Set flag to hide members from the directory upon new user creation by an admin*/ | |
function pmpromd_set_visibility_to_hidden_edit_user_created_user ($user_id, $notify) | |
{ | |
update_user_meta( $user_id, 'pmpromd_hide_directory', true ); | |
} | |
add_action('edit_user_created_user', 'pmpromd_set_visibility_to_hidden_edit_user_created_user', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment