show_password_fields
Filters the display of the password fields.
Usage
add_filter( 'show_password_fields', 'wp_kama_show_password_fields_filter', 10, 2 ); /** * Function for `show_password_fields` filter-hook. * * @param bool $show Whether to show the password fields. * @param WP_User $profile_user User object for the current user to edit. * * @return bool */ function wp_kama_show_password_fields_filter( $show, $profile_user ){ // filter... return $show; }
- $show(true|false)
- Whether to show the password fields.
Default: true - $profile_user(WP_User)
- User object for the current user to edit.
Changelog
Since 1.5.1 | Introduced. |
Since 2.8.0 | Added the $profile_user parameter. |
Since 4.4.0 | Now evaluated only in user-edit.php. |
Where the hook is called
In file: /wp-admin/user-edit.php
show_password_fields
wp-admin/user-edit.php 626
$show_password_fields = apply_filters( 'show_password_fields', true, $profile_user );