of_sanitize_font_size

Sanitization for font size.

Description

of_sanitize_font_size( $value ); 

Parameters (1)

0. $value
The value.

Usage

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

Defined (1)

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

/inc/includes/class-options-sanitize.php  
  1. function of_sanitize_font_size( $value ) { 
  2. $recognized = of_recognized_font_sizes(); 
  3. $value_check = preg_replace('/px/', '', $value); 
  4. if ( in_array( (int) $value_check, $recognized ) ) { 
  5. return $value; 
  6. return apply_filters( 'of_default_font_size', $recognized );