function save(Resume_Field $field) { $name = $field->get_name(); $autoload = $field->get_autoload() ? 'yes' : 'no'; // Add value to the cache, so that add_option always works $notoptions = wp_cache_get('notoptions', 'options'); $notoptions[$name] = ''; wp_cache_set('notoptions', $notoptions, 'options'); if (!add_option($name, $field->get_value(), null, $autoload)) { update_option($name, $field->get_value()); } }