WP_Application_Passwords::chunk_password( string $raw_password ): string

Sanitizes and then splits a password into smaller chunks.


Parameters

$raw_password string Required
The raw application password.

Top ↑

Return

string The chunked password.


Top ↑

Source

File: wp-includes/class-wp-application-passwords.php. View all references

public static function chunk_password( $raw_password ) {
	$raw_password = preg_replace( '/[^a-z\d]/i', '', $raw_password );

	return trim( chunk_split( $raw_password, 4, ' ' ) );
}


Top ↑

Changelog

Changelog
Version Description
5.6.0 Introduced.

Top ↑

User Contributed Notes

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