Skip to content

Commit

Permalink
Docs: Fix image_get_intermediate_size() docblock.
Browse files Browse the repository at this point in the history
The description of returned values in array was incorrect for `image_get_intermediate_size()`:
- `$file` returns the filename of image, no path information
- `$path` returns path relative to the uploads directory, not absolute

Props crstauf, sccr410.
Fixes #58686.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56122 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
audrasjb committed Jul 1, 2023
1 parent c734f91 commit 7f0eb07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,10 +749,10 @@ function wp_image_matches_ratio( $source_width, $source_height, $target_width, $
* Array of file relative path, width, and height on success. Additionally includes absolute
* path and URL if registered size is passed to `$size` parameter. False on failure.
*
* @type string $file Path of image relative to uploads directory.
* @type string $file Filename of image.
* @type int $width Width of image in pixels.
* @type int $height Height of image in pixels.
* @type string $path Absolute filesystem path of image.
* @type string $path Path of image relative to uploads directory.
* @type string $url URL of image.
* }
*/
Expand Down

0 comments on commit 7f0eb07

Please sign in to comment.