Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wpct ERP Forms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
codeccoop
WordPress
plugins
Wpct ERP Forms
Commits
97e001e0
Commit
97e001e0
authored
8 months ago
by
Lucas García
Browse files
Options
Downloads
Patches
Plain Diff
feat: settings rest api schemas
parent
104359b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Git submodules
Pipeline
#128591
failed
8 months ago
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
assets/.gitkept
+0
-0
0 additions, 0 deletions
assets/.gitkept
includes/class-settings.php
+32
-8
32 additions, 8 deletions
includes/class-settings.php
wpct-http-bridge
+1
-1
1 addition, 1 deletion
wpct-http-bridge
wpct-i18n
+1
-1
1 addition, 1 deletion
wpct-i18n
with
34 additions
and
10 deletions
assets/.gitkept
0 → 100644
+
0
−
0
View file @
97e001e0
This diff is collapsed.
Click to expand it.
includes/class-settings.php
+
32
−
8
View file @
97e001e0
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
wpct-http-bridge
@
427059d1
Compare
7cd7cea6
...
427059d1
Subproject commit
7cd7cea6a7180dc90809ef7d91a40cfdb2e42c4f
Subproject commit
427059d1c82c9506b9471f63c1c5700be7ceb653
This diff is collapsed.
Click to expand it.
wpct-i18n
@
b4cfb8c2
Compare
a3b5e7e8
...
b4cfb8c2
Subproject commit
a3b5e7e89f1182d0517193c868b9c1018c8321bd
Subproject commit
b4cfb8c2641380f160f5f147f5b6167a4d2fcba3
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment