/**
  * removes all tags which a WP Post wouldn't allow in its content normally
  * @param string $value
  * @return string
  */
 function prepare_for_set($value)
 {
     if (!current_user_can('unfiltered_html')) {
         $value = wp_kses("{$value}", wp_kses_allowed_html('post'));
     }
     return parent::prepare_for_set($value);
 }
 /**
  * removes all tags when setting
  * @param string $value_inputted_for_field_on_model_object
  * @return string
  */
 function prepare_for_set($value_inputted_for_field_on_model_object)
 {
     global $allowedtags;
     $allowedtags['ol'] = array();
     $allowedtags['ul'] = array();
     $allowedtags['li'] = array();
     $value_with_select_tags = wp_kses("{$value_inputted_for_field_on_model_object}", $allowedtags);
     return parent::prepare_for_set($value_with_select_tags);
 }
 /**
  * Does shortcodes and auto-paragraphs the content (unless schema is 'no_wpautop')
  * @param type $value_on_field_to_be_outputted
  * @param type $schema
  * @return string
  */
 function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null)
 {
     if ($schema == 'form_input') {
         return parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema);
     } elseif ($schema == 'no_wpautop') {
         return do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema));
     } else {
         return wpautop(do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema)));
     }
 }
 function prepare_for_set($value_inputted_for_field_on_model_object)
 {
     if (is_string($value_inputted_for_field_on_model_object)) {
         return parent::prepare_for_set($value_inputted_for_field_on_model_object);
     } elseif (is_array($value_inputted_for_field_on_model_object)) {
         return array_map(array($this, 'prepare_for_set'), $value_inputted_for_field_on_model_object);
     } else {
         //so they passed NULL or an INT or something wack
         return $value_inputted_for_field_on_model_object;
     }
 }
 function prepare_for_set($value_inputted_for_field_on_model_object)
 {
     EE_Registry::instance()->load_helper('Array');
     $value_inputted_for_field_on_model_object = EEH_Array::maybe_unserialize($value_inputted_for_field_on_model_object);
     if (is_string($value_inputted_for_field_on_model_object)) {
         return parent::prepare_for_set($value_inputted_for_field_on_model_object);
     } elseif (is_array($value_inputted_for_field_on_model_object)) {
         return array_map(array($this, 'prepare_for_set'), $value_inputted_for_field_on_model_object);
     } else {
         //so they passed NULL or an INT or something wack
         return $value_inputted_for_field_on_model_object;
     }
 }
 /**
  *
  * @param string $table_column
  * @param string $nice_name
  * @param boolean $nullable
  * @param mixed $default_value
  * @param array $allowed_enum_values  keys are values to be used in the DB, values are how they should be displayed
  */
 function __construct($table_column, $nice_name, $nullable, $default_value, $allowed_enum_values)
 {
     $this->_allowed_enum_values = $allowed_enum_values;
     parent::__construct($table_column, $nice_name, $nullable, $default_value);
 }
 /**
  * removes all tags which a WP Post wouldn't allow in its content normally
  * @param string $value_inputted_for_field_on_model_object
  * @return string
  */
 function prepare_for_set($value_inputted_for_field_on_model_object)
 {
     $value_with_select_tags = wp_kses("{$value_inputted_for_field_on_model_object}", wp_kses_allowed_html('post'));
     return parent::prepare_for_set($value_with_select_tags);
 }
 /**
  * removes all tags when setting
  * @param string $value_inputted_for_field_on_model_object
  * @return string
  */
 function prepare_for_set($value_inputted_for_field_on_model_object)
 {
     $value_with_select_tags = wp_kses("{$value_inputted_for_field_on_model_object}", EEH_HTML::get_simple_tags());
     return parent::prepare_for_set($value_with_select_tags);
 }
 /**
  * removes all tags when setting
  * @param string $value_inputted_for_field_on_model_object
  * @return string
  */
 function prepare_for_set($value_inputted_for_field_on_model_object)
 {
     return wp_strip_all_tags(parent::prepare_for_set($value_inputted_for_field_on_model_object));
 }