PluginProbe
Extendify / 3.1.4
Extendify v3.1.4
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / src / Agent / lib / wp.js

wp.js in Extendify 3.1.4, at src/Agent/lib/wp.js

18 lines 420 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import apiFetch from '@wordpress/api-fetch';
2
3 export const updateOption = async (option, value) => {
4 await apiFetch({
5 path: '/extendify/v1/agent/options',
6 method: 'post',
7 data: { option, value },
8 });
9 };
10
11 export const getOption = (option) => {
12 const params = new URLSearchParams({ option: String(option) });
13 return apiFetch({
14 path: `/extendify/v1/agent/options?${params.toString()}`,
15 method: 'GET',
16 });
17 };
18