WordPress at a glance
filter is not described

wp_handle_upload filter-hook . WP 2.1.0

Filters the data array for the uploaded file.

Usage

add_filter( 'wp_handle_upload', 'filter_function_name_4063', 10, 2 );
function filter_function_name_4063( $upload, $context ){
	// filter...

	return $upload;
}
$upload(array)

Array of upload data.

  • file(string)
    Filename of the newly-uploaded file.

  • url(string)
    URL of the newly-uploaded file.

  • type(string)
    Mime type of the newly-uploaded file.
$context(string)
The type of upload action. Values include 'upload' or 'sideload'.

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

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

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

_wp_handle_upload()
wp_handle_upload
wp_upload_bits()
wp_handle_upload
wp-admin/includes/file.php 948-956
return apply_filters(
	'wp_handle_upload',
	array(
		'file' => $new_file,
		'url'  => $url,
		'type' => $type,
	),
	'wp_handle_sideload' === $action ? 'sideload' : 'upload'
);
wp-includes/functions.php 2741-2750
return apply_filters(
	'wp_handle_upload',
	array(
		'file'  => $new_file,
		'url'   => $url,
		'type'  => $wp_filetype['type'],
		'error' => false,
	),
	'sideload'
);

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

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