wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_create_thumbnail › WordPress Function

Since1.2.0
Deprecated3.5.0
wp_create_thumbnail ( $file, $max_side, $deprecated = '' )
Parameters: (3)
  • (mixed) $file Filename of the original image, Or attachment ID.
    Required: Yes
  • (int) $max_side Maximum length of a single side for the thumbnail.
    Required: Yes
  • (mixed) $deprecated Never used.
    Required: No
    Default: (empty)
See:
Returns:
  • (string) Thumbnail path on success, Error string on failure.
Defined at:
Codex:

This was once used to create a thumbnail from an Image given a maximum side size.



Source

function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'image_resize()' );
	return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
}