Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

40370-patch #5086

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open

40370-patch #5086

wants to merge 1 commit into from

Conversation

misfist
Copy link

@misfist misfist commented Aug 24, 2023

  • Applied 3 patches
  • Inserted patch updates that failed
  • Corrected code formatted for newly added code

Additional

Unit testing is required.

In manual tests, I found that an image uploaded when there are 3 image sizes with the same dimensions, but different crop settings, separate images were created for each of the images sizes.

Given the usecase:

add_image_size( 'newscentered', 400, 400, array( 'center', 'center') );
add_image_size( 'newstop', 400, 400, array( 'center', 'top' ) );
add_image_size( 'newsbottom', 400, 400, array( 'center', 'bottom' ) );

Uploaded the image carmella-red-dress.png

Produced the following files:
carmella-red-dress.png (original file)
carmella-red-dress-400x400-53fd9f7a.png
carmella-red-dress-400x400-420047e7.png
carmella-red-dress-400x400-34920233.png

Trac ticket: add_image_sizes does not create the "crop position" versions of the image


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Patch applied
40370.diff​ (4.7 KB) - added by themattroyal 5 years ago
patching file src/wp-includes/class-wp-image-editor-gd.php
Hunk #1 succeeded at 153 with fuzz 1 (offset 17 lines).
Hunk #2 FAILED at 225.
Hunk #3 FAILED at 256.
Hunk WordPress#4 succeeded at 557 with fuzz 2 (offset 105 lines).
2 out of 4 hunks FAILED
@TimothyBJacobs
Copy link
Member

Thanks for the PR @misfist! It looks like there are some linting issues we need to resolve.

Could you also add a description for the function parameters we are introducing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants