daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest Jul 13th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Checkbox sanitization
  3.  *
  4.  * @param  bool int $input Whether the checkbox is checked.
  5.  * @return int             Whether the checkbox is checked.
  6.  */
  7. function my_sanitize_checkbox( $input ) {
  8.   if( 1 == $input || true == $input ){
  9.     return 1;
  10.   } else {
  11.     return 0;
  12.   }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top