Changeset 46376
- Timestamp:
- 10/03/2019 02:46:46 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r46375 r46376 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 * … … 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 ) {
Note: See TracChangeset
for help on using the changeset viewer.