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 |
---|---|
343 | * An array of mime type mappings. Maps a source mime type to a new |
344 | * destination mime type. Default empty array. |
345 | * |
346 | * @type string ...$0 The new mime type. |
347 | * } |
348 | * @param string $filename Path to the image. |
349 | * @param string $mime_type The source image mime type. |
350 | * } |
351 | */ |
352 | $output_format = apply_filters( 'image_editor_output_format', array(), $filename, $mime_type ); |
353 |
|
354 | if ( isset( $output_format[ $mime_type ] ) |
355 | && $this->supports_mime_type( $output_format[ $mime_type ] ) |
356 | ) { |
357 | $mime_type = $output_format[ $mime_type ]; |
358 | $new_ext = $this->get_extension( $mime_type ); |
359 | } |
360 |
|
361 | // Double-check that the mime-type selected is supported by the editor. |