attachment_max_dims

attachment_max_dims

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

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('attachment_max_dims') is found 1 times:

  • /wp-includes/deprecated.php line 1951
     
    	list($src, $src_file) = $src;
    
    	// Do we need to constrain the image?
    	if ( ($max_dims = apply_filters('attachment_max_dims', $max_dims)) && file_exists($src_file) ) {
    
    		$imagesize = wp_getimagesize($src_file);
    
    		if (($imagesize[0] > $max_dims[0]) || $imagesize[1] > $max_dims[1] ) {
    			$actual_aspect = $imagesize[0] / $imagesize[1];
    			$desired_aspect = $max_dims[0] / $max_dims[1];