PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / js / components / ManageMenu / BlueprintsDemo / callouts.ts

callouts.ts in Code Snippets 4.0.0-beta.2, at js/components/ManageMenu/BlueprintsDemo/callouts.ts

39 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n'
2 import type { CalloutContent } from '../../common/demo/DemoCallout'
3 import type { DemoStage } from './types'
4
5 /**
6 * What the walkthrough is doing at each stage, shown alongside the form so the
7 * visitor can follow the reasoning rather than just watching fields appear.
8 */
9 const CALLOUTS: Partial<Record<DemoStage, CalloutContent>> = {
10 general: {
11 step: __('Step 1 of 3', 'code-snippets'),
12 title: __('Name the shortcode', 'code-snippets'),
13 body: __('Every blueprint starts with the basics — the tag you type into a post, and the function that powers it.', 'code-snippets')
14 },
15 attributes: {
16 step: __('Step 2 of 3', 'code-snippets'),
17 title: __('Add the attributes', 'code-snippets'),
18 body: __('Attributes become the values you pass in, like [staff_profile name="Jane Doe"], each with a fallback default.', 'code-snippets')
19 },
20 output: {
21 step: __('Step 3 of 3', 'code-snippets'),
22 title: __('Decide what it renders', 'code-snippets'),
23 body: __('This is the PHP that runs whenever the shortcode appears. The blueprint wraps it in everything else it needs.', 'code-snippets')
24 },
25 generating: {
26 step: __('Generating', 'code-snippets'),
27 title: __('Building the snippet', 'code-snippets'),
28 body: __('Pro turns the whole form into a finished, working snippet — no boilerplate to write yourself.', 'code-snippets')
29 },
30 generated: {
31 step: __('Done', 'code-snippets'),
32 title: __('Your snippet is ready', 'code-snippets'),
33 body: __('In Pro the finished PHP appears here, ready to review and save to your site.', 'code-snippets')
34 }
35 }
36
37 export const getCallout = (stage: DemoStage): CalloutContent | undefined =>
38 CALLOUTS[stage]
39