is_user_logged_in()
Determines whether the current visitor is a logged in user.
Description
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
Return
(bool) True if user is logged in, false if not logged in.
Source
File: wp-includes/pluggable.php
function is_user_logged_in() {
$user = wp_get_current_user();
return $user->exists();
}
Related
Uses
Uses | Description |
---|---|
wp-includes/pluggable.php: wp_get_current_user() |
Retrieves the current user object. |
Used By
Used By | Description |
---|---|
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::check_wp_version_check_exists() |
Tests whether |
wp-includes/class-wp-recovery-mode.php: WP_Recovery_Mode::handle_exit_recovery_mode() |
Handles a request to exit Recovery Mode. |
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php: WP_REST_Application_Passwords_Controller::get_user() |
Gets the requested user. |
wp-signup.php: show_blog_form() |
Generates and displays the Sign-up and Create Site forms. |
wp-signup.php: validate_blog_form() |
Validates the new site sign-up. |
wp-signup.php: validate_another_blog_signup() |
Validates a new site sign-up for an existing user. |
wp-includes/user.php: retrieve_password() |
Handles sending a password retrieval email to a user. |
wp-includes/general-template.php: wp_heartbeat_settings() |
Default settings for heartbeat. |
wp-includes/general-template.php: wp_enqueue_code_editor() |
Enqueues assets needed by the code editor for the given settings. |
wp-includes/general-template.php: user_can_richedit() |
Determines whether the user can access the visual editor. |
wp-includes/general-template.php: wp_register() |
Displays the Registration or Admin link. |
wp-includes/general-template.php: wp_loginout() |
Displays the Log In/Out link. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::create_item_permissions_check() |
Checks if a given request has access to create a comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::create_item() |
Creates a comment. |
wp-includes/rest-api/class-wp-rest-server.php: WP_REST_Server::serve_request() |
Handles serving a REST API request. |
wp-includes/class-wp-customize-widgets.php: WP_Customize_Widgets::wp_ajax_update_widget() |
Updates widget settings asynchronously. |
wp-includes/class-wp-query.php: WP_Query::parse_search() |
Generates SQL for the WHERE clause based on passed search terms. |
wp-includes/class-wp-query.php: WP_Query::get_posts() |
Retrieves an array of posts based on query variables. |
wp-includes/comment.php: get_page_of_comment() |
Calculates what page number a comment will appear on for comment paging. |
wp-includes/comment.php: wp_check_comment_flood() |
Checks whether comment flooding is occurring. |
wp-includes/admin-bar.php: is_admin_bar_showing() |
Determines whether the admin bar should be showing. |
wp-includes/admin-bar.php: wp_admin_bar_site_menu() |
Adds the “Site Name” menu. |
wp-includes/admin-bar.php: wp_admin_bar_my_sites_menu() |
Adds the “My Sites/[Site Name]” menu and all submenus. |
wp-includes/class-wp-admin-bar.php: WP_Admin_Bar::initialize() |
Initializes the admin bar. |
wp-includes/class-wp-admin-bar.php: WP_Admin_Bar::_render() | |
wp-includes/link-template.php: get_adjacent_post() |
Retrieves the adjacent post. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::handle_dismiss_autosave_or_lock_request() |
Deletes a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::customize_pane_settings() |
Prints JavaScript settings for parent window. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::setup_theme() |
Starts preview and customize theme. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::changeset_data() |
Gets changeset data. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::save() |
Handles customize_save WP Ajax request to save/update a changeset. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::handle_changeset_trash_request() |
Handles request to trash a changeset. |
wp-includes/post-template.php: get_body_class() |
Retrieves an array of the class names for the body element. |
wp-includes/rest-api.php: rest_cookie_check_errors() |
Checks for errors when using cookie-based authentication. |
wp-includes/rest-api.php: rest_authorization_required_code() |
Returns a contextual HTTP error code for authorization failure. |
wp-includes/rest-api.php: rest_send_cors_headers() |
Sends Cross-Origin Resource Sharing headers with API requests. |
wp-includes/post.php: get_posts_by_author_sql() |
Retrieves the post SQL based on capability, author, and type. |
wp-includes/post.php: _count_posts_cache_key() |
Returns the cache key for wp_count_posts() based on the passed arguments. |
wp-includes/post.php: wp_count_posts() |
Counts number of posts of a post type and if user has permissions to view. |
wp-includes/class-wp.php: WP::send_headers() |
Sends additional HTTP headers for caching, content type, etc. |
wp-includes/comment-template.php: wp_list_comments() |
Displays a list of comments. |
wp-includes/comment-template.php: comment_form() |
Outputs a complete commenting form for use within a template. |
wp-includes/comment-template.php: comments_template() |
Loads the comment template specified in $file. |
wp-includes/comment-template.php: get_comment_reply_link() |
Retrieves HTML content for reply to comment link. |
wp-includes/comment-template.php: get_post_reply_link() |
Retrieves HTML content for reply to post link. |
wp-includes/functions.php: wp_auth_check() |
Checks whether a user is still logged in, for the heartbeat. |
wp-includes/functions.php: wp_auth_check_load() |
Loads the auth check for monitoring whether the user is still logged in. |
wp-admin/includes/ms.php: _access_denied_splash() |
Displays an access denied message when a user tries to view a site’s dashboard they do not have access to. |
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |