Determines the maximum upload size allowed in php.ini.
Source
* @since 5.6.0
*
* @param resource|GdImage|false $image A value to check the type for.
* @return bool True if `$image` is either a GD image resource or a GdImage instance,
* false otherwise.
*/
function is_gd_image( $image ) {
if ( $image instanceof GdImage
|| is_resource( $image ) && 'gd' === get_resource_type( $image )
) {
return true;
}
return false;
}
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
Get maximum upload size (in bytes)