Skip to content

Instantly share code, notes, and snippets.

View EugeneKwasny's full-sized avatar
🌴
Working remotely

Eugene K EugeneKwasny

🌴
Working remotely
View GitHub Profile
@saas786
saas786 / sanitize_checkbox.php
Last active April 7, 2019 10:47
Sanitization of customizer controls
/*
* Sanitize Checkbox
*/
// Source: https://github.com/FlagshipWP/flagship-library/blob/develop/customizer/classes/customizer-base.php
/**
* Sanitize a checkbox to only allow 0 or 1
*
* @since 1.2.0
* @access public