WordPress filter hook · part of WordPress core
show_password_fields
A WordPress core filter that 4 plugins also fire themselves, running on 101K+ sites between them.
How to use show_password_fields
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'show_password_fields', function( $value, $profileuser ) {
// Change $value here.
return $value;
}, 10, 2 );Argument names come from Dynamic Password's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
4 plugins that fire show_password_fields
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
bbPress100,000+ installs
apply_filters( 'show_password_fields', true, bbpress()->displayed_user )templates/default/bbpress/form-user-passwords.php:14 -
Forumax500+ installs
apply_filters( 'show_password_fields', true, bbpress()->displayed_user )templates/form-user-passwords.php:14 -
Simple:Press Forum300+ installs
apply_filters( 'show_password_fields', true )admin/panel-profiles/forms/spa-profiles-options-form.php:79 -
Dynamic PasswordFewer than 10 installs
apply_filters( 'show_password_fields', true, $profileuser )inc/backend.php:234
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.