-
-
Save chazzzzy/f8f7fe0c62da3414962c to your computer and use it in GitHub Desktop.
Ultimate Member Roles for Writing and Press-This
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 | |
//https://gist.github.com/ultimatemember/8743ef32801f7bf08c82 | |
add_action('um_after_user_is_approved', 'wp_role_contributor_after_um', 99 ); | |
function wp_role_contributor_after_um( $user_id ) { | |
$wp_user_object = new WP_User( $user_id ); | |
$wp_user_object->set_role( 'contributor' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment