Helper function for validiting and sanitizing values for crop parametr used in photon URLs

Returns the value passeed after it was sanitized by intval function while preserving trailing px string


Name Type Description
$value. int|string A number without unit (representing percentages) or a numerical string trailing with "px" representing a width/height in pixels

Return Value

int|string.: Sanitized value which is safe to use in URL

Ready to get started?

Drop us a note.

No matter where you are in the planning process, we’re happy to help, and we’re actual humans here on the other side of the form. 👋 We’re here to discuss your challenges and plans, evaluate your existing resources or a potential partner, or even make some initial recommendations. And, of course, we’re here to help any time you’re in the market for some robust WordPress awesomeness.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.