mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-21 08:52:46 +08:00
12 lines
283 B
JavaScript
12 lines
283 B
JavaScript
import { store as coreDataStore } from '@wordpress/core-data';
|
|
import { dispatch } from '@wordpress/data';
|
|
|
|
export const useStorage = () => {
|
|
const save = async (data) => {
|
|
return await dispatch(coreDataStore).saveEntityRecord('root', 'site', data);
|
|
};
|
|
|
|
return {
|
|
save,
|
|
};
|
|
};
|