Make WordPress Core

Ticket #42463: 42463.diff

File 42463.diff, 1009 bytes (added by nikolastoqnow, 6 years ago)

Add better description about crop parameter in add_image_size function

  • src/wp-includes/media.php

    diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
    index 1981f3ad9a..3e76d1c187 100644
    a b function image_downsize( $id, $size = 'medium' ) { 
    271271 * @param string     $name   Image size identifier.
    272272 * @param int        $width  Image width in pixels.
    273273 * @param int        $height Image height in pixels.
    274  * @param bool|array $crop   Optional. Whether to crop images to specified width and height or resize.
    275  *                           An array can specify positioning of the crop area. Default false.
     274 * @param bool|array $crop   Optional. If true, images will be crop without any adjustments
     275 *                           in dimensions. Otherwise we should try to adjust images dimensions
     276 *                           according specified width and height parameters before we crop it.
    276277 */
     278
    277279function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {
    278280        global $_wp_additional_image_sizes;
    279281