403Webshell
Server IP : 3.93.235.159  /  Your IP : 216.73.216.140
Web Server : Apache
System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64
User : bitnami ( 1000)
PHP Version : 8.2.9
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/site-mailer/assets/js/globals/hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/site-mailer/assets/js/globals/hooks/use-storage.js
import { store as coreDataStore } from '@wordpress/core-data';
import { dispatch, useSelect } from '@wordpress/data';

const useStorage = () => {
	const save = async ( data ) => {
		return await dispatch( coreDataStore ).saveEntityRecord( 'root', 'site', data );
	};

	// Fetch site data with useSelect and check resolution status
	const get = useSelect(
		( select ) => {
			return {
				data: select( coreDataStore ).getEntityRecord( 'root', 'site' ),
				hasFinishedResolution: select( coreDataStore ).hasFinishedResolution( 'getEntityRecord', [ 'root', 'site' ] ),
			};
		},
		[],
	);

	return {
		save,
		get,
	};
};

export default useStorage;

Youez - 2016 - github.com/yon3zu
LinuXploit