Skip to content

Instantly share code, notes, and snippets.

@designbuildtest
Created September 30, 2015 04:05
Show Gist options
  • Save designbuildtest/cca695577d2f5319a8e9 to your computer and use it in GitHub Desktop.
Save designbuildtest/cca695577d2f5319a8e9 to your computer and use it in GitHub Desktop.
Sanitize checkbox
<?php
// Sanitize Checkbox.
function dbt_sanitize_checkbox( $value ) {
if ( 1 == $value ) {
return true;
}
else {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment