wp-includes/connectors.php:641Sanitizes stored application-password credentials for a connector.
$valuemixed$optionstringoptional''array{username:function wp_connectors_sanitize_application_password_credentials( $value, string $option = '' ): array { if ( ! is_array( $value ) ) { $value = array(); } if ( '' === $option ) { $option = str_replace( 'sanitize_option_', '', (string) current_filter() ); } $stored = get_option( $option ); if ( ! is_array( $stored ) ) { $stored = array(); } $credentials = array(); foreach ( array( 'username', 'password' ) as $field ) { if ( isset( $value[ $field ] ) && is_string( $value[ $field ] ) ) { $credentials[ $field ] = sanitize_text_field( $value[ $field ] ); } else { $credentials[ $field ] = isset( $stored[ $field ] ) && is_string( $stored[ $field ] ) ? $stored[ $field ] : ''; } } // A masked password means a client resubmitted a masked REST response. if ( str_repeat( "\u{2022}", 16 ) === $credentials['password'] ) { $credentials['password'] = isset( $stored['password'] ) && is_string( $stored['password'] ) ? $stored['password'] : ''; } if ( '' === $credentials['username'] ) { return array( 'username' => '', 'password' => '', ); } return $credentials;}Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
src/wp-includes/connectors.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.