Created
March 28, 2024 14:56
-
-
Save kimwhite/3f26dc62f8478216cba6e74b2b7c864b to your computer and use it in GitHub Desktop.
Replace the minimum password message provided by library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // do not copy this line. | |
/** | |
* This recipe does replaces the default minimum password message | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function return_custom_error( $suggestion, $pass_strength ) { | |
return "Your Message Here"; | |
} | |
add_filter( 'pmprosp_minimum_password_score_message', 'return_custom_error', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment