public function put_forms_properties($property_values, $form_id) { $this->authorize("gravityforms_edit_forms"); foreach ($property_values as $key => $property_value) { $result = GFAPI::update_form_property($form_id, $key, $property_value); if (is_wp_error($result)) { break; } } if (is_wp_error($result)) { $response = $this->get_error_response($result); $status = $this->get_error_status($result); } else { $status = 200; $response = __("Success", "gravityforms"); } $this->end($status, $response); }
public function put_forms_properties($property_values, $form_id) { $this->log_debug(__METHOD__ . '(): Running.'); $capability = apply_filters('gform_web_api_capability_put_forms_properties', 'gravityforms_edit_forms'); $this->authorize($capability); foreach ($property_values as $key => $property_value) { $result = GFAPI::update_form_property($form_id, $key, $property_value); if (is_wp_error($result)) { break; } } if (is_wp_error($result)) { $response = $this->get_error_response($result); $status = $this->get_error_status($result); } else { $status = 200; $response = __('Success', 'gravityforms'); } $this->end($status, $response); }