Expost json api endpoint

[PREMIUM-213]
This commit is contained in:
David Remer
2022-12-12 09:11:13 +02:00
committed by Aschepikov
parent 5b93b88f46
commit 1fcdccaa33
2 changed files with 4 additions and 0 deletions

View File

@@ -89,6 +89,9 @@ class AutomationEditor {
'root' => rtrim($this->wp->escUrlRaw($this->wp->restUrl()), '/'),
'nonce' => $this->wp->wpCreateNonce('wp_rest'),
],
'jsonapi' => [
'root' => rtrim($this->wp->escUrlRaw(admin_url('admin-ajax.php')), '/'),
],
'user_roles' => $roles->get_names(),
'segments' => $segments,
]);