acf-focuspoint
acf-focuspoint copied to clipboard
Coordinates 0,0 should not be considered "unset"
Using empty()
~or isset()
~ has the downside of considering 0
(zero) falsy, but when top is 0
and left is 0
and someone wants to use that as the focus-point - it goes back to the center.
https://github.com/ooksanen/acf-focuspoint/blob/8b8b361dd94443257c19c3372fca8bc864909ba6/fields/class-acffp-acf-field-focuspoint-v5.php#L498
There are other places that this is affected.
Edit: isset()
treats 0
correctly.
Thanks for reporting @avioli, I'll check this as soon as possible.
Made a PR #16