layers_sanitize_checkbox

The Layers layers sanitize checkbox function.

Description

layers_sanitize_checkbox( $value ); 

Parameters (1)

0. $value
The value.

Usage

  1. if ( !function_exists( 'layers_sanitize_checkbox' ) ) { 
  2. require_once '/core/helpers/sanitization.php'; 
  3.  
  4. // The value. 
  5. $value = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = layers_sanitize_checkbox($value); 
  9.  

Defined (1)

The function is defined in the following location(s).

/core/helpers/sanitization.php  
  1. function layers_sanitize_checkbox( $value ) { 
  2. if ( $value ) { 
  3. return '1'; 
  4. } else { 
  5. return false;