Example #1
0
 /**
  * Sanitize
  *
  * @return  null|mixed
  * @since   1.0.0
  */
 public function sanitize()
 {
     parent::sanitize();
     if (is_numeric($this->field_value)) {
         return (double) $this->field_value;
     }
     return $this->field_value;
 }
Example #2
0
 /**
  * Sanitize
  *
  * @return  null|mixed
  * @since   1.0.0
  */
 public function sanitize()
 {
     parent::sanitize();
     if (in_array($this->field_value, $this->status_array)) {
         return (int) $this->field_value;
     }
     return 0;
 }