llms_get_minimum_password_strength_name( string $strength = 'strong' )

Retrieve the translated name of minimum accepted password strength for student passwords


Parameters Parameters

$strength

(string) (Optional) Password strength value to translate. Default is 'strong'.

Default value: 'strong'


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/functions/llms.functions.person.php

function llms_get_minimum_password_strength_name( $strength = 'strong' ) {

	$opts = array(
		'strong'    => __( 'strong', 'lifterlms' ),
		'medium'    => __( 'medium', 'lifterlms' ),
		'weak'      => __( 'weak', 'lifterlms' ),
		'very-weak' => __( 'very weak', 'lifterlms' ),
	);

	$name = isset( $opts[ $strength ] ) ? $opts[ $strength ] : $strength;

	/**
	 * Filter the name of the password strength
	 *
	 * The dynamic portion of this hook, `$strength`, can be either "strong", "medium", "weak" or "very-weak".
	 *
	 * @since 5.0.0
	 *
	 * @param $string $name Translated name of the password strength value.
	 */
	return apply_filters( 'llms_get_minimum_password_strength_name_' . $strength, $name );

}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Remove database call to deprecated option and add the $strength parameter.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.