WordPress at a glance
filter is not described

upload_mimes filter-hook . WP 2.0.0

Filters list of allowed mime types and file extensions.


add_filter( 'upload_mimes', 'filter_function_name_3137', 10, 2 );
function filter_function_name_3137( $t, $user ){
	// filter...

	return $t;
Mime types keyed by the file extension regex corresponding to those types.
User ID, User object or null if not provided (indicates current user).

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

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

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

wp-includes/functions.php 3230
return apply_filters( 'upload_mimes', $t, $user );

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

wp-includes/ms-default-filters.php 98
add_filter( 'upload_mimes', 'check_upload_mimes' );