Uma área de pesquisa sobre o WordPress para devs e autores do tema



is_user_logged_in ›

Desde2.0.0
Obsoleton/a
is_user_logged_in ( Sem parâmetros )
Retorna:
  • (bool) True if user is logged in, false if not logged in.
Definido em:
Codex:

Determines whether the current visitor is a logged in user.

For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.



Fonte

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

		return $user->exists();
	}
endif;

if ( ! function_exists( 'auth_redirect' ) ) :