Changeset 22817 for trunk/wp-includes/deprecated.php
- Timestamp:
- 11/22/2012 09:52:16 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/deprecated.php
r22463 r22817 3211 3211 * @since 2.1.0 3212 3212 * @deprecated 3.5.0 3213 * @see WP_Image_Editor3213 * @see wp_get_image_editor() 3214 3214 * 3215 3215 * @param string $file Filename of the image to load. … … 3217 3217 */ 3218 3218 function wp_load_image( $file ) { 3219 _deprecated_function( __FUNCTION__, '3.5', ' WP_Image_Editor' );3219 _deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' ); 3220 3220 3221 3221 if ( is_numeric( $file ) ) … … 3251 3251 * @since 2.5.0 3252 3252 * @deprecated 3.5.0 3253 * @see WP_Image_Editor3253 * @see wp_get_image_editor() 3254 3254 * 3255 3255 * @param string $file Image file path. … … 3263 3263 */ 3264 3264 function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) { 3265 _deprecated_function( __FUNCTION__, '3.5', ' WP_Image_Editor' );3266 3267 $editor = WP_Image_Editor::get_instance( $file );3265 _deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' ); 3266 3267 $editor = wp_get_image_editor( $file ); 3268 3268 if ( is_wp_error( $editor ) ) 3269 3269 return $editor; … … 3330 3330 */ 3331 3331 function _save_post_hook() {} 3332 3333 /** 3334 * Check if the installed version of GD supports particular image type 3335 * 3336 * @since 2.9.0 3337 * @deprecated 3.5.0 3338 * see wp_image_editor_supports() 3339 * 3340 * @param string $mime_type 3341 * @return bool 3342 */ 3343 function gd_edit_image_support($mime_type) { 3344 _deprecated_function( __FUNCTION__, '3.5', 'wp_image_editor_supports()' ); 3345 3346 if ( function_exists('imagetypes') ) { 3347 switch( $mime_type ) { 3348 case 'image/jpeg': 3349 return (imagetypes() & IMG_JPG) != 0; 3350 case 'image/png': 3351 return (imagetypes() & IMG_PNG) != 0; 3352 case 'image/gif': 3353 return (imagetypes() & IMG_GIF) != 0; 3354 } 3355 } else { 3356 switch( $mime_type ) { 3357 case 'image/jpeg': 3358 return function_exists('imagecreatefromjpeg'); 3359 case 'image/png': 3360 return function_exists('imagecreatefrompng'); 3361 case 'image/gif': 3362 return function_exists('imagecreatefromgif'); 3363 } 3364 } 3365 return false; 3366 }
Note: See TracChangeset
for help on using the changeset viewer.