WP_Application_Passwords::chunk_password( string $raw_password ): string

In this article

Sanitizes and then splits a password into smaller chunks.

Parameters

$raw_passwordstringrequired
The raw application password.

Return

string The chunked password.

Source

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

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

Changelog

VersionDescription
5.6.0Introduced.

User Contributed Notes

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