TextToSqlAlt() public static méthode

public static TextToSqlAlt ( $value )
 /**
  * Updates the properties of a custom field.
  *
  * @param integer $customFieldId the id of the field to be updated
  * @param string $name the name of the field, the name is used to uniquely identify the field
  * 							when retrieving its value.
  * @param string $label the label of the field, the label is displayed beside the field
  * 							in Write tab. 
  * @param integer $order the order of the field when it is displayed in 
  * 							the Write tab.
  * @param integer $required_field whether this field is a required field. Required fields
  * 							doesn't allow users to save a post if they are null. 
  * @param integer $type the type of the field. Use $FIELD_TYPES defined in MF_Constant.php
  * @param array $options array of strings that represent the list of the field if
  * 							its type is list.
  * @param array $default_value array of strings that represent default value(s) of
  * 							of the field if	its type is list.
  * @param array $properties an array containing extra properties of the field.
  */
 public static function Update($customFieldId, $name, $label, $order = 1, $required_field = 0, $type, $options = null, $default_value = null, $properties = null, $duplicate, $helptext = null)
 {
     global $wpdb;
     $oldCustomField = RCCWP_CustomField::Get($customFieldId);
     $name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
     $name = str_replace(" ", "_", $name);
     $label = htmlspecialchars($label, ENT_QUOTES, 'UTF-8');
     $helptext = htmlspecialchars($helptext, ENT_QUOTES, 'UTF-8');
     if ($oldCustomField->name != $name) {
         $sql = $wpdb->prepare("UPDATE {$wpdb->postmeta} SET meta_key = %s WHERE meta_key = %s", array($name, $oldCustomField->name));
         $wpdb->query($sql);
     }
     $css = NULL;
     if (isset($_POST['custom-field-css'])) {
         $css = $_POST['custom-field-css'];
     }
     $sql = $wpdb->prepare("UPDATE " . MF_TABLE_GROUP_FIELDS . " SET name = %s" . " , description = %s" . " , display_order = %d" . " , required_field = %d" . " , type = %d" . " , CSS = '%s'" . " , duplicate = %d" . " , help_text = %s" . " WHERE id = %d", array(RC_Format::TextToSqlAlt($name), RC_Format::TextToSqlAlt($label), $order, $required_field, $type, $css, $duplicate, RC_Format::TextToSqlAlt($helptext), $customFieldId));
     $wpdb->query($sql);
     $field_type = RCCWP_CustomField::GetCustomFieldTypes($type);
     if ($field_type->has_options == "true") {
         if (!is_array($options)) {
             $options = stripslashes($options);
             $options = explode("\n", $options);
         }
         array_walk($options, array("RC_Format", "TrimArrayValues"));
         $options = addslashes(serialize($options));
         if (!is_array($default_value)) {
             $default_value = stripslashes($default_value);
             $default_value = explode("\n", $default_value);
         }
         array_walk($default_value, array("RC_Format", "TrimArrayValues"));
         $default_value = addslashes(serialize($default_value));
         $sql = $wpdb->prepare("INSERT INTO " . MF_TABLE_CUSTOM_FIELD_OPTIONS . " (custom_field_id, options, default_option) values (%d, %s, %s)" . " ON DUPLICATE KEY UPDATE options = %s, default_option = %s", array($customFieldId, RC_Format::TextToSqlAlt($options), RC_Format::TextToSqlAlt($default_value), RC_Format::TextToSqlAlt($options), RC_Format::TextToSqlAlt($default_value)));
         $wpdb->query($sql);
     } else {
         $sql = $wpdb->prepare("DELETE FROM " . MF_TABLE_CUSTOM_FIELD_OPTIONS . " WHERE custom_field_id = %d", array($customFieldId));
         $wpdb->query($sql);
     }
     if ($field_type->has_properties == "true") {
         $sql = $wpdb->prepare("INSERT INTO " . MF_TABLE_CUSTOM_FIELD_PROPERTIES . " (custom_field_id, properties) values (%d, %s)" . " ON DUPLICATE KEY UPDATE properties = %s", array($customFieldId, RC_Format::TextToSqlAlt(serialize($properties)), RC_Format::TextToSqlAlt(serialize($properties))));
         $wpdb->query($sql);
     } else {
         $sql = $wpdb->prepare("DELETE FROM " . MF_TABLE_CUSTOM_FIELD_PROPERTIES . " WHERE custom_field_id = %d", array($customFieldId));
         $wpdb->query($sql);
     }
 }