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 |
---|---|
358 | * @param string[] $output_format { |
359 | * An array of mime type mappings. Maps a source mime type to a new |
360 | * destination mime type. Default empty array. |
361 | * |
362 | * @type string ...$0 The new mime type. |
363 | * } |
364 | * @param string $filename Path to the image. |
365 | * @param string $mime_type The source image mime type. |
366 | */ |
367 | $output_format = apply_filters( 'image_editor_output_format', array(), $filename, $mime_type ); |
368 |
|
369 | if ( isset( $output_format[ $mime_type ] ) |
370 | && $this->supports_mime_type( $output_format[ $mime_type ] ) |
371 | ) { |
372 | $mime_type = $output_format[ $mime_type ]; |
373 | $new_ext = $this->get_extension( $mime_type ); |
374 | } |
375 |
|
376 | // Double-check that the mime-type selected is supported by the editor. |