public static function GfTitleUpdatePreset() { $fields = array('id', 'font', 'title_color', 'title_size', 'title_bold', 'title_italic', 'title_underline', 'title_shadow_vertical', 'title_shadow_horizontal', 'title_shadow_blur', 'title_shadow_color', 'title_name', 'is_default'); $values = array(); foreach ($fields as $field) { $values[$field] = isset($_POST[$field]) ? $_POST[$field] : null; } GFontsDB::UpdateTitlePreset($values); $response = array('result' => 0, 'message' => ''); echo json_encode($response); die; }