WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2952 | * @type string|false $type File mime type, or false if the file doesn't match a mime type. |
2953 | * @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined. |
2954 | * } |
2955 | * @param string $file Full path to the file. |
2956 | * @param string $filename The name of the file (may differ from $file due to |
2957 | * $file being in a tmp directory). |
2958 | * @param string[] $mimes Array of mime types keyed by their file extension regex. |
2959 | * @param string|bool $real_mime The actual mime type or false if the type cannot be determined. |
2960 | */ |
2961 | return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes, $real_mime ); |
2962 | } |
2963 |
|
2964 | /** |
2965 | * Returns the real mime type of an image file. |
2966 | * |
2967 | * This depends on exif_imagetype() or getimagesize() to determine real mime types. |
2968 | * |
2969 | * @since 4.7.1 |
2970 | * |