wpcom_vip_sanitize_photon_crop_values

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

Parameters

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?

Tell us about your needs

Let us lead the way. We’ll help you select a top tier development partner. We’ll train your developers, operations, infrastructure, and editorial teams. We’ll coarchitect your deployment processes. We will provide live support for peak events. We’ll help your people avoid dark alleys and blind corners, and reduce wasted cycles.