| 1 | Index: wp-admin/includes/image.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/includes/image.php (revision 21499) |
|---|
| 4 | +++ wp-admin/includes/image.php (working copy) |
|---|
| 5 | @@ -7,27 +7,6 @@ |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | /** |
|---|
| 9 | - * Create a thumbnail from an Image given a maximum side size. |
|---|
| 10 | - * |
|---|
| 11 | - * This function can handle most image file formats which PHP supports. If PHP |
|---|
| 12 | - * does not have the functionality to save in a file of the same format, the |
|---|
| 13 | - * thumbnail will be created as a jpeg. |
|---|
| 14 | - * |
|---|
| 15 | - * @since 1.2.0 |
|---|
| 16 | - * |
|---|
| 17 | - * @param mixed $file Filename of the original image, Or attachment id. |
|---|
| 18 | - * @param int $max_side Maximum length of a single side for the thumbnail. |
|---|
| 19 | - * @param mixed $deprecated Never used. |
|---|
| 20 | - * @return string Thumbnail path on success, Error string on failure. |
|---|
| 21 | - */ |
|---|
| 22 | -function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { |
|---|
| 23 | - if ( !empty( $deprecated ) ) |
|---|
| 24 | - _deprecated_argument( __FUNCTION__, '1.2' ); |
|---|
| 25 | - $thumbpath = image_resize( $file, $max_side, $max_side ); |
|---|
| 26 | - return apply_filters( 'wp_create_thumbnail', $thumbpath ); |
|---|
| 27 | -} |
|---|
| 28 | - |
|---|
| 29 | -/** |
|---|
| 30 | * Crop an Image to a given size. |
|---|
| 31 | * |
|---|
| 32 | * @since 2.1.0 |
|---|
| 33 | Index: wp-admin/includes/deprecated.php |
|---|
| 34 | =================================================================== |
|---|
| 35 | --- wp-admin/includes/deprecated.php (revision 21499) |
|---|
| 36 | +++ wp-admin/includes/deprecated.php (working copy) |
|---|
| 37 | @@ -958,3 +958,23 @@ |
|---|
| 38 | function _media_button($title, $icon, $type, $id) { |
|---|
| 39 | _deprecated_function( __FUNCTION__, '3.5' ); |
|---|
| 40 | } |
|---|
| 41 | + |
|---|
| 42 | +/** |
|---|
| 43 | + * This was once used to create a thumbnail from an Image given a maximum side size. |
|---|
| 44 | + * |
|---|
| 45 | + * This function can handle most image file formats which PHP supports. If PHP |
|---|
| 46 | + * does not have the functionality to save in a file of the same format, the |
|---|
| 47 | + * thumbnail will be created as a jpeg. |
|---|
| 48 | + * |
|---|
| 49 | + * @since 1.2.0 |
|---|
| 50 | + * @deprecated 3.5.0 |
|---|
| 51 | + * |
|---|
| 52 | + * @param mixed $file Filename of the original image, Or attachment id. |
|---|
| 53 | + * @param int $max_side Maximum length of a single side for the thumbnail. |
|---|
| 54 | + * @param mixed $deprecated Never used. |
|---|
| 55 | + * @return string Thumbnail path on success, Error string on failure. |
|---|
| 56 | + */ |
|---|
| 57 | +function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { |
|---|
| 58 | + _deprecated_function( __FUNCTION__, '3.5', 'image_resize' ); |
|---|
| 59 | + return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) ); |
|---|
| 60 | +} |
|---|