pre_user_display_name хук-фильтрWP 2.0.3

Filters a user's display name before the user is created or updated.

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

add_filter( 'pre_user_display_name', 'wp_kama_pre_user_display_name_filter' );

/**
 * Function for `pre_user_display_name` filter-hook.
 * 
 * @param string $display_name The user's display name.
 *
 * @return string
 */
function wp_kama_pre_user_display_name_filter( $display_name ){

	// filter...
	return $display_name;
}
$display_name(строка)
The user's display name.

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

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

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

wp_insert_user()
pre_user_display_name
wp-includes/user.php 2265
$display_name = apply_filters( 'pre_user_display_name', $display_name );

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

wp-includes/default-filters.php 22
add_filter( $filter, 'sanitize_text_field' );
wp-includes/default-filters.php 23
add_filter( $filter, 'wp_filter_kses' );
wp-includes/default-filters.php 24
add_filter( $filter, '_wp_specialchars', 30 );