Skip to content

Instantly share code, notes, and snippets.

@kenmasters
Created September 18, 2018 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenmasters/da2dbde0fe58231eb4132a3f3c25df44 to your computer and use it in GitHub Desktop.
Save kenmasters/da2dbde0fe58231eb4132a3f3c25df44 to your computer and use it in GitHub Desktop.
add_filter( 'edit_profile_url', 'custom_profile_url', 10, 3 );
function custom_profile_url( $url, $user_id, $scheme ) {
if ( !current_user_can('subscriber') ) return;
return '';
}
# IMPORTANT NOTES: What the function does above is removing the link on the Edit Profile if the current loggedin user role is `subscriber`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment