/** * Updates the string translation for an admin option * * @global WPDB $wpdb * @global SitePress $sitepress * @global WPML_String_Translation $WPML_String_Translation * * @param string $option_name * @param string $language * @param string $new_value * @param int|bool $status * @param int $translator_id * @param int $rec_level * * @return boolean|mixed */ function icl_update_string_translation($option_name, $language, $new_value = null, $status = false, $translator_id = null, $rec_level = 0) { global $wpdb, $WPML_String_Translation, $sitepress; $admin_string = new WPML_ST_Admin_Option($wpdb, $sitepress, $WPML_String_Translation, $option_name); return $admin_string->update_translation($option_name, $language, $new_value, $status, $translator_id, $rec_level); }
/** * @param string $option name of the option * @param string|array $value new value of the option * @param string|array $old_value currently saved value for the option * * @return string|array the value actually to be written into the wp_options table */ function pre_update_option_settings($option, $value, $old_value) { global $sitepress, $wpdb; $option = new WPML_ST_Admin_Option($wpdb, $sitepress, $this, $option); return $option->pre_update_option_settings_filter($old_value, $value); }