_deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()'
);
$editor =
wp_get_image_editor( $file );
if ( is_wp_error( $editor ) ) return $editor;
$editor->
set_quality( $jpeg_quality );
$resized =
$editor->
resize( $max_w,
$max_h,
$crop );
if ( is_wp_error( $resized ) ) return $resized;
$dest_file =
$editor->
generate_filename( $suffix,
$dest_path );
$saved =
$editor->
save( $dest_file );
if ( is_wp_error( $saved ) ) return $saved;
return $dest_file;
}/**
* Retrieve a single post, based on post ID.
*
* Has categories in 'post_category' property or key. Has tags in 'tags_input'
* property or key.
*
* @since 1.0.0
* @deprecated 3.5.0 Use get_post()
* @see get_post()
*
* @param int $postid Post ID.
* @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
* @return WP_Post|null Post object or array holding post contents and information
*/