Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Form_Field::enqueue_strength_meter( array $meter_settings )

Enqueue password strength meter script.


Parameters Parameters

$meter_settings

(array) (Required) Hash of meter configuration options.

  • 'blocklist'
    (string[]) A list of strings that are penalized when used in the password. See "user_inputs" at <a href="https://github.com/dropbox/zxcvbn#usage">https://github.com/dropbox/zxcvbn#usage</a>.
  • 'min_strength'
    (string) The minimum acceptable password strength. Accepts "strong", "medium", or "weak". Default: "strong".
  • 'min_length'
    (int) The minimum acceptable password length. Must be >= 6. Default: 6.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/forms/class-llms-form-field.php

	private function enqueue_strength_meter( $meter_settings ) {

		wp_enqueue_script( 'password-strength-meter' );
		// Localize the script with meter data.
		llms()->assets->enqueue_inline(
			'llms-pw-strength-settings',
			'window.LLMS.PasswordStrength = window.LLMS.PasswordStrength || {};window.LLMS.PasswordStrength.get_settings = function() { return JSON.parse( \'' . wp_json_encode( $meter_settings ) . '\' ); };',
			'footer',
			15
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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