diff --git src/wp-includes/media.php src/wp-includes/media.php
index 71bfed3a42..a5a06564e8 100644
|
|
function image_downsize( $id, $size = 'medium' ) { |
268 | 268 | /** |
269 | 269 | * Register a new image size. |
270 | 270 | * |
271 | | * Cropping behavior for the image size is dependent on the value of $crop: |
272 | | * 1. If false (default), images will be scaled, not cropped. |
273 | | * 2. If an array in the form of array( x_crop_position, y_crop_position ): |
274 | | * - x_crop_position accepts 'left' 'center', or 'right'. |
275 | | * - y_crop_position accepts 'top', 'center', or 'bottom'. |
276 | | * Images will be cropped to the specified dimensions within the defined crop area. |
277 | | * 3. If true, images will be cropped to the specified dimensions using center positions. |
278 | | * |
279 | 271 | * @since 2.9.0 |
280 | 272 | * |
281 | 273 | * @global array $_wp_additional_image_sizes Associative array of additional image sizes. |
… |
… |
function image_downsize( $id, $size = 'medium' ) { |
283 | 275 | * @param string $name Image size identifier. |
284 | 276 | * @param int $width Optional. Image width in pixels. Default 0. |
285 | 277 | * @param int $height Optional. Image height in pixels. Default 0. |
286 | | * @param bool|array $crop Optional. Whether to crop images to specified width and height or resize. |
287 | | * An array can specify positioning of the crop area. Default false. |
| 278 | * @param bool|array $crop Optional. Image cropping behavior. If false, the image will be scaled (default), |
| 279 | * If true, image will be cropped to the specified dimensions using center positions. |
| 280 | * If an array, the image will be cropped using the array to specify the crop location. |
| 281 | * Array values must be in the format: array( x_crop_position, y_crop_position ) where: |
| 282 | * - x_crop_position accepts: 'left', 'center', or 'right'. |
| 283 | * - y_crop_position accepts: 'top', 'center', or 'bottom'. |
288 | 284 | */ |
289 | 285 | function add_image_size( $name, $width = 0, $height = 0, $crop = false ) { |
290 | 286 | global $_wp_additional_image_sizes; |