X7ROOT File Manager
Current Path:
/home/okeydcqc/.trash/wp-content/plugins/extendify/src/Shared/api
home
/
okeydcqc
/
.trash
/
wp-content
/
plugins
/
extendify
/
src
/
Shared
/
api
/
ðŸ“
..
📄
DataApi.js
(470 B)
ðŸ“
__tests__
📄
wp.js
(914 B)
Editing: DataApi.js
import apiFetch from '@wordpress/api-fetch'; export const pingServer = async () => await apiFetch({ path: '/extendify/v1/shared/ping' }); export const getPartnerPlugins = async (key) => { const plugins = await apiFetch({ path: '/extendify/v1/shared/partner-plugins', }); if (!Object.keys(plugins?.data ?? {}).length) { throw new Error('Could not get plugins'); } if (key && plugins.data[key].length) { return plugins.data[key]; } return plugins.data; };
Upload File
Create Folder