uawdijnntqw1x1x1
IP : 18.224.215.88
Hostname : c17w.hoster.ru
Kernel : Linux c17w.hoster.ru 3.10.0 #1 SMP Tue Jan 25 12:49:12 MSK 2022 x86_64
Disable Function : dl,shell_exec,exec,system,passthru,popen,proc_open,proc_nice,proc_get_status,proc_close,proc_terminate,posix_mkfifo,chown,chgrp,show_source,opcache_reset,opcache_get_configuration,opcache_get_status
OS : Linux
PATH:
/
home
/
srv221441
/
kso-don.ru
/
wp-content
/
plugins
/
presto-player
/
inc
/
..
/
dist
/
..
/
.
/
src
/
.
/
hooks
/
useSave.js
/
/
import { __ } from "@wordpress/i18n"; import { select, useDispatch } from "@wordpress/data"; import { store as coreStore } from "@wordpress/core-data"; export default function useSave() { const { saveEditedEntityRecord } = useDispatch(coreStore); /** * Handle the form submission */ const save = async () => { // build up pending records to save. const dirtyRecords = select( coreStore ).__experimentalGetDirtyEntityRecords(); const pendingSavedRecords = []; dirtyRecords.forEach(({ kind, name, key }) => { pendingSavedRecords.push( saveEditedEntityRecord(kind, name, key, { throwOnError: true, }) ); }); // check values. const values = await Promise.all(pendingSavedRecords); if (values.some((value) => typeof value === "undefined")) { throw { message: "Saving failed." }; } return true; }; return { save, }; }
/home/srv221441/kso-don.ru/wp-content/plugins/presto-player/inc/../dist/.././src/./hooks/useSave.js