Changeset 55757 for trunk/src/wp-includes/media.php
- Timestamp:
- 05/15/2023 10:26:54 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r55703 r55757 3749 3749 * 3750 3750 * In PHP 8.0, the GD extension uses GdImage objects for its data structures. 3751 * This function checks if the passed value is either a resource of type `gd`3752 * or a GdImage object instance. Any other type will return false.3751 * This function checks if the passed value is either a GdImage object instance 3752 * or a resource of type `gd`. Any other type will return false. 3753 3753 * 3754 3754 * @since 5.6.0 … … 3759 3759 */ 3760 3760 function is_gd_image( $image ) { 3761 if ( is_resource( $image ) && 'gd' === get_resource_type( $image )3762 || is_ object( $image ) && $image instanceof GdImage3761 if ( $image instanceof GdImage 3762 || is_resource( $image ) && 'gd' === get_resource_type( $image ) 3763 3763 ) { 3764 3764 return true;
Note: See TracChangeset
for help on using the changeset viewer.