sanitize_file_name хук-фильтрWP 2.8.0

Filters a sanitized filename string.

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

add_filter( 'sanitize_file_name', 'wp_kama_sanitize_file_name_filter', 10, 2 );

/**
 * Function for `sanitize_file_name` filter-hook.
 * 
 * @param string $filename     Sanitized filename.
 * @param string $filename_raw The filename prior to sanitization.
 *
 * @return string
 */
function wp_kama_sanitize_file_name_filter( $filename, $filename_raw ){

	// filter...
	return $filename;
}
$filename(строка)
Sanitized filename.
$filename_raw(строка)
The filename prior to sanitization.

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

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

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

sanitize_file_name()
sanitize_file_name
wp-includes/formatting.php 2095
return apply_filters( 'sanitize_file_name', $filename, $filename_raw );
wp-includes/formatting.php 2055
return apply_filters( 'sanitize_file_name', $filename, $filename_raw );

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

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