of_sanitize_background

Sanitization for background option.

Description

of_sanitize_background( $input ); 

Parameters (1)

0. $input
The input.

Usage

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

Defined (1)

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

/admin/options-framework/options-sanitize.php  
  1. function of_sanitize_background( $input ) { 
  2. $output = wp_parse_args( $input, array( 
  3. 'color' => '',  
  4. 'image' => '',  
  5. 'repeat' => 'repeat',  
  6. 'position' => 'top center',  
  7. 'attachment' => 'scroll' 
  8. ) ); 
  9.  
  10. $output['color'] = apply_filters( 'of_sanitize_hex', $input['color'] ); 
  11. $output['image'] = apply_filters( 'of_sanitize_upload', $input['image'] ); 
  12. $output['repeat'] = apply_filters( 'of_background_repeat', $input['repeat'] ); 
  13. $output['position'] = apply_filters( 'of_background_position', $input['position'] ); 
  14. $output['attachment'] = apply_filters( 'of_background_attachment', $input['attachment'] ); 
  15.  
  16. return $output;