Skip to content

Instantly share code, notes, and snippets.

@kimwhite
Created March 28, 2024 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimwhite/3f26dc62f8478216cba6e74b2b7c864b to your computer and use it in GitHub Desktop.
Save kimwhite/3f26dc62f8478216cba6e74b2b7c864b to your computer and use it in GitHub Desktop.
Replace the minimum password message provided by library
<?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