WP_Application_Passwords::chunk_password( string $raw_password )

Sanitizes and then splits a password into smaller chunks.

Parameters Parameters


(string) (Required) The raw application password.

Top ↑

Return Return

(string) The chunked password.

Top ↑

Source Source

File: wp-includes/class-wp-application-passwords.php

	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 User Contributed Notes

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