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 |
---|---|
247 | // file extension. If so, prefer extension from file. |
248 | if ( ! $mime_type || ( $file_mime == $mime_type ) ) { |
249 | $mime_type = $file_mime; |
250 | $new_ext = $file_ext; |
251 | } |
252 |
|
253 | // Double-check that the mime-type selected is supported by the editor. |
254 | // If not, choose a default instead. |
255 | if ( ! $this->supports_mime_type( $mime_type ) ) { |
256 | $mime_type = apply_filters( 'image_editor_default_mime_type', $this->default_mime_type ); |
257 | $new_ext = $this->get_extension( $mime_type ); |
258 | } |
259 |
|
260 | if ( $filename ) { |
261 | $ext = ''; |
262 | $info = pathinfo( $filename ); |
263 | $dir = $info['dirname']; |
264 |
|
265 | if( isset( $info['extension'] ) ) |