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