public function addBlogUser( $user_id ) {
		$user = get_userdata( $user_id );
		if ( $user && user_can( $user, 'edit_posts' ) ) {
			$slug = $user->user_nicename;
			$name = trim( "{$user->first_name} {$user->last_name}" );
			if ( empty( $name ) ) {
				$name = $user->display_name;
				if ( empty( $name ) ) {
					$name = $slug;
				}
			}
			$results = wp_insert_term(
				$name, self::TAXONOMY, [
					'slug' => $slug,
				]
			);
			if ( is_array( $results ) ) {
				add_term_meta( $results['term_id'], 'contributor_first_name', $user->first_name, true );
				add_term_meta( $results['term_id'], 'contributor_last_name', $user->last_name, true );
				return $results;
			}
		}
		return false;
	}
public function addBlogUser( $user_id ) {
		$user = get_userdata( $user_id );
		if ( $user && user_can( $user, 'edit_posts' ) ) {
			$slug = $user->user_nicename;
			$name = trim( "{$user->first_name} {$user->last_name}" );
			if ( empty( $name ) ) {
				$name = $user->display_name;
				if ( empty( $name ) ) {
					$name = $slug;
				}
			}
			$results = wp_insert_term(
				$name, self::TAXONOMY, [
					'slug' => $slug,
				]
			);
			if ( is_array( $results ) ) {
				add_term_meta( $results['term_id'], 'contributor_first_name', $user->first_name, true );
				add_term_meta( $results['term_id'], 'contributor_last_name', $user->last_name, true );
				return $results;
			}
		}
		return false;
	}
public function addBlogUser ( $ user_id ) { $ user = get_userdata ( $ user_id ) ; if ( $ user && user_can ( $ user , 'edit_posts' ) ) { $ slug = $ user -> user_nicename ; $ name = trim ( "{$user->first_name} {$user->last_name}" ) ; if ( empty ( $ name ) ) { $ name = $ user -> display_name ; if ( empty ( $ name ) ) { $ name = $ slug ; } } $ results = wp_insert_term ( $ name , self :: TAXONOMY , [ 'slug' => $ slug , ] ) ; if ( is_array ( $ results ) ) { add_term_meta ( $ results [ 'term_id' ] , 'contributor_first_name' , $ user -> first_name , true ) ; add_term_meta ( $ results [ 'term_id' ] , 'contributor_last_name' , $ user -> last_name , true ) ; return $ results ; } } return false ; }
Create a matching Contributor term for a given User ID. Used when a user is added to a blog.

@param int $user_id

@return array|false An array containing the `term_id` and `term_taxonomy_id`, false otherwise.
Create a matching Contributor term for a given User ID . Used when a user is added to a blog .