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 |
---|---|
2227 | * @since 3.0.0 |
2228 | * |
2229 | * @param array $wp_check_filetype_and_ext File data array containing 'ext', 'type', and |
2230 | * 'proper_filename' keys. |
2231 | * @param string $file Full path to the file. |
2232 | * @param string $filename The name of the file (may differ from $file due to |
2233 | * $file being in a tmp directory). |
2234 | * @param array $mimes Key is the file extension with value as the mime type. |
2235 | */ |
2236 | return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes ); |
2237 | } |
2238 |
|
2239 | /** |
2240 | * Retrieve list of mime types and file extensions. |
2241 | * |
2242 | * @since 3.5.0 |
2243 | * @since 4.2.0 Support was added for GIMP (xcf) files. |
2244 | * |
2245 | * @return array Array of mime types keyed by the file extension regex corresponding to those types. |