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 |
---|---|
3846 | // figure out the file type, rather than forcing a failure based on extension. |
3847 | if ( isset( $file_info ) && $file_info['type'] ) { |
3848 | $args['mime_type'] = $file_info['type']; |
3849 | } |
3850 | } |
3851 |
|
3852 | // Check and set the output mime type mapped to the input type. |
3853 | if ( isset( $args['mime_type'] ) ) { |
3854 | /** This filter is documented in wp-includes/class-wp-image-editor.php */ |
3855 | $output_format = apply_filters( 'image_editor_output_format', array(), $path, $args['mime_type'] ); |
3856 | if ( isset( $output_format[ $args['mime_type'] ] ) ) { |
3857 | $args['output_mime_type'] = $output_format[ $args['mime_type'] ]; |
3858 | } |
3859 | } |
3860 |
|
3861 | $implementation = _wp_image_editor_choose( $args ); |
3862 |
|
3863 | if ( $implementation ) { |
3864 | $editor = new $implementation( $path ); |