Changeset 48905 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 08/28/2020 04:43:31 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/image.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r48799 r48905 914 914 915 915 /** 916 * Determines whether the value is an acceptable type for GD image functions.917 *918 * In PHP 8.0, the GD extension uses GdImage objects for its data structures.919 * This function checks if the passed value is either a resource of type `gd`920 * or a GdImage object instance. Any other type will return false.921 *922 * @since 5.6.0923 *924 * @param resource|GdImage|false $image A value to check the type for.925 * @return bool True if $image is either a GD image resource or GdImage instance,926 * false otherwise.927 */928 function is_gd_image( $image ) {929 if ( is_resource( $image ) && 'gd' === get_resource_type( $image )930 || is_object( $image ) && $image instanceof GdImage931 ) {932 return true;933 }934 935 return false;936 }937 938 /**939 916 * Load an image resource for editing. 940 917 *
Note: See TracChangeset
for help on using the changeset viewer.