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 |
---|---|
369 | * @param string[] $output_format { |
370 | * An array of mime type mappings. Maps a source mime type to a new |
371 | * destination mime type. Default empty array. |
372 | * |
373 | * @type string ...$0 The new mime type. |
374 | * } |
375 | * @param string $filename Path to the image. |
376 | * @param string $mime_type The source image mime type. |
377 | */ |
378 | $output_format = apply_filters( 'image_editor_output_format', array(), $filename, $mime_type ); |
379 |
|
380 | if ( isset( $output_format[ $mime_type ] ) |
381 | && $this->supports_mime_type( $output_format[ $mime_type ] ) |
382 | ) { |
383 | $mime_type = $output_format[ $mime_type ]; |
384 | $new_ext = $this->get_extension( $mime_type ); |
385 | } |
386 |
|
387 | // Double-check that the mime-type selected is supported by the editor. |