PeepSo_Helpers::get_name( $name,  $type = 'full' )


Parameters Parameters

(Required) name of the follower

$user_id

(Required)


Source Source

File: src/integrations/peepso/helpers/peepso-helpers.php

	public function get_name( $name, $type = 'full' ) {
		if ( empty( $name ) ) {
			return;
		}
		$full_name = explode( ' ', $name );
		if ( $type === 'last' ) {
			return isset( $full_name[1] ) ? $full_name[1] : '';
		}

		if ( $type === 'first' ) {
			return isset( $full_name[0] ) ? $full_name[0] : '';
		}

		if ( $type === 'full' ) {
			return $full_name;
		}

	}