PluginProbe
Extendify / 2.2.0
Extendify v2.2.0
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / Agent / workflows / theme / change-theme-fonts-variation.js

change-theme-fonts-variation.js in Extendify 2.2.0, at src/Agent/workflows/theme/change-theme-fonts-variation.js

22 lines 761 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2 import { RedirectFontsVariations } from '@agent/workflows/theme/components/RedirectFontsVariations';
3 import { SelectThemeFontsVariation } from '@agent/workflows/theme/components/SelectThemeFontsVariation';
4
5 const { context, abilities } = window.extAgentData;
6
7 export default {
8 available: () => abilities?.canEditThemes && context?.hasThemeVariations,
9 needsRedirect: () => !Number(context?.postId || 0),
10 redirectComponent: () =>
11 RedirectFontsVariations(
12 __(
13 'Hey there! It looks like you are trying to change your theme fonts, but you are not on a page where we can do that.',
14 'extendify-local',
15 ),
16 ),
17 id: 'change-theme-fonts-variation',
18 whenFinished: {
19 component: SelectThemeFontsVariation,
20 },
21 };
22