PluginProbe
Extendify / 3.2.0
Extendify v3.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 3.2.0, at src/Agent/workflows/theme/change-theme-fonts-variation.js

42 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { Redirect } from '@agent/workflows/theme/components/Redirect';
2 import { SelectThemeFontsVariation } from '@agent/workflows/theme/components/SelectThemeFontsVariation';
3 import { __ } from '@wordpress/i18n';
4 import { typography } from '@wordpress/icons';
5
6 const { context, abilities } = window.extAgentData;
7
8 export default {
9 available: () => abilities?.canEditThemes && context?.hasThemeVariations,
10 needsRedirect: () => !Number(context?.postId || 0),
11 redirectComponent: () =>
12 Redirect(
13 __(
14 'It looks like you are trying to change your theme fonts, but you are not on a page where we can do that.',
15 'extendify-local',
16 ),
17 ),
18 id: 'change-theme-fonts-variation',
19 whenFinished: {
20 component: SelectThemeFontsVariation,
21 },
22 example: {
23 // translators: "theme fonts" refers to the font variation for the current theme.
24 text: __('Change website fonts', 'extendify-local'),
25 agentResponse: {
26 // translators: This message show above a UI where the user can select a different font variation for their theme.
27 reply: __(
28 'Below you can select a different font variation for your theme.',
29 'extendify-local',
30 ),
31 whenFinishedTool: {
32 id: 'update-theme-fonts-variation',
33 labels: {
34 confirm: __('Updated the theme fonts', 'extendify-local'),
35 cancel: __('Canceled the theme fonts update', 'extendify-local'),
36 },
37 },
38 },
39 },
40 icon: typography,
41 };
42