Checks if the current visitor is a logged in user.

Signature

is_user_logged_in()

Return

(boolean) True if user is logged in, false if not logged in.

Source

function is_user_logged_in() {
	$user = wp_get_current_user();

	if ( ! $user->exists() )
		return false;

	return true;
}
WP Trac GitHub

Link here