diff --git a/assets/.gitkept b/assets/.gitkept new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/includes/class-settings.php b/includes/class-settings.php index 9067be7c58f646fb952c8893423ad0925a2dc6c8..17cb1e7feebfbdb24cf5265516afc2e2b09984f0 100644 --- a/includes/class-settings.php +++ b/includes/class-settings.php @@ -20,20 +20,44 @@ class Settings extends BaseSettings { $setting_name = $this->group_name . '_general'; $this->register_setting($setting_name, [ + 'notification_receiver' => [ + 'type' => 'string' + ], + ], [ 'notification_receiver' => 'admin@' . parse_url(get_bloginfo('url'))['host'], - 'api_protocol' => 'JSON-RPC', ]); $setting_name = $this->group_name . '_api'; - $this->register_setting($setting_name, [ - 'endpoints' => [ - [ - 'endpoint' => null, - 'form_id' => null, - 'ref' => null + $this->register_setting( + $setting_name, + [ + 'protocol' => [ + 'type' => 'string', + 'enum' => [ + 'JSON-RPC', + 'JSON-REST' + ] + ], + 'endpoints' => [ + 'type' => 'array', + 'items' => [ + 'form_id' => 'number', + 'endpoint' => 'string', + 'ref' => 'string', + ] + ] + ], + [ + 'protocol' => 'JSON-RPC', + 'endpoints' => [ + [ + 'endpoint' => '/wp-json/wp/v2', + 'form_id' => 0, + 'ref' => '' + ] ] ] - ]); + ); } protected function input_render($setting, $field, $value) diff --git a/wpct-http-bridge b/wpct-http-bridge index 7cd7cea6a7180dc90809ef7d91a40cfdb2e42c4f..427059d1c82c9506b9471f63c1c5700be7ceb653 160000 --- a/wpct-http-bridge +++ b/wpct-http-bridge @@ -1 +1 @@ -Subproject commit 7cd7cea6a7180dc90809ef7d91a40cfdb2e42c4f +Subproject commit 427059d1c82c9506b9471f63c1c5700be7ceb653 diff --git a/wpct-i18n b/wpct-i18n index a3b5e7e89f1182d0517193c868b9c1018c8321bd..b4cfb8c2641380f160f5f147f5b6167a4d2fcba3 160000 --- a/wpct-i18n +++ b/wpct-i18n @@ -1 +1 @@ -Subproject commit a3b5e7e89f1182d0517193c868b9c1018c8321bd +Subproject commit b4cfb8c2641380f160f5f147f5b6167a4d2fcba3