is_user_logged_in()
Checks if the current visitor is a logged in user.
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() |
Retrieve the current user object. |
Used By
Used By | Description |
---|---|
wp-signup.php: validate_another_blog_signup() |
Validate a new site signup. |
wp-signup.php: show_blog_form() |
Generates and displays the Signup and Create Site forms |
wp-signup.php: validate_blog_form() |
Validate the new site signup |
wp-includes/general-template.php: wp_heartbeat_settings() |
Default settings for heartbeat |
wp-includes/general-template.php: wp_enqueue_code_editor() |
Enqueue assets needed by the code editor for the given settings. |
wp-includes/general-template.php: user_can_richedit() |
Whether the user can access the visual editor. |
wp-includes/general-template.php: wp_register() |
Display the Registration or Admin link. |
wp-includes/general-template.php: wp_loginout() |
Display 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 an 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() |
Retrieve the posts based on query variables. |
wp-includes/comment.php: wp_check_comment_flood() |
Checks whether comment flooding is occurring. |
wp-includes/admin-bar.php: is_admin_bar_showing() |
Determine whether the admin bar should be showing. |
wp-includes/admin-bar.php: wp_admin_bar_site_menu() |
Add the “Site Name” menu. |
wp-includes/admin-bar.php: wp_admin_bar_my_sites_menu() |
Add the “My Sites/[Site Name]” menu and all submenus. |
wp-includes/class-wp-admin-bar.php: WP_Admin_Bar::initialize() | |
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() |
Delete 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() |
Print JavaScript settings for parent window. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::setup_theme() |
Start preview and customize theme. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::changeset_data() |
Get changeset data. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::save() |
Handle customize_save WP Ajax request to save/update a changeset. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::handle_changeset_trash_request() |
Handle request to trash a changeset. |
wp-includes/post-template.php: get_body_class() |
Retrieve the classes for the body element as an array. |
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() |
Retrieve the post SQL based on capability, author, and type. |
wp-includes/post.php: _count_posts_cache_key() |
Return the cache key for wp_count_posts() based on the passed arguments. |
wp-includes/post.php: wp_count_posts() |
Count 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() |
List comments. |
wp-includes/comment-template.php: comment_form() |
Outputs a complete commenting form for use within a template. |
wp-includes/comment-template.php: get_comment_reply_link() |
Retrieve HTML content for reply to comment link. |
wp-includes/comment-template.php: get_post_reply_link() |
Retrieve HTML content for reply to post link. |
wp-includes/functions.php: wp_auth_check() |
Check whether a user is still logged in, for the heartbeat. |
wp-includes/functions.php: wp_auth_check_load() |
Load 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 |
---|---|
WP-2.0.0 | Introduced. |