Changeset 56416
- Timestamp:
- 08/18/2023 05:54:41 PM (14 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-gd.php
r56204 r56416 166 166 * @param int|null $max_w Image width. 167 167 * @param int|null $max_h Image height. 168 * @param bool|array $crop 168 * @param bool|array $crop { 169 * Optional. Image cropping behavior. If false, the image will be scaled (default), 170 * If true, image will be cropped to the specified dimensions using center positions. 171 * If an array, the image will be cropped using the array to specify the crop location: 172 * 173 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 174 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 175 * } 169 176 * @return true|WP_Error 170 177 */ … … 191 198 * @param int $max_w 192 199 * @param int $max_h 193 * @param bool|array $crop 200 * @param bool|array $crop { 201 * Optional. Image cropping behavior. If false, the image will be scaled (default), 202 * If true, image will be cropped to the specified dimensions using center positions. 203 * If an array, the image will be cropped using the array to specify the crop location: 204 * 205 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 206 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 207 * } 194 208 * @return resource|GdImage|WP_Error 195 209 */ -
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r56271 r56416 321 321 * @param int|null $max_w Image width. 322 322 * @param int|null $max_h Image height. 323 * @param bool|array $crop 323 * @param bool|array $crop { 324 * Optional. Image cropping behavior. If false, the image will be scaled (default), 325 * If true, image will be cropped to the specified dimensions using center positions. 326 * If an array, the image will be cropped using the array to specify the crop location: 327 * 328 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 329 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 330 * } 324 331 * @return true|WP_Error 325 332 */ -
trunk/src/wp-includes/class-wp-image-editor.php
r56361 r56416 107 107 * @param int|null $max_w Image width. 108 108 * @param int|null $max_h Image height. 109 * @param bool|array $crop 109 * @param bool|array $crop { 110 * Optional. Image cropping behavior. If false, the image will be scaled (default), 111 * If true, image will be cropped to the specified dimensions using center positions. 112 * If an array, the image will be cropped using the array to specify the crop location: 113 * 114 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 115 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 116 * } 110 117 * @return true|WP_Error 111 118 */ -
trunk/src/wp-includes/media.php
r56386 r56416 284 284 * @param int $width Optional. Image width in pixels. Default 0. 285 285 * @param int $height Optional. Image height in pixels. Default 0. 286 * @param bool|array $crop Optional. Image cropping behavior. If false, the image will be scaled (default), 287 * If true, image will be cropped to the specified dimensions using center positions. 288 * If an array, the image will be cropped using the array to specify the crop location. 289 * Array values must be in the format: array( x_crop_position, y_crop_position ) where: 290 * - x_crop_position accepts: 'left', 'center', or 'right'. 291 * - y_crop_position accepts: 'top', 'center', or 'bottom'. 286 * @param bool|array $crop { 287 * Optional. Image cropping behavior. If false, the image will be scaled (default). 288 * If true, image will be cropped to the specified dimensions using center positions. 289 * If an array, the image will be cropped using the array to specify the crop location: 290 * 291 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 292 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 293 * } 292 294 */ 293 295 function add_image_size( $name, $width = 0, $height = 0, $crop = false ) { … … 344 346 * @param int $width Image width in pixels. 345 347 * @param int $height Image height in pixels. 346 * @param bool|array $crop Optional. Whether to crop images to specified width and height or resize. 347 * An array can specify positioning of the crop area. Default false. 348 * @param bool|array $crop { 349 * Optional. Image cropping behavior. If false, the image will be scaled (default), 350 * If true, image will be cropped to the specified dimensions using center positions. 351 * If an array, the image will be cropped using the array to specify the crop location: 352 * 353 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 354 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 355 * } 348 356 */ 349 357 function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) { … … 512 520 * within a specified width and height. 513 521 * 514 * Cropping behavior is dependent on the value of $crop:515 * 1. If false (default), images will not be cropped.516 * 2. If an array in the form of array( x_crop_position, y_crop_position ):517 * - x_crop_position accepts 'left' 'center', or 'right'.518 * - y_crop_position accepts 'top', 'center', or 'bottom'.519 * Images will be cropped to the specified dimensions within the defined crop area.520 * 3. If true, images will be cropped to the specified dimensions using center positions.521 *522 522 * @since 2.5.0 523 523 * … … 526 526 * @param int $dest_w New width in pixels. 527 527 * @param int $dest_h New height in pixels. 528 * @param bool|array $crop Optional. Whether to crop image to specified width and height or resize. 529 * An array can specify positioning of the crop area. Default false. 528 * @param bool|array $crop { 529 * Optional. Image cropping behavior. If false, the image will be scaled (default). 530 * If true, image will be cropped to the specified dimensions using center positions. 531 * If an array, the image will be cropped using the array to specify the crop location: 532 * 533 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 534 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 535 * } 530 536 * @return array|false Returned array matches parameters for `imagecopyresampled()`. False on failure. 531 537 */ … … 671 677 * @since 2.5.0 672 678 * 673 * @param string $file File path. 674 * @param int $width Image width. 675 * @param int $height Image height. 676 * @param bool $crop Optional. Whether to crop image to specified width and height or resize. 677 * Default false. 679 * @param string $file File path. 680 * @param int $width Image width. 681 * @param int $height Image height. 682 * @param bool|array $crop { 683 * Optional. Image cropping behavior. If false, the image will be scaled (default), 684 * If true, image will be cropped to the specified dimensions using center positions. 685 * If an array, the image will be cropped using the array to specify the crop location: 686 * 687 * @type string $0 The x crop position. Accepts 'left' 'center', or 'right'. 688 * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. 689 * } 678 690 * @return array|false Metadata array on success. False if no image was created. 679 691 */
Note: See TracChangeset
for help on using the changeset viewer.