Reference › Functions wp_get_current_user (): WP_User
Since 2.0.3
Source wp-includes/pluggable.php:69Description Return Uses Used by Source History Retrieves the current user object.
Description Will set the current user, if the current user is not set. The current user will be set to the logged-in person. If no user is logged-in, then it will set the current user to 0, which is invalid and won't have any permissions.
Return
WP_User Current WP_User instance. Used by · 40 Show all 40 is_super_admin() Determines whether user is a site admin. is_user_logged_in() Determines whether the current visitor is a logged in user. is_user_option_local() Check whether a usermeta key has to do with the current blog. is_user_spammy() Determines whether a user is marked as a spammer, based on user login. populate_network_meta() Creates WordPress network meta and sets the default values. send_confirmation_on_profile_email() Sends a confirmation request email when a change of user email address is attempted. set_screen_options() Saves option for number of rows when listing posts, pages, comments, etc. signup_another_blog() Shows a form for returning users to sign up for another site. the_block_editor_meta_box_post_form_hidden_fields() Renders the hidden form required for the meta boxes form. update_network_option_new_admin_email() Sends a confirmation request email when a change of network admin email address is attempted. update_option_new_admin_email() Sends a confirmation request email when a change of site admin email address is attempted. validate_another_blog_signup() Validates a new site sign-up for an existing user. validate_blog_form() Validates the new site sign-up. wp_admin_bar_my_account_item() Adds the "My Account" item. wp_admin_bar_my_account_menu() Adds the "My Account" submenu items. wp_ajax_closed_postboxes() Handles closed post boxes via AJAX. wp_ajax_hidden_columns() Handles hidden columns via AJAX. wp_ajax_meta_box_order() Handles saving the meta box order via AJAX. wp_ajax_replyto_comment() Handles replying to a comment via AJAX. wp_create_nonce() Creates a cryptographic token tied to a specific action, user, user session, and window of time. wp_default_editor() Finds out which editor should be displayed by default. wp_enqueue_code_editor() Enqueues assets needed by the code editor for the given settings. wp_handle_comment_submission() Handles the submission of a comment, usually posted to wp-comments-post.php via a comment form. wp_initial_nav_menu_meta_boxes() Limit the amount of meta boxes to pages, posts, links, and categories for first time users. wp_nav_menu_setup() Register nav menu meta boxes and advanced menu items. wp_switch_roles_and_user() Switches the initialized roles and current user capabilities to another site. wp_update_user() Updates a user in the database. wp_verify_nonce() Verifies that a correct security nonce was used with time limit. History Introduced in 2.0.3 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
About this page Parsed data Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/pluggable.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.