Home / Disable / Customize the error message shown on the WPForms Password Reset form when the reset link is invalid or expired
Duplicate Snippet

Embed Snippet on Your Site

Customize the error message shown on the WPForms Password Reset form when the reset link is invalid or expired

Ralden Souza PRO
<10
Code Preview
php
<?php
/**
 * Customize the error message shown on the WPForms Password Reset form
 * when the reset link is invalid or expired.
 *
 * @link https://wpforms.com/developers/change-validation-messages-for-user-registration-addon/
 *
 * @param string $message The default error message.
 * @return string
 */
function wpf_custom_password_reset_invalid_link_message( $message ) {
    return wp_kses(
        __( '<strong>Error:</strong> Your password reset link is invalid or has expired. Please request a new link below.', 'text-domain' ),
        [ 'strong' => [] ]
    );
}
add_filter( 'wpforms_user_registration_frontend_reset_invalid_link_message', 'wpf_custom_password_reset_invalid_link_message', 10, 1 );

Comments

Add a Comment