of_sanitize_multicheck

Sanitization for multicheck.

Description

of_sanitize_multicheck( $input, $option ); 

Parameters (2)

0. $input
The input.
1. $option
The option.

Usage

  1. if ( !function_exists( 'of_sanitize_multicheck' ) ) { 
  2. require_once '/admin/options-framework/options-sanitize.php'; 
  3.  
  4. // The input. 
  5. $input = null; 
  6.  
  7. // The option. 
  8. $option = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = of_sanitize_multicheck($input, $option); 
  12.  

Defined (1)

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

/admin/options-framework/options-sanitize.php  
  1. function of_sanitize_multicheck( $input, $option ) { 
  2. $output = ''; 
  3. if ( is_array( $input ) ) { 
  4. foreach( $option['options'] as $key => $value ) { 
  5. $output[$key] = "0"; 
  6. foreach( $input as $key => $value ) { 
  7. if ( array_key_exists( $key, $option['options'] ) && $value ) { 
  8. $output[$key] = "1"; 
  9. return $output;