X7ROOT File Manager
Current Path:
/home/okeydcqc/.trash/wp-content/plugins/extendify/src/PageCreator/state
home
/
okeydcqc
/
.trash
/
wp-content
/
plugins
/
extendify
/
src
/
PageCreator
/
state
/
ðŸ“
..
📄
cache.js
(387 B)
📄
global.js
(466 B)
📄
pages.js
(1.52 KB)
📄
plugins-cache.js
(666 B)
📄
user.js
(943 B)
Editing: plugins-cache.js
import apiFetch from '@wordpress/api-fetch'; import { create } from 'zustand'; import { persist } from 'zustand/middleware'; export const useInstalledPluginsCache = create( persist( (set) => ({ installedPlugins: window.extSharedData?.activePlugins?.map( (plugin) => plugin.split('/')[0], ), updateInstalledPlugins: async () => { const installedPlugins = ( await apiFetch({ path: '/wp/v2/plugins', method: 'GET', }) )?.map((plugin) => plugin.plugin.split('/')[0]); set({ installedPlugins }); }, }), { name: `extendify-page-creator-page-installed-plugins-cache-${window.extSharedData.siteId}`, }, ), );
Upload File
Create Folder