wp_read_image_metadata_types

wp_read_image_metadata_types

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('wp_read_image_metadata_types') is found 1 times:

  • /wp-admin/includes/image.php line 947
    	 *
    	 * @param int[] $image_types Array of image types to check for exif data. Each value
    	 *                           is usually one of the `IMAGETYPE_*` constants.
    	 */
    	$exif_image_types = apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) );
    
    	if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types, true ) ) {
    		// Don't silence errors when in debug mode, unless running unit tests.
    		if ( defined( 'WP_DEBUG' ) && WP_DEBUG
    			&& ! defined( 'WP_RUN_CORE_TESTS' )
    		) {