Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_create_thumbnail

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
13  * @param     int          $max_side     Maximum length of a single side for the thumbnail
14  * @return     string               Thumbnail path on success, Error string on failure
15  *
16  * This function can handle most image file formats which PHP supports.
17  * If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg.
18  */
19 function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
21      $thumbpath = image_resize( $file, $max_side, $max_side );
22      return apply_filters( 'wp_create_thumbnail', $thumbpath );
23 }
25 /**
26  * wp_crop_image() - Crop an Image to a given size.
27  *
28  * @package WordPress
29  * @internal Missing Long Description
30  * @param     int     $src_file     The source file
31  * @param     int     $src_x          The start x position to crop from