Kevin Daniels
Member
Posted 3 months ago #
How do I modify line 352 of media.php inside wp-includes folder from functions.php (so it doesn't get over-written upon new releases)
the line is:
$s_y = floor( ($orig_h - $crop_h) / 2 );
I want it to stay:
$s_y = floor( ($orig_h - $crop_h) / 4 );
this basically makes it so a hard crop will use the area slightly above the center so if the image is portrait oriented and of people their heads wont get cut off
Andrew Bartel
Member
Posted 3 months ago #
You don't. Didn't you know that every time someone hacks core God kills a kitten?
http://websynthesis.com/wsa/wp-content/uploads/2012/06/hack_core.jpg
This is untested but the function that line 352 is in says you can user the image_resize_dimensions filter to play around with it. Do that instead.
Kevin Daniels
Member
Posted 3 months ago #
its not the dimensions I want to change, I want to change the crop position