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 |
|---|---|
| 483 | * @param int $width Image width. |
| 484 | * @param int $height Image height. |
| 485 | * @param bool $crop Optional, default is false. Whether to crop image to specified height and width or resize. |
| 486 | * @return bool|array False, if no image was created. Metadata array on success. |
| 487 | */ |
| 488 | function image_make_intermediate_size($file, $width, $height, $crop=false) { |
| 489 | if ( $width || $height ) { |
| 490 | $resized_file = image_resize($file, $width, $height, $crop); |
| 491 | if ( !is_wp_error($resized_file) && $resized_file && $info = getimagesize($resized_file) ) { |
| 492 | $resized_file = apply_filters('image_make_intermediate_size', $resized_file); |
| 493 | return array( |
| 494 | 'file' => wp_basename( $resized_file ), |
| 495 | 'width' => $info[0], |
| 496 | 'height' => $info[1], |
| 497 | ); |
| 498 | } |
| 499 | } |
| 500 | return false; |
| 501 | } |