Changeset 53547
- Timestamp:
- 06/21/2022 11:16:09 AM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r53303 r53547 191 191 * 192 192 * @since 5.3.0 193 * @since 6.0.0 The `$filesize` value was added to the returned array. 193 194 * @access private 194 195 * … … 212 213 $image_meta['file'] = _wp_relative_upload_path( $new_file ); 213 214 215 // Add image file size. 216 $image_meta['filesize'] = wp_filesize( $new_file ); 217 214 218 // Store the original image file name in image_meta. 215 219 $image_meta['original_image'] = wp_basename( $original_file ); 216 217 // Add image file size.218 $image_meta['filesize'] = wp_filesize( $new_file );219 220 220 221 return $image_meta; … … 478 479 * 479 480 * @since 2.1.0 481 * @since 6.0.0 The `$filesize` value was added to the returned array. 480 482 * 481 483 * @param int $attachment_id Attachment ID to process. -
trunk/src/wp-includes/class-wp-image-editor-gd.php
r53317 r53547 426 426 * @since 5.9.0 Renamed `$filename` to `$destfilename` to match parent class 427 427 * for PHP 8 named parameter support. 428 * @since 6.0.0 The `$filesize` value was added to the returned array. 428 429 * 429 430 * @param string|null $destfilename Optional. Destination filename. Default null. 430 431 * @param string|null $mime_type Optional. The mime-type. Default null. 431 * @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string} 432 * @return array|WP_Error { 433 * Array on success or WP_Error if the file failed to save. 434 * 435 * @type string $path Path to the image file. 436 * @type string $file Name of the image file. 437 * @type int $width Image width. 438 * @type int $height Image height. 439 * @type string $mime-type The mime type of the image. 440 * @type int $filesize File size of the image. 441 * } 432 442 */ 433 443 public function save( $destfilename = null, $mime_type = null ) { … … 443 453 444 454 /** 455 * @since 3.5.0 456 * @since 6.0.0 The `$filesize` value was added to the returned array. 457 * 445 458 * @param resource|GdImage $image 446 459 * @param string|null $filename 447 460 * @param string|null $mime_type 448 * @return array|WP_Error 461 * @return array|WP_Error { 462 * Array on success or WP_Error if the file failed to save. 463 * 464 * @type string $path Path to the image file. 465 * @type string $file Name of the image file. 466 * @type int $width Image width. 467 * @type int $height Image height. 468 * @type string $mime-type The mime type of the image. 469 * @type int $filesize File size of the image. 470 * } 449 471 */ 450 472 protected function _save( $image, $filename = null, $mime_type = null ) { -
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r53317 r53547 662 662 * 663 663 * @since 3.5.0 664 * @since 6.0.0 The `$filesize` value was added to the returned array. 664 665 * 665 666 * @param string $destfilename Optional. Destination filename. Default null. 666 667 * @param string $mime_type Optional. The mime-type. Default null. 667 * @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string} 668 * @return array|WP_Error { 669 * Array on success or WP_Error if the file failed to save. 670 * 671 * @type string $path Path to the image file. 672 * @type string $file Name of the image file. 673 * @type int $width Image width. 674 * @type int $height Image height. 675 * @type string $mime-type The mime type of the image. 676 * @type int $filesize File size of the image. 677 * } 668 678 */ 669 679 public function save( $destfilename = null, $mime_type = null ) { … … 685 695 686 696 /** 697 * @since 3.5.0 698 * @since 6.0.0 The `$filesize` value was added to the returned array. 699 * 687 700 * @param Imagick $image 688 701 * @param string $filename 689 702 * @param string $mime_type 690 * @return array|WP_Error 703 * @return array|WP_Error { 704 * Array on success or WP_Error if the file failed to save. 705 * 706 * @type string $path Path to the image file. 707 * @type string $file Name of the image file. 708 * @type int $width Image width. 709 * @type int $height Image height. 710 * @type string $mime-type The mime type of the image. 711 * @type int $filesize File size of the image. 712 * } 691 713 */ 692 714 protected function _save( $image, $filename = null, $mime_type = null ) { -
trunk/src/wp-includes/class-wp-image-editor.php
r53317 r53547 76 76 * 77 77 * @since 3.5.0 78 * @since 6.0.0 The `$filesize` value was added to the returned array. 78 79 * @abstract 79 80 * 80 81 * @param string $destfilename Optional. Destination filename. Default null. 81 82 * @param string $mime_type Optional. The mime-type. Default null. 82 * @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string} 83 * @return array|WP_Error { 84 * Array on success or WP_Error if the file failed to save. 85 * 86 * @type string $path Path to the image file. 87 * @type string $file Name of the image file. 88 * @type int $width Image width. 89 * @type int $height Image height. 90 * @type string $mime-type The mime type of the image. 91 * @type int $filesize File size of the image. 92 * } 83 93 */ 84 94 abstract public function save( $destfilename = null, $mime_type = null ); -
trunk/src/wp-includes/post.php
r53543 r53547 6509 6509 * 6510 6510 * @since 2.1.0 6511 * @since 6.0.0 The `$filesize` value was added to the returned array. 6511 6512 * 6512 6513 * @param int $attachment_id Attachment post ID. Defaults to global $post.
Note: See TracChangeset
for help on using the changeset viewer.