personal_options_update WordPress Action Hook

The personal_options_update hook is called after the user's personal options have been updated. This hook gives you the chance to do something with the data before it is saved to the database. For example, you could encrypt the user's password before it is saved.

do_action( 'personal_options_update', int $user_id ) #

Fires before the page loads on the ‘Profile’ editing screen.


Description

The action only fires if the current user is editing their own profile.


Top ↑

Parameters

$user_id

(int)The user ID.


Top ↑

More Information

Generally, action hook is used to save custom fields that have been added to the WordPress profile page.

This hook only triggers when a user is viewing their own profile page. If you want to apply your hook to ALL profile pages (including users other than the current one), then you also need to use the edit_user_profile_update hook.


Top ↑

Source

File: wp-admin/user-edit.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by the Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.