wp_constrain_dimensions

wp_constrain_dimensions

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

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('wp_constrain_dimensions') is found 1 times:

  • /wp-includes/media.php line 513
    	 * @param int   $current_height The current height of the image.
    	 * @param int   $max_width      The maximum width permitted.
    	 * @param int   $max_height     The maximum height permitted.
    	 */
    	return apply_filters( 'wp_constrain_dimensions', array( $w, $h ), $current_width, $current_height, $max_width, $max_height );
    }
    
    /**
     * Retrieves calculated resize dimensions for use in WP_Image_Editor.
     *
     * Calculates dimensions and coordinates for a resized image that fits