wp_hash_password_options хук-фильтрWP 6.8.0

Filters the options passed to the password_hash() and password_needs_rehash() functions.

The default hashing algorithm is bcrypt, but this can be changed via the wp_hash_password_algorithm filter. You must ensure that the options are appropriate for the algorithm in use.

Использование

add_filter( 'wp_hash_password_options', 'wp_kama_hash_password_options_filter', 10, 2 );

/**
 * Function for `wp_hash_password_options` filter-hook.
 * 
 * @param array  $options   Array of options to pass to the password hashing functions. By default this is an empty array which means the default options will be used.
 * @param string $algorithm The hashing algorithm in use.
 *
 * @return array
 */
function wp_kama_hash_password_options_filter( $options, $algorithm ){

	// filter...
	return $options;
}
$options(массив)
Array of options to pass to the password hashing functions. By default this is an empty array which means the default options will be used.
$algorithm(строка)
The hashing algorithm in use.

Список изменений

С версии 6.8.0 Введена.

Где вызывается хук

wp_hash_password()
wp_hash_password_options
wp_password_needs_rehash()
wp_hash_password_options
wp-includes/pluggable.php 2698
$options = apply_filters( 'wp_hash_password_options', array(), $algorithm );
wp-includes/pluggable.php 2815
$options = apply_filters( 'wp_hash_password_options', array(), $algorithm );

Где используется хук в WordPress

Использование не найдено.