nextpress-core 1.0.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/install.js +27 -0
- package/{dist/acf-functions/core/acf-builder.js → lib/acf-functions/core/acf-builder.ts} +45 -17
- package/{dist/acf-functions/core/acf-component-autoloader.js → lib/acf-functions/core/acf-component-autoloader.ts} +13 -7
- package/{dist/acf-functions/core/acf-field-group-autoloader.js → lib/acf-functions/core/acf-field-group-autoloader.ts} +11 -5
- package/{dist/acf-functions/services/define-field-group.d.ts → lib/acf-functions/services/define-field-group.ts} +4 -1
- package/{dist/acf-functions/services/define-layout.d.ts → lib/acf-functions/services/define-layout.ts} +4 -1
- package/lib/acf-functions/services/map-fields/helpers/map-choice-object.ts +20 -0
- package/{dist/acf-functions/services/map-fields/map-fields.js → lib/acf-functions/services/map-fields/map-fields.ts} +128 -89
- package/{dist/acf-functions/types/acf-field-group.d.ts → lib/acf-functions/types/acf-field-group.ts} +49 -28
- package/lib/acf-functions/types/acf-field.ts +2853 -0
- package/lib/acf-functions/types/acf-layout.ts +22 -0
- package/lib/acf-functions/types/components/field-props.ts +189 -0
- package/{dist/acf-functions/types/components/nextpress-component.d.ts → lib/acf-functions/types/components/nextpress-component.ts} +4 -3
- package/lib/ambient.d.ts +16 -0
- package/{dist/entities/common.d.ts → lib/entities/common.ts} +6 -4
- package/{dist/entities/option/option.interface.d.ts → lib/entities/option/option.interface.ts} +3 -3
- package/{dist/entities/option/option.js → lib/entities/option/option.ts} +21 -14
- package/{dist/entities/post/post.interface.d.ts → lib/entities/post/post.interface.ts} +26 -21
- package/lib/entities/post/post.ts +209 -0
- package/{dist/entities/term/term.interface.d.ts → lib/entities/term/term.interface.ts} +3 -3
- package/lib/entities/term/term.ts +82 -0
- package/{dist/entities/user/user.interface.d.ts → lib/entities/user/user.interface.ts} +2 -1
- package/lib/entities/user/user.ts +86 -0
- package/{dist/globals/entity-loader/entity-loader-base.js → lib/globals/entity-loader/entity-loader-base.ts} +64 -10
- package/{dist/globals/entity-loader/entity-loader.interface.d.ts → lib/globals/entity-loader/entity-loader.ts} +2 -4
- package/lib/globals/entity-loader/option-loader.ts +56 -0
- package/lib/globals/entity-loader/post-loader.ts +60 -0
- package/lib/globals/entity-loader/term-loader.ts +60 -0
- package/lib/globals/entity-loader/user-loader.ts +61 -0
- package/lib/globals/get-field/get-field.ts +76 -0
- package/{dist/globals/globals.js → lib/globals/globals.ts} +8 -3
- package/{dist/globals/nextpress-config/nextpress-config.interface.d.ts → lib/globals/nextpress-config/nextpress-config.interface.ts} +10 -6
- package/lib/globals/nextpress-config/nextpress-config.ts +8 -0
- package/lib/globals/queried-object/queried-object.ts +124 -0
- package/{dist/repository/optionquery/option-query-args.d.ts → lib/repository/optionquery/option-query-args.ts} +5 -2
- package/lib/repository/optionquery/option-query.ts +29 -0
- package/{dist/repository/postquery/post-query-args.d.ts → lib/repository/postquery/post-query-args.ts} +10 -6
- package/lib/repository/postquery/post-query.ts +282 -0
- package/{dist/repository/termquery/term-query-args.d.ts → lib/repository/termquery/term-query-args.ts} +16 -6
- package/lib/repository/termquery/term-query.ts +244 -0
- package/{dist/repository/userquery/user-query-args.d.ts → lib/repository/userquery/user-query-args.ts} +19 -7
- package/{dist/repository/userquery/user-query.js → lib/repository/userquery/user-query.ts} +93 -76
- package/{dist/router/helpers.js → lib/router/helpers.ts} +4 -4
- package/{dist/router/nextpress-layout.js → lib/router/nextpress-layout.tsx} +28 -9
- package/{dist/router/routes/not-found-page.js → lib/router/nextpress-not-found-route.tsx} +7 -5
- package/{dist/router/nextpress-proxy.js → lib/router/nextpress-proxy.ts} +15 -3
- package/{dist/router/nextpress-static-params.js → lib/router/nextpress-static-params.ts} +17 -5
- package/{dist/router/router.js → lib/router/router.tsx} +29 -22
- package/{dist/router/routes/api/api-get-admin-bar.js → lib/router/routes/api/api-get-admin-bar.ts} +8 -6
- package/{dist/router/routes/api/api-get-draft-mode.js → lib/router/routes/api/api-get-draft-mode.ts} +15 -6
- package/{dist/router/routes/api/api-get-field-groups.js → lib/router/routes/api/api-get-field-groups.ts} +13 -8
- package/{dist/router/routes/api/api-post-revalidate.js → lib/router/routes/api/api-post-revalidate.ts} +6 -4
- package/{dist/router/routes/api/helpers.js → lib/router/routes/api/helpers.ts} +4 -3
- package/lib/router/routes/author-archive.tsx +75 -0
- package/lib/router/routes/post-index-page.tsx +58 -0
- package/lib/router/routes/singular-page.tsx +78 -0
- package/lib/router/routes/site-front-page.tsx +51 -0
- package/lib/router/routes/term-archive.tsx +93 -0
- package/{dist/router/types.d.ts → lib/router/types.ts} +4 -2
- package/{dist/services/get-menu.js → lib/services/get-menu.ts} +56 -32
- package/{dist/services/get-theme-mods.js → lib/services/get-theme-mods.ts} +6 -4
- package/{dist/services/metadata/get-blogname.js → lib/services/metadata/get-blogname.ts} +2 -2
- package/{dist/services/metadata/get-favicon-url.js → lib/services/metadata/get-favicon-url.ts} +5 -4
- package/{dist/services/metadata/get-language-attribute.js → lib/services/metadata/get-language-attribute.ts} +1 -1
- package/{dist/services/utilities/capitalise-first-letter.js → lib/services/utilities/capitalise-first-letter.ts} +2 -3
- package/{dist/services/utilities/esc-html.js → lib/services/utilities/esc-html.ts} +3 -1
- package/{dist/services/utilities/get-date-time-formatter.js → lib/services/utilities/get-date-time-formatter.ts} +16 -6
- package/{dist/services/utilities/kses-post.js → lib/services/utilities/kses-post.ts} +2 -1
- package/{dist/services/utilities/process-url.js → lib/services/utilities/process-url.ts} +4 -3
- package/{dist/template-heirarchy/_autoloader/template-autoloader.js → lib/template-heirarchy/_autoloader/template-autoloader.ts} +18 -9
- package/{dist/template-heirarchy/archive/archive.js → lib/template-heirarchy/archive/archive.tsx} +10 -7
- package/{dist/template-heirarchy/archive/author.js → lib/template-heirarchy/archive/author.tsx} +10 -7
- package/{dist/template-heirarchy/archive/category.js → lib/template-heirarchy/archive/category.tsx} +11 -7
- package/{dist/template-heirarchy/archive/posttypearchive.js → lib/template-heirarchy/archive/posttypearchive.tsx} +11 -8
- package/{dist/template-heirarchy/archive/tag.js → lib/template-heirarchy/archive/tag.tsx} +12 -7
- package/{dist/template-heirarchy/archive/taxonomy.js → lib/template-heirarchy/archive/taxonomy.tsx} +10 -7
- package/{dist/template-heirarchy/home/home.js → lib/template-heirarchy/home/home.tsx} +10 -7
- package/{dist/template-heirarchy/index.js → lib/template-heirarchy/index.tsx} +9 -5
- package/{dist/template-heirarchy/not-found.tsx/not-found.js → lib/template-heirarchy/not-found.tsx/not-found.tsx} +10 -7
- package/{dist/template-heirarchy/page/page.js → lib/template-heirarchy/page/page.tsx} +10 -7
- package/{dist/template-heirarchy/page/posttype.js → lib/template-heirarchy/page/posttype.tsx} +12 -8
- package/{dist/template-heirarchy/page/single.js → lib/template-heirarchy/page/single.tsx} +10 -7
- package/{dist/template-heirarchy/page/singular.js → lib/template-heirarchy/page/singular.tsx} +10 -7
- package/lib/ui/render-attachment-image.tsx +28 -0
- package/lib/ui/render-components.tsx +12 -0
- package/lib/ui/render-the-admin-bar.tsx +79 -0
- package/lib/ui/render-the-logo.tsx +24 -0
- package/{dist/wpdb/wpdb.interface.d.ts → lib/wpdb/wpdb.interface.ts} +20 -1
- package/{dist/wpdb/wpdb.js → lib/wpdb/wpdb.ts} +9 -5
- package/package.json +8 -15
- package/dist/acf-functions/core/acf-builder.d.ts +0 -51
- package/dist/acf-functions/core/acf-component-autoloader.d.ts +0 -11
- package/dist/acf-functions/core/acf-field-group-autoloader.d.ts +0 -10
- package/dist/acf-functions/field-props.d.ts +0 -196
- package/dist/acf-functions/field-props.js +0 -1
- package/dist/acf-functions/services/define-field-group.js +0 -10
- package/dist/acf-functions/services/define-layout.js +0 -10
- package/dist/acf-functions/services/map-fields/helpers/map-choice-object.d.ts +0 -2
- package/dist/acf-functions/services/map-fields/helpers/map-choice-object.js +0 -18
- package/dist/acf-functions/services/map-fields/map-fields.d.ts +0 -21
- package/dist/acf-functions/types/acf-field-group.js +0 -1
- package/dist/acf-functions/types/acf-field.d.ts +0 -2813
- package/dist/acf-functions/types/acf-field.js +0 -1
- package/dist/acf-functions/types/acf-layout.d.ts +0 -19
- package/dist/acf-functions/types/acf-layout.js +0 -1
- package/dist/acf-functions/types/acf-values.js +0 -1
- package/dist/acf-functions/types/components/field-props.d.ts +0 -196
- package/dist/acf-functions/types/components/field-props.js +0 -1
- package/dist/acf-functions/types/components/nextpress-component.js +0 -1
- package/dist/entities/common.js +0 -1
- package/dist/entities/option/option.d.ts +0 -19
- package/dist/entities/option/option.interface.js +0 -2
- package/dist/entities/post/post.d.ts +0 -50
- package/dist/entities/post/post.interface.js +0 -2
- package/dist/entities/post/post.js +0 -184
- package/dist/entities/term/term.d.ts +0 -28
- package/dist/entities/term/term.interface.js +0 -1
- package/dist/entities/term/term.js +0 -67
- package/dist/entities/user/user.d.ts +0 -27
- package/dist/entities/user/user.interface.js +0 -1
- package/dist/entities/user/user.js +0 -74
- package/dist/globals/entity-loader/entity-loader-base.d.ts +0 -65
- package/dist/globals/entity-loader/entity-loader.interface.js +0 -1
- package/dist/globals/entity-loader/option-loader.d.ts +0 -15
- package/dist/globals/entity-loader/option-loader.js +0 -31
- package/dist/globals/entity-loader/post-loader.d.ts +0 -21
- package/dist/globals/entity-loader/post-loader.js +0 -28
- package/dist/globals/entity-loader/term-loader.d.ts +0 -21
- package/dist/globals/entity-loader/term-loader.js +0 -28
- package/dist/globals/entity-loader/user-loader.d.ts +0 -21
- package/dist/globals/entity-loader/user-loader.js +0 -28
- package/dist/globals/get-field/get-field.d.ts +0 -18
- package/dist/globals/get-field/get-field.js +0 -44
- package/dist/globals/globals.d.ts +0 -18
- package/dist/globals/nextpress-config/nextpress-config.d.ts +0 -4
- package/dist/globals/nextpress-config/nextpress-config.interface.js +0 -1
- package/dist/globals/nextpress-config/nextpress-config.js +0 -2
- package/dist/globals/queried-object/queried-object.d.ts +0 -62
- package/dist/globals/queried-object/queried-object.js +0 -56
- package/dist/repository/optionquery/option-query-args.js +0 -1
- package/dist/repository/optionquery/option-query.d.ts +0 -12
- package/dist/repository/optionquery/option-query.js +0 -20
- package/dist/repository/postquery/post-query-args.js +0 -1
- package/dist/repository/postquery/post-query.d.ts +0 -12
- package/dist/repository/postquery/post-query.js +0 -272
- package/dist/repository/termquery/term-query-args.js +0 -1
- package/dist/repository/termquery/term-query.d.ts +0 -11
- package/dist/repository/termquery/term-query.js +0 -213
- package/dist/repository/userquery/user-query-args.js +0 -1
- package/dist/repository/userquery/user-query.d.ts +0 -12
- package/dist/router/helpers.d.ts +0 -14
- package/dist/router/nextpress-layout.d.ts +0 -11
- package/dist/router/nextpress-proxy.d.ts +0 -8
- package/dist/router/nextpress-static-params.d.ts +0 -9
- package/dist/router/router.d.ts +0 -23
- package/dist/router/routes/api/api-get-admin-bar.d.ts +0 -8
- package/dist/router/routes/api/api-get-draft-mode.d.ts +0 -8
- package/dist/router/routes/api/api-get-field-groups.d.ts +0 -7
- package/dist/router/routes/api/api-post-revalidate.d.ts +0 -7
- package/dist/router/routes/api/helpers.d.ts +0 -8
- package/dist/router/routes/author-archive.d.ts +0 -25
- package/dist/router/routes/author-archive.js +0 -49
- package/dist/router/routes/not-found-page.d.ts +0 -15
- package/dist/router/routes/post-index-page.d.ts +0 -25
- package/dist/router/routes/post-index-page.js +0 -33
- package/dist/router/routes/singular-page.d.ts +0 -29
- package/dist/router/routes/singular-page.js +0 -51
- package/dist/router/routes/site-front-page.d.ts +0 -27
- package/dist/router/routes/site-front-page.js +0 -26
- package/dist/router/routes/term-archive.d.ts +0 -29
- package/dist/router/routes/term-archive.js +0 -65
- package/dist/router/types.js +0 -1
- package/dist/services/get-menu.d.ts +0 -13
- package/dist/services/get-theme-mods.d.ts +0 -7
- package/dist/services/metadata/get-blogname.d.ts +0 -6
- package/dist/services/metadata/get-favicon-url.d.ts +0 -6
- package/dist/services/metadata/get-language-attribute.d.ts +0 -6
- package/dist/services/services.d.ts +0 -3
- package/dist/services/services.js +0 -3
- package/dist/services/utilities/capitalise-first-letter.d.ts +0 -7
- package/dist/services/utilities/esc-html.d.ts +0 -7
- package/dist/services/utilities/get-date-time-formatter.d.ts +0 -6
- package/dist/services/utilities/index.d.ts +0 -0
- package/dist/services/utilities/index.js +0 -1
- package/dist/services/utilities/kses-post.d.ts +0 -7
- package/dist/services/utilities/process-url.d.ts +0 -7
- package/dist/template-heirarchy/_autoloader/template-autoloader.d.ts +0 -9
- package/dist/template-heirarchy/archive/archive.d.ts +0 -16
- package/dist/template-heirarchy/archive/author.d.ts +0 -16
- package/dist/template-heirarchy/archive/category.d.ts +0 -16
- package/dist/template-heirarchy/archive/posttypearchive.d.ts +0 -24
- package/dist/template-heirarchy/archive/tag.d.ts +0 -16
- package/dist/template-heirarchy/archive/taxonomy.d.ts +0 -16
- package/dist/template-heirarchy/home/home.d.ts +0 -16
- package/dist/template-heirarchy/index.d.ts +0 -17
- package/dist/template-heirarchy/not-found.tsx/not-found.d.ts +0 -16
- package/dist/template-heirarchy/page/page.d.ts +0 -16
- package/dist/template-heirarchy/page/posttype.d.ts +0 -24
- package/dist/template-heirarchy/page/single.d.ts +0 -16
- package/dist/template-heirarchy/page/singular.d.ts +0 -16
- package/dist/ui/render-attachment-image.d.ts +0 -12
- package/dist/ui/render-attachment-image.js +0 -24
- package/dist/ui/render-components.d.ts +0 -9
- package/dist/ui/render-components.js +0 -7
- package/dist/ui/render-the-admin-bar.d.ts +0 -8
- package/dist/ui/render-the-admin-bar.js +0 -36
- package/dist/ui/render-the-logo.d.ts +0 -10
- package/dist/ui/render-the-logo.js +0 -16
- package/dist/wpdb/wpdb.d.ts +0 -3
- package/dist/wpdb/wpdb.interface.js +0 -5
- /package/{dist/acf-functions/types/acf-values.d.ts → lib/acf-functions/types/acf-values.ts} +0 -0
|
@@ -0,0 +1,2853 @@
|
|
|
1
|
+
import { NextpressLayout, ACFLayout } from "./acf-layout";
|
|
2
|
+
|
|
3
|
+
type TransformACFField<T> = T extends any
|
|
4
|
+
? Omit<T, 'key' | 'layouts' | 'sub_fields'> & {
|
|
5
|
+
key?: never;
|
|
6
|
+
layouts?: 'layouts' extends keyof T ? NextpressLayout[] : undefined;
|
|
7
|
+
sub_fields?: 'sub_fields' extends keyof T ? NextpressField[] : undefined;
|
|
8
|
+
}
|
|
9
|
+
: never;
|
|
10
|
+
|
|
11
|
+
/** ACF Field without key constraints to allow key generation */
|
|
12
|
+
export type NextpressField = TransformACFField<ACFField>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents a single Advanced Custom Fields (ACF) Field configuration.
|
|
16
|
+
*/
|
|
17
|
+
export type ACFField =
|
|
18
|
+
| {
|
|
19
|
+
/**
|
|
20
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
21
|
+
*/
|
|
22
|
+
key: string
|
|
23
|
+
/**
|
|
24
|
+
* The label displayed for this field
|
|
25
|
+
*/
|
|
26
|
+
label: string
|
|
27
|
+
/**
|
|
28
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
29
|
+
*/
|
|
30
|
+
name: string
|
|
31
|
+
/**
|
|
32
|
+
* Accessible label for screen readers
|
|
33
|
+
*/
|
|
34
|
+
"aria-label"?: string
|
|
35
|
+
/**
|
|
36
|
+
* The type of field
|
|
37
|
+
*/
|
|
38
|
+
type: "color_picker"
|
|
39
|
+
/**
|
|
40
|
+
* Instructions for content editors
|
|
41
|
+
*/
|
|
42
|
+
instructions?: string
|
|
43
|
+
/**
|
|
44
|
+
* Whether the field is required
|
|
45
|
+
*/
|
|
46
|
+
required?: boolean | number
|
|
47
|
+
/**
|
|
48
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
49
|
+
*/
|
|
50
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
51
|
+
/**
|
|
52
|
+
* Wrapper element settings
|
|
53
|
+
*/
|
|
54
|
+
wrapper?: {
|
|
55
|
+
/**
|
|
56
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
57
|
+
*/
|
|
58
|
+
width?: string
|
|
59
|
+
/**
|
|
60
|
+
* CSS class(es) for the field wrapper
|
|
61
|
+
*/
|
|
62
|
+
class?: string
|
|
63
|
+
/**
|
|
64
|
+
* HTML ID for the field wrapper
|
|
65
|
+
*/
|
|
66
|
+
id?: string
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Order of the field within its parent
|
|
70
|
+
*/
|
|
71
|
+
menu_order?: number
|
|
72
|
+
/**
|
|
73
|
+
* Parent field or field group key/ID
|
|
74
|
+
*/
|
|
75
|
+
parent?: string | number
|
|
76
|
+
/**
|
|
77
|
+
* Parent layout key for flexible content sub-fields
|
|
78
|
+
*/
|
|
79
|
+
parent_layout?: string
|
|
80
|
+
default_value?: DefaultValue
|
|
81
|
+
/**
|
|
82
|
+
* Enable alpha/opacity selector for RGBA colors
|
|
83
|
+
*/
|
|
84
|
+
enable_opacity?: boolean | number
|
|
85
|
+
/**
|
|
86
|
+
* Source for custom color palette (empty for default)
|
|
87
|
+
*/
|
|
88
|
+
custom_palette_source?: string
|
|
89
|
+
/**
|
|
90
|
+
* Custom palette colors as comma-separated hex values
|
|
91
|
+
*/
|
|
92
|
+
palette_colors?: string
|
|
93
|
+
/**
|
|
94
|
+
* Display the color wheel picker interface
|
|
95
|
+
*/
|
|
96
|
+
show_color_wheel?: boolean | number
|
|
97
|
+
/**
|
|
98
|
+
* Value returned (hex string or RGBA array)
|
|
99
|
+
*/
|
|
100
|
+
return_format?: "string" | "array"
|
|
101
|
+
}
|
|
102
|
+
| {
|
|
103
|
+
/**
|
|
104
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
105
|
+
*/
|
|
106
|
+
key: string
|
|
107
|
+
/**
|
|
108
|
+
* The label displayed for this field
|
|
109
|
+
*/
|
|
110
|
+
label: string
|
|
111
|
+
/**
|
|
112
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
113
|
+
*/
|
|
114
|
+
name: string
|
|
115
|
+
/**
|
|
116
|
+
* Accessible label for screen readers
|
|
117
|
+
*/
|
|
118
|
+
"aria-label"?: string
|
|
119
|
+
/**
|
|
120
|
+
* The type of field
|
|
121
|
+
*/
|
|
122
|
+
type: "date_picker"
|
|
123
|
+
/**
|
|
124
|
+
* Instructions for content editors
|
|
125
|
+
*/
|
|
126
|
+
instructions?: string
|
|
127
|
+
/**
|
|
128
|
+
* Whether the field is required
|
|
129
|
+
*/
|
|
130
|
+
required?: boolean | number
|
|
131
|
+
/**
|
|
132
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
133
|
+
*/
|
|
134
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
135
|
+
/**
|
|
136
|
+
* Wrapper element settings
|
|
137
|
+
*/
|
|
138
|
+
wrapper?: {
|
|
139
|
+
/**
|
|
140
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
141
|
+
*/
|
|
142
|
+
width?: string
|
|
143
|
+
/**
|
|
144
|
+
* CSS class(es) for the field wrapper
|
|
145
|
+
*/
|
|
146
|
+
class?: string
|
|
147
|
+
/**
|
|
148
|
+
* HTML ID for the field wrapper
|
|
149
|
+
*/
|
|
150
|
+
id?: string
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Order of the field within its parent
|
|
154
|
+
*/
|
|
155
|
+
menu_order?: number
|
|
156
|
+
/**
|
|
157
|
+
* Parent field or field group key/ID
|
|
158
|
+
*/
|
|
159
|
+
parent?: string | number
|
|
160
|
+
/**
|
|
161
|
+
* Parent layout key for flexible content sub-fields
|
|
162
|
+
*/
|
|
163
|
+
parent_layout?: string
|
|
164
|
+
/**
|
|
165
|
+
* Date format shown to user in field UI
|
|
166
|
+
*/
|
|
167
|
+
display_format?: string
|
|
168
|
+
/**
|
|
169
|
+
* Date format returned by get_field()
|
|
170
|
+
*/
|
|
171
|
+
return_format?: string
|
|
172
|
+
first_day?: FirstDay
|
|
173
|
+
default_to_current_date?: DefaultToCurrentDate
|
|
174
|
+
}
|
|
175
|
+
| {
|
|
176
|
+
/**
|
|
177
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
178
|
+
*/
|
|
179
|
+
key: string
|
|
180
|
+
/**
|
|
181
|
+
* The label displayed for this field
|
|
182
|
+
*/
|
|
183
|
+
label: string
|
|
184
|
+
/**
|
|
185
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
186
|
+
*/
|
|
187
|
+
name: string
|
|
188
|
+
/**
|
|
189
|
+
* Accessible label for screen readers
|
|
190
|
+
*/
|
|
191
|
+
"aria-label"?: string
|
|
192
|
+
/**
|
|
193
|
+
* The type of field
|
|
194
|
+
*/
|
|
195
|
+
type: "date_time_picker"
|
|
196
|
+
/**
|
|
197
|
+
* Instructions for content editors
|
|
198
|
+
*/
|
|
199
|
+
instructions?: string
|
|
200
|
+
/**
|
|
201
|
+
* Whether the field is required
|
|
202
|
+
*/
|
|
203
|
+
required?: boolean | number
|
|
204
|
+
/**
|
|
205
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
206
|
+
*/
|
|
207
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
208
|
+
/**
|
|
209
|
+
* Wrapper element settings
|
|
210
|
+
*/
|
|
211
|
+
wrapper?: {
|
|
212
|
+
/**
|
|
213
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
214
|
+
*/
|
|
215
|
+
width?: string
|
|
216
|
+
/**
|
|
217
|
+
* CSS class(es) for the field wrapper
|
|
218
|
+
*/
|
|
219
|
+
class?: string
|
|
220
|
+
/**
|
|
221
|
+
* HTML ID for the field wrapper
|
|
222
|
+
*/
|
|
223
|
+
id?: string
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Order of the field within its parent
|
|
227
|
+
*/
|
|
228
|
+
menu_order?: number
|
|
229
|
+
/**
|
|
230
|
+
* Parent field or field group key/ID
|
|
231
|
+
*/
|
|
232
|
+
parent?: string | number
|
|
233
|
+
/**
|
|
234
|
+
* Parent layout key for flexible content sub-fields
|
|
235
|
+
*/
|
|
236
|
+
parent_layout?: string
|
|
237
|
+
/**
|
|
238
|
+
* Date/time format shown to user in field UI
|
|
239
|
+
*/
|
|
240
|
+
display_format?: string
|
|
241
|
+
/**
|
|
242
|
+
* Date/time format returned by get_field()
|
|
243
|
+
*/
|
|
244
|
+
return_format?: string
|
|
245
|
+
first_day?: FirstDay
|
|
246
|
+
default_to_current_date?: DefaultToCurrentDate
|
|
247
|
+
}
|
|
248
|
+
| {
|
|
249
|
+
/**
|
|
250
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
251
|
+
*/
|
|
252
|
+
key: string
|
|
253
|
+
/**
|
|
254
|
+
* The label displayed for this field
|
|
255
|
+
*/
|
|
256
|
+
label: string
|
|
257
|
+
/**
|
|
258
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
259
|
+
*/
|
|
260
|
+
name: string
|
|
261
|
+
/**
|
|
262
|
+
* Accessible label for screen readers
|
|
263
|
+
*/
|
|
264
|
+
"aria-label"?: string
|
|
265
|
+
/**
|
|
266
|
+
* The type of field
|
|
267
|
+
*/
|
|
268
|
+
type: "google_map"
|
|
269
|
+
/**
|
|
270
|
+
* Instructions for content editors
|
|
271
|
+
*/
|
|
272
|
+
instructions?: string
|
|
273
|
+
/**
|
|
274
|
+
* Whether the field is required
|
|
275
|
+
*/
|
|
276
|
+
required?: boolean | number
|
|
277
|
+
/**
|
|
278
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
279
|
+
*/
|
|
280
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
281
|
+
/**
|
|
282
|
+
* Wrapper element settings
|
|
283
|
+
*/
|
|
284
|
+
wrapper?: {
|
|
285
|
+
/**
|
|
286
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
287
|
+
*/
|
|
288
|
+
width?: string
|
|
289
|
+
/**
|
|
290
|
+
* CSS class(es) for the field wrapper
|
|
291
|
+
*/
|
|
292
|
+
class?: string
|
|
293
|
+
/**
|
|
294
|
+
* HTML ID for the field wrapper
|
|
295
|
+
*/
|
|
296
|
+
id?: string
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Order of the field within its parent
|
|
300
|
+
*/
|
|
301
|
+
menu_order?: number
|
|
302
|
+
/**
|
|
303
|
+
* Parent field or field group key/ID
|
|
304
|
+
*/
|
|
305
|
+
parent?: string | number
|
|
306
|
+
/**
|
|
307
|
+
* Parent layout key for flexible content sub-fields
|
|
308
|
+
*/
|
|
309
|
+
parent_layout?: string
|
|
310
|
+
/**
|
|
311
|
+
* Map height in pixels (empty uses default 400)
|
|
312
|
+
*/
|
|
313
|
+
height?: string
|
|
314
|
+
/**
|
|
315
|
+
* Initial map center latitude (empty uses default)
|
|
316
|
+
*/
|
|
317
|
+
center_lat?: string
|
|
318
|
+
/**
|
|
319
|
+
* Initial map center longitude (empty uses default)
|
|
320
|
+
*/
|
|
321
|
+
center_lng?: string
|
|
322
|
+
/**
|
|
323
|
+
* Initial map zoom level (empty uses default 14)
|
|
324
|
+
*/
|
|
325
|
+
zoom?: string
|
|
326
|
+
}
|
|
327
|
+
| {
|
|
328
|
+
/**
|
|
329
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
330
|
+
*/
|
|
331
|
+
key: string
|
|
332
|
+
/**
|
|
333
|
+
* The label displayed for this field
|
|
334
|
+
*/
|
|
335
|
+
label: string
|
|
336
|
+
/**
|
|
337
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
338
|
+
*/
|
|
339
|
+
name: string
|
|
340
|
+
/**
|
|
341
|
+
* Accessible label for screen readers
|
|
342
|
+
*/
|
|
343
|
+
"aria-label"?: string
|
|
344
|
+
/**
|
|
345
|
+
* The type of field
|
|
346
|
+
*/
|
|
347
|
+
type: "icon_picker"
|
|
348
|
+
/**
|
|
349
|
+
* Instructions for content editors
|
|
350
|
+
*/
|
|
351
|
+
instructions?: string
|
|
352
|
+
/**
|
|
353
|
+
* Whether the field is required
|
|
354
|
+
*/
|
|
355
|
+
required?: boolean | number
|
|
356
|
+
/**
|
|
357
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
358
|
+
*/
|
|
359
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
360
|
+
/**
|
|
361
|
+
* Wrapper element settings
|
|
362
|
+
*/
|
|
363
|
+
wrapper?: {
|
|
364
|
+
/**
|
|
365
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
366
|
+
*/
|
|
367
|
+
width?: string
|
|
368
|
+
/**
|
|
369
|
+
* CSS class(es) for the field wrapper
|
|
370
|
+
*/
|
|
371
|
+
class?: string
|
|
372
|
+
/**
|
|
373
|
+
* HTML ID for the field wrapper
|
|
374
|
+
*/
|
|
375
|
+
id?: string
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Order of the field within its parent
|
|
379
|
+
*/
|
|
380
|
+
menu_order?: number
|
|
381
|
+
/**
|
|
382
|
+
* Parent field or field group key/ID
|
|
383
|
+
*/
|
|
384
|
+
parent?: string | number
|
|
385
|
+
/**
|
|
386
|
+
* Parent layout key for flexible content sub-fields
|
|
387
|
+
*/
|
|
388
|
+
parent_layout?: string
|
|
389
|
+
/**
|
|
390
|
+
* Icon library source (all or specific library)
|
|
391
|
+
*/
|
|
392
|
+
library?: string
|
|
393
|
+
/**
|
|
394
|
+
* Available tabs for icon selection
|
|
395
|
+
*/
|
|
396
|
+
tabs?: unknown[]
|
|
397
|
+
/**
|
|
398
|
+
* Value returned (string or structured data)
|
|
399
|
+
*/
|
|
400
|
+
return_format?: 'string' | 'array'
|
|
401
|
+
/**
|
|
402
|
+
* Default icon value with type and value properties
|
|
403
|
+
*/
|
|
404
|
+
default_value?: {
|
|
405
|
+
/**
|
|
406
|
+
* Icon type (dashicons, media_library, url)
|
|
407
|
+
*/
|
|
408
|
+
type?: string | null
|
|
409
|
+
/**
|
|
410
|
+
* Icon value (icon class, attachment ID, or URL)
|
|
411
|
+
*/
|
|
412
|
+
value?: string | null
|
|
413
|
+
[k: string]: unknown
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
| {
|
|
417
|
+
/**
|
|
418
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
419
|
+
*/
|
|
420
|
+
key: string
|
|
421
|
+
/**
|
|
422
|
+
* The label displayed for this field
|
|
423
|
+
*/
|
|
424
|
+
label: string
|
|
425
|
+
/**
|
|
426
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
427
|
+
*/
|
|
428
|
+
name: string
|
|
429
|
+
/**
|
|
430
|
+
* Accessible label for screen readers
|
|
431
|
+
*/
|
|
432
|
+
"aria-label"?: string
|
|
433
|
+
/**
|
|
434
|
+
* The type of field
|
|
435
|
+
*/
|
|
436
|
+
type: "time_picker"
|
|
437
|
+
/**
|
|
438
|
+
* Instructions for content editors
|
|
439
|
+
*/
|
|
440
|
+
instructions?: string
|
|
441
|
+
/**
|
|
442
|
+
* Whether the field is required
|
|
443
|
+
*/
|
|
444
|
+
required?: boolean | number
|
|
445
|
+
/**
|
|
446
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
447
|
+
*/
|
|
448
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
449
|
+
/**
|
|
450
|
+
* Wrapper element settings
|
|
451
|
+
*/
|
|
452
|
+
wrapper?: {
|
|
453
|
+
/**
|
|
454
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
455
|
+
*/
|
|
456
|
+
width?: string
|
|
457
|
+
/**
|
|
458
|
+
* CSS class(es) for the field wrapper
|
|
459
|
+
*/
|
|
460
|
+
class?: string
|
|
461
|
+
/**
|
|
462
|
+
* HTML ID for the field wrapper
|
|
463
|
+
*/
|
|
464
|
+
id?: string
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Order of the field within its parent
|
|
468
|
+
*/
|
|
469
|
+
menu_order?: number
|
|
470
|
+
/**
|
|
471
|
+
* Parent field or field group key/ID
|
|
472
|
+
*/
|
|
473
|
+
parent?: string | number
|
|
474
|
+
/**
|
|
475
|
+
* Parent layout key for flexible content sub-fields
|
|
476
|
+
*/
|
|
477
|
+
parent_layout?: string
|
|
478
|
+
/**
|
|
479
|
+
* Time format shown to user in field UI
|
|
480
|
+
*/
|
|
481
|
+
display_format?: string
|
|
482
|
+
/**
|
|
483
|
+
* Time format returned by get_field()
|
|
484
|
+
*/
|
|
485
|
+
return_format?: string
|
|
486
|
+
}
|
|
487
|
+
| {
|
|
488
|
+
/**
|
|
489
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
490
|
+
*/
|
|
491
|
+
key: string
|
|
492
|
+
/**
|
|
493
|
+
* The label displayed for this field
|
|
494
|
+
*/
|
|
495
|
+
label: string
|
|
496
|
+
/**
|
|
497
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
498
|
+
*/
|
|
499
|
+
name: string
|
|
500
|
+
/**
|
|
501
|
+
* Accessible label for screen readers
|
|
502
|
+
*/
|
|
503
|
+
"aria-label"?: string
|
|
504
|
+
/**
|
|
505
|
+
* The type of field
|
|
506
|
+
*/
|
|
507
|
+
type: "email"
|
|
508
|
+
/**
|
|
509
|
+
* Instructions for content editors
|
|
510
|
+
*/
|
|
511
|
+
instructions?: string
|
|
512
|
+
/**
|
|
513
|
+
* Whether the field is required
|
|
514
|
+
*/
|
|
515
|
+
required?: boolean | number
|
|
516
|
+
/**
|
|
517
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
518
|
+
*/
|
|
519
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
520
|
+
/**
|
|
521
|
+
* Wrapper element settings
|
|
522
|
+
*/
|
|
523
|
+
wrapper?: {
|
|
524
|
+
/**
|
|
525
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
526
|
+
*/
|
|
527
|
+
width?: string
|
|
528
|
+
/**
|
|
529
|
+
* CSS class(es) for the field wrapper
|
|
530
|
+
*/
|
|
531
|
+
class?: string
|
|
532
|
+
/**
|
|
533
|
+
* HTML ID for the field wrapper
|
|
534
|
+
*/
|
|
535
|
+
id?: string
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Order of the field within its parent
|
|
539
|
+
*/
|
|
540
|
+
menu_order?: number
|
|
541
|
+
/**
|
|
542
|
+
* Parent field or field group key/ID
|
|
543
|
+
*/
|
|
544
|
+
parent?: string | number
|
|
545
|
+
/**
|
|
546
|
+
* Parent layout key for flexible content sub-fields
|
|
547
|
+
*/
|
|
548
|
+
parent_layout?: string
|
|
549
|
+
default_value?: DefaultValue
|
|
550
|
+
placeholder?: Placeholder
|
|
551
|
+
prepend?: Prepend
|
|
552
|
+
append?: Append
|
|
553
|
+
}
|
|
554
|
+
| {
|
|
555
|
+
/**
|
|
556
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
557
|
+
*/
|
|
558
|
+
key: string
|
|
559
|
+
/**
|
|
560
|
+
* The label displayed for this field
|
|
561
|
+
*/
|
|
562
|
+
label: string
|
|
563
|
+
/**
|
|
564
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
565
|
+
*/
|
|
566
|
+
name: string
|
|
567
|
+
/**
|
|
568
|
+
* Accessible label for screen readers
|
|
569
|
+
*/
|
|
570
|
+
"aria-label"?: string
|
|
571
|
+
/**
|
|
572
|
+
* The type of field
|
|
573
|
+
*/
|
|
574
|
+
type: "number"
|
|
575
|
+
/**
|
|
576
|
+
* Instructions for content editors
|
|
577
|
+
*/
|
|
578
|
+
instructions?: string
|
|
579
|
+
/**
|
|
580
|
+
* Whether the field is required
|
|
581
|
+
*/
|
|
582
|
+
required?: boolean | number
|
|
583
|
+
/**
|
|
584
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
585
|
+
*/
|
|
586
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
587
|
+
/**
|
|
588
|
+
* Wrapper element settings
|
|
589
|
+
*/
|
|
590
|
+
wrapper?: {
|
|
591
|
+
/**
|
|
592
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
593
|
+
*/
|
|
594
|
+
width?: string
|
|
595
|
+
/**
|
|
596
|
+
* CSS class(es) for the field wrapper
|
|
597
|
+
*/
|
|
598
|
+
class?: string
|
|
599
|
+
/**
|
|
600
|
+
* HTML ID for the field wrapper
|
|
601
|
+
*/
|
|
602
|
+
id?: string
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Order of the field within its parent
|
|
606
|
+
*/
|
|
607
|
+
menu_order?: number
|
|
608
|
+
/**
|
|
609
|
+
* Parent field or field group key/ID
|
|
610
|
+
*/
|
|
611
|
+
parent?: string | number
|
|
612
|
+
/**
|
|
613
|
+
* Parent layout key for flexible content sub-fields
|
|
614
|
+
*/
|
|
615
|
+
parent_layout?: string
|
|
616
|
+
default_value?: DefaultValueNumeric
|
|
617
|
+
/**
|
|
618
|
+
* Minimum value (empty string for unlimited)
|
|
619
|
+
*/
|
|
620
|
+
min?: number | string
|
|
621
|
+
/**
|
|
622
|
+
* Maximum value (empty string for unlimited)
|
|
623
|
+
*/
|
|
624
|
+
max?: number | string
|
|
625
|
+
/**
|
|
626
|
+
* Step increment (empty string for default, 'any' for no restriction)
|
|
627
|
+
*/
|
|
628
|
+
step?: number | string
|
|
629
|
+
placeholder?: Placeholder
|
|
630
|
+
prepend?: Prepend
|
|
631
|
+
append?: Append
|
|
632
|
+
}
|
|
633
|
+
| {
|
|
634
|
+
/**
|
|
635
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
636
|
+
*/
|
|
637
|
+
key: string
|
|
638
|
+
/**
|
|
639
|
+
* The label displayed for this field
|
|
640
|
+
*/
|
|
641
|
+
label: string
|
|
642
|
+
/**
|
|
643
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
644
|
+
*/
|
|
645
|
+
name: string
|
|
646
|
+
/**
|
|
647
|
+
* Accessible label for screen readers
|
|
648
|
+
*/
|
|
649
|
+
"aria-label"?: string
|
|
650
|
+
/**
|
|
651
|
+
* The type of field
|
|
652
|
+
*/
|
|
653
|
+
type: "password"
|
|
654
|
+
/**
|
|
655
|
+
* Instructions for content editors
|
|
656
|
+
*/
|
|
657
|
+
instructions?: string
|
|
658
|
+
/**
|
|
659
|
+
* Whether the field is required
|
|
660
|
+
*/
|
|
661
|
+
required?: boolean | number
|
|
662
|
+
/**
|
|
663
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
664
|
+
*/
|
|
665
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
666
|
+
/**
|
|
667
|
+
* Wrapper element settings
|
|
668
|
+
*/
|
|
669
|
+
wrapper?: {
|
|
670
|
+
/**
|
|
671
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
672
|
+
*/
|
|
673
|
+
width?: string
|
|
674
|
+
/**
|
|
675
|
+
* CSS class(es) for the field wrapper
|
|
676
|
+
*/
|
|
677
|
+
class?: string
|
|
678
|
+
/**
|
|
679
|
+
* HTML ID for the field wrapper
|
|
680
|
+
*/
|
|
681
|
+
id?: string
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Order of the field within its parent
|
|
685
|
+
*/
|
|
686
|
+
menu_order?: number
|
|
687
|
+
/**
|
|
688
|
+
* Parent field or field group key/ID
|
|
689
|
+
*/
|
|
690
|
+
parent?: string | number
|
|
691
|
+
/**
|
|
692
|
+
* Parent layout key for flexible content sub-fields
|
|
693
|
+
*/
|
|
694
|
+
parent_layout?: string
|
|
695
|
+
placeholder?: Placeholder
|
|
696
|
+
prepend?: Prepend
|
|
697
|
+
append?: Append
|
|
698
|
+
}
|
|
699
|
+
| {
|
|
700
|
+
/**
|
|
701
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
702
|
+
*/
|
|
703
|
+
key: string
|
|
704
|
+
/**
|
|
705
|
+
* The label displayed for this field
|
|
706
|
+
*/
|
|
707
|
+
label: string
|
|
708
|
+
/**
|
|
709
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
710
|
+
*/
|
|
711
|
+
name: string
|
|
712
|
+
/**
|
|
713
|
+
* Accessible label for screen readers
|
|
714
|
+
*/
|
|
715
|
+
"aria-label"?: string
|
|
716
|
+
/**
|
|
717
|
+
* The type of field
|
|
718
|
+
*/
|
|
719
|
+
type: "range"
|
|
720
|
+
/**
|
|
721
|
+
* Instructions for content editors
|
|
722
|
+
*/
|
|
723
|
+
instructions?: string
|
|
724
|
+
/**
|
|
725
|
+
* Whether the field is required
|
|
726
|
+
*/
|
|
727
|
+
required?: boolean | number
|
|
728
|
+
/**
|
|
729
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
730
|
+
*/
|
|
731
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
732
|
+
/**
|
|
733
|
+
* Wrapper element settings
|
|
734
|
+
*/
|
|
735
|
+
wrapper?: {
|
|
736
|
+
/**
|
|
737
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
738
|
+
*/
|
|
739
|
+
width?: string
|
|
740
|
+
/**
|
|
741
|
+
* CSS class(es) for the field wrapper
|
|
742
|
+
*/
|
|
743
|
+
class?: string
|
|
744
|
+
/**
|
|
745
|
+
* HTML ID for the field wrapper
|
|
746
|
+
*/
|
|
747
|
+
id?: string
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Order of the field within its parent
|
|
751
|
+
*/
|
|
752
|
+
menu_order?: number
|
|
753
|
+
/**
|
|
754
|
+
* Parent field or field group key/ID
|
|
755
|
+
*/
|
|
756
|
+
parent?: string | number
|
|
757
|
+
/**
|
|
758
|
+
* Parent layout key for flexible content sub-fields
|
|
759
|
+
*/
|
|
760
|
+
parent_layout?: string
|
|
761
|
+
default_value?: DefaultValueNumeric
|
|
762
|
+
/**
|
|
763
|
+
* Minimum value (empty string for unlimited)
|
|
764
|
+
*/
|
|
765
|
+
min?: number | string
|
|
766
|
+
/**
|
|
767
|
+
* Maximum value (empty string for unlimited)
|
|
768
|
+
*/
|
|
769
|
+
max?: number | string
|
|
770
|
+
/**
|
|
771
|
+
* Step increment (empty string for default, 'any' for no restriction)
|
|
772
|
+
*/
|
|
773
|
+
step?: number | string
|
|
774
|
+
placeholder?: Placeholder
|
|
775
|
+
prepend?: Prepend
|
|
776
|
+
append?: Append
|
|
777
|
+
}
|
|
778
|
+
| {
|
|
779
|
+
/**
|
|
780
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
781
|
+
*/
|
|
782
|
+
key: string
|
|
783
|
+
/**
|
|
784
|
+
* The label displayed for this field
|
|
785
|
+
*/
|
|
786
|
+
label: string
|
|
787
|
+
/**
|
|
788
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
789
|
+
*/
|
|
790
|
+
name: string
|
|
791
|
+
/**
|
|
792
|
+
* Accessible label for screen readers
|
|
793
|
+
*/
|
|
794
|
+
"aria-label"?: string
|
|
795
|
+
/**
|
|
796
|
+
* The type of field
|
|
797
|
+
*/
|
|
798
|
+
type: "text"
|
|
799
|
+
/**
|
|
800
|
+
* Instructions for content editors
|
|
801
|
+
*/
|
|
802
|
+
instructions?: string
|
|
803
|
+
/**
|
|
804
|
+
* Whether the field is required
|
|
805
|
+
*/
|
|
806
|
+
required?: boolean | number
|
|
807
|
+
/**
|
|
808
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
809
|
+
*/
|
|
810
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
811
|
+
/**
|
|
812
|
+
* Wrapper element settings
|
|
813
|
+
*/
|
|
814
|
+
wrapper?: {
|
|
815
|
+
/**
|
|
816
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
817
|
+
*/
|
|
818
|
+
width?: string
|
|
819
|
+
/**
|
|
820
|
+
* CSS class(es) for the field wrapper
|
|
821
|
+
*/
|
|
822
|
+
class?: string
|
|
823
|
+
/**
|
|
824
|
+
* HTML ID for the field wrapper
|
|
825
|
+
*/
|
|
826
|
+
id?: string
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Order of the field within its parent
|
|
830
|
+
*/
|
|
831
|
+
menu_order?: number
|
|
832
|
+
/**
|
|
833
|
+
* Parent field or field group key/ID
|
|
834
|
+
*/
|
|
835
|
+
parent?: string | number
|
|
836
|
+
/**
|
|
837
|
+
* Parent layout key for flexible content sub-fields
|
|
838
|
+
*/
|
|
839
|
+
parent_layout?: string
|
|
840
|
+
default_value?: DefaultValue
|
|
841
|
+
maxlength?: Maxlength
|
|
842
|
+
placeholder?: Placeholder
|
|
843
|
+
prepend?: Prepend
|
|
844
|
+
append?: Append
|
|
845
|
+
}
|
|
846
|
+
| {
|
|
847
|
+
/**
|
|
848
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
849
|
+
*/
|
|
850
|
+
key: string
|
|
851
|
+
/**
|
|
852
|
+
* The label displayed for this field
|
|
853
|
+
*/
|
|
854
|
+
label: string
|
|
855
|
+
/**
|
|
856
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
857
|
+
*/
|
|
858
|
+
name: string
|
|
859
|
+
/**
|
|
860
|
+
* Accessible label for screen readers
|
|
861
|
+
*/
|
|
862
|
+
"aria-label"?: string
|
|
863
|
+
/**
|
|
864
|
+
* The type of field
|
|
865
|
+
*/
|
|
866
|
+
type: "textarea"
|
|
867
|
+
/**
|
|
868
|
+
* Instructions for content editors
|
|
869
|
+
*/
|
|
870
|
+
instructions?: string
|
|
871
|
+
/**
|
|
872
|
+
* Whether the field is required
|
|
873
|
+
*/
|
|
874
|
+
required?: boolean | number
|
|
875
|
+
/**
|
|
876
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
877
|
+
*/
|
|
878
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
879
|
+
/**
|
|
880
|
+
* Wrapper element settings
|
|
881
|
+
*/
|
|
882
|
+
wrapper?: {
|
|
883
|
+
/**
|
|
884
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
885
|
+
*/
|
|
886
|
+
width?: string
|
|
887
|
+
/**
|
|
888
|
+
* CSS class(es) for the field wrapper
|
|
889
|
+
*/
|
|
890
|
+
class?: string
|
|
891
|
+
/**
|
|
892
|
+
* HTML ID for the field wrapper
|
|
893
|
+
*/
|
|
894
|
+
id?: string
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Order of the field within its parent
|
|
898
|
+
*/
|
|
899
|
+
menu_order?: number
|
|
900
|
+
/**
|
|
901
|
+
* Parent field or field group key/ID
|
|
902
|
+
*/
|
|
903
|
+
parent?: string | number
|
|
904
|
+
/**
|
|
905
|
+
* Parent layout key for flexible content sub-fields
|
|
906
|
+
*/
|
|
907
|
+
parent_layout?: string
|
|
908
|
+
default_value?: DefaultValue
|
|
909
|
+
maxlength?: Maxlength
|
|
910
|
+
rows?: Rows
|
|
911
|
+
placeholder?: Placeholder
|
|
912
|
+
new_lines?: NewLines
|
|
913
|
+
}
|
|
914
|
+
| {
|
|
915
|
+
/**
|
|
916
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
917
|
+
*/
|
|
918
|
+
key: string
|
|
919
|
+
/**
|
|
920
|
+
* The label displayed for this field
|
|
921
|
+
*/
|
|
922
|
+
label: string
|
|
923
|
+
/**
|
|
924
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
925
|
+
*/
|
|
926
|
+
name: string
|
|
927
|
+
/**
|
|
928
|
+
* Accessible label for screen readers
|
|
929
|
+
*/
|
|
930
|
+
"aria-label"?: string
|
|
931
|
+
/**
|
|
932
|
+
* The type of field
|
|
933
|
+
*/
|
|
934
|
+
type: "url"
|
|
935
|
+
/**
|
|
936
|
+
* Instructions for content editors
|
|
937
|
+
*/
|
|
938
|
+
instructions?: string
|
|
939
|
+
/**
|
|
940
|
+
* Whether the field is required
|
|
941
|
+
*/
|
|
942
|
+
required?: boolean | number
|
|
943
|
+
/**
|
|
944
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
945
|
+
*/
|
|
946
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
947
|
+
/**
|
|
948
|
+
* Wrapper element settings
|
|
949
|
+
*/
|
|
950
|
+
wrapper?: {
|
|
951
|
+
/**
|
|
952
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
953
|
+
*/
|
|
954
|
+
width?: string
|
|
955
|
+
/**
|
|
956
|
+
* CSS class(es) for the field wrapper
|
|
957
|
+
*/
|
|
958
|
+
class?: string
|
|
959
|
+
/**
|
|
960
|
+
* HTML ID for the field wrapper
|
|
961
|
+
*/
|
|
962
|
+
id?: string
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Order of the field within its parent
|
|
966
|
+
*/
|
|
967
|
+
menu_order?: number
|
|
968
|
+
/**
|
|
969
|
+
* Parent field or field group key/ID
|
|
970
|
+
*/
|
|
971
|
+
parent?: string | number
|
|
972
|
+
/**
|
|
973
|
+
* Parent layout key for flexible content sub-fields
|
|
974
|
+
*/
|
|
975
|
+
parent_layout?: string
|
|
976
|
+
default_value?: DefaultValue
|
|
977
|
+
placeholder?: Placeholder
|
|
978
|
+
}
|
|
979
|
+
| {
|
|
980
|
+
/**
|
|
981
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
982
|
+
*/
|
|
983
|
+
key: string
|
|
984
|
+
/**
|
|
985
|
+
* The label displayed for this field
|
|
986
|
+
*/
|
|
987
|
+
label: string
|
|
988
|
+
/**
|
|
989
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
990
|
+
*/
|
|
991
|
+
name: string
|
|
992
|
+
/**
|
|
993
|
+
* Accessible label for screen readers
|
|
994
|
+
*/
|
|
995
|
+
"aria-label"?: string
|
|
996
|
+
/**
|
|
997
|
+
* The type of field
|
|
998
|
+
*/
|
|
999
|
+
type: "button_group"
|
|
1000
|
+
/**
|
|
1001
|
+
* Instructions for content editors
|
|
1002
|
+
*/
|
|
1003
|
+
instructions?: string
|
|
1004
|
+
/**
|
|
1005
|
+
* Whether the field is required
|
|
1006
|
+
*/
|
|
1007
|
+
required?: boolean | number
|
|
1008
|
+
/**
|
|
1009
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1010
|
+
*/
|
|
1011
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1012
|
+
/**
|
|
1013
|
+
* Wrapper element settings
|
|
1014
|
+
*/
|
|
1015
|
+
wrapper?: {
|
|
1016
|
+
/**
|
|
1017
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1018
|
+
*/
|
|
1019
|
+
width?: string
|
|
1020
|
+
/**
|
|
1021
|
+
* CSS class(es) for the field wrapper
|
|
1022
|
+
*/
|
|
1023
|
+
class?: string
|
|
1024
|
+
/**
|
|
1025
|
+
* HTML ID for the field wrapper
|
|
1026
|
+
*/
|
|
1027
|
+
id?: string
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Order of the field within its parent
|
|
1031
|
+
*/
|
|
1032
|
+
menu_order?: number
|
|
1033
|
+
/**
|
|
1034
|
+
* Parent field or field group key/ID
|
|
1035
|
+
*/
|
|
1036
|
+
parent?: string | number
|
|
1037
|
+
/**
|
|
1038
|
+
* Parent layout key for flexible content sub-fields
|
|
1039
|
+
*/
|
|
1040
|
+
parent_layout?: string
|
|
1041
|
+
choices?: Choices
|
|
1042
|
+
default_value?: DefaultValue
|
|
1043
|
+
return_format?: ReturnFormatChoice
|
|
1044
|
+
/**
|
|
1045
|
+
* Layout direction for button choices
|
|
1046
|
+
*/
|
|
1047
|
+
layout?: "vertical" | "horizontal"
|
|
1048
|
+
allow_null?: AllowNull
|
|
1049
|
+
}
|
|
1050
|
+
| {
|
|
1051
|
+
/**
|
|
1052
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1053
|
+
*/
|
|
1054
|
+
key: string
|
|
1055
|
+
/**
|
|
1056
|
+
* The label displayed for this field
|
|
1057
|
+
*/
|
|
1058
|
+
label: string
|
|
1059
|
+
/**
|
|
1060
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1061
|
+
*/
|
|
1062
|
+
name: string
|
|
1063
|
+
/**
|
|
1064
|
+
* Accessible label for screen readers
|
|
1065
|
+
*/
|
|
1066
|
+
"aria-label"?: string
|
|
1067
|
+
/**
|
|
1068
|
+
* The type of field
|
|
1069
|
+
*/
|
|
1070
|
+
type: "checkbox"
|
|
1071
|
+
/**
|
|
1072
|
+
* Instructions for content editors
|
|
1073
|
+
*/
|
|
1074
|
+
instructions?: string
|
|
1075
|
+
/**
|
|
1076
|
+
* Whether the field is required
|
|
1077
|
+
*/
|
|
1078
|
+
required?: boolean | number
|
|
1079
|
+
/**
|
|
1080
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1081
|
+
*/
|
|
1082
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1083
|
+
/**
|
|
1084
|
+
* Wrapper element settings
|
|
1085
|
+
*/
|
|
1086
|
+
wrapper?: {
|
|
1087
|
+
/**
|
|
1088
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1089
|
+
*/
|
|
1090
|
+
width?: string
|
|
1091
|
+
/**
|
|
1092
|
+
* CSS class(es) for the field wrapper
|
|
1093
|
+
*/
|
|
1094
|
+
class?: string
|
|
1095
|
+
/**
|
|
1096
|
+
* HTML ID for the field wrapper
|
|
1097
|
+
*/
|
|
1098
|
+
id?: string
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Order of the field within its parent
|
|
1102
|
+
*/
|
|
1103
|
+
menu_order?: number
|
|
1104
|
+
/**
|
|
1105
|
+
* Parent field or field group key/ID
|
|
1106
|
+
*/
|
|
1107
|
+
parent?: string | number
|
|
1108
|
+
/**
|
|
1109
|
+
* Parent layout key for flexible content sub-fields
|
|
1110
|
+
*/
|
|
1111
|
+
parent_layout?: string
|
|
1112
|
+
choices?: Choices
|
|
1113
|
+
default_value?: DefaultValueMulti
|
|
1114
|
+
return_format?: ReturnFormatChoice
|
|
1115
|
+
layout?: LayoutChoice
|
|
1116
|
+
/**
|
|
1117
|
+
* Show a toggle all checkbox (1 for yes, 0 for no)
|
|
1118
|
+
*/
|
|
1119
|
+
toggle?: number
|
|
1120
|
+
/**
|
|
1121
|
+
* Allow custom values to be added (1 for yes, 0 for no)
|
|
1122
|
+
*/
|
|
1123
|
+
allow_custom?: number
|
|
1124
|
+
/**
|
|
1125
|
+
* Save custom values to the field choices (1 for yes, 0 for no)
|
|
1126
|
+
*/
|
|
1127
|
+
save_custom?: number
|
|
1128
|
+
/**
|
|
1129
|
+
* Text for the add custom choice button (translatable)
|
|
1130
|
+
*/
|
|
1131
|
+
custom_choice_button_text?: string
|
|
1132
|
+
} | {
|
|
1133
|
+
/**
|
|
1134
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1135
|
+
*/
|
|
1136
|
+
key: string
|
|
1137
|
+
/**
|
|
1138
|
+
* The label displayed for this field
|
|
1139
|
+
*/
|
|
1140
|
+
label: string
|
|
1141
|
+
/**
|
|
1142
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1143
|
+
*/
|
|
1144
|
+
name: string
|
|
1145
|
+
/**
|
|
1146
|
+
* Accessible label for screen readers
|
|
1147
|
+
*/
|
|
1148
|
+
"aria-label"?: string
|
|
1149
|
+
/**
|
|
1150
|
+
* The type of field
|
|
1151
|
+
*/
|
|
1152
|
+
type: "radio"
|
|
1153
|
+
/**
|
|
1154
|
+
* Instructions for content editors
|
|
1155
|
+
*/
|
|
1156
|
+
instructions?: string
|
|
1157
|
+
/**
|
|
1158
|
+
* Whether the field is required
|
|
1159
|
+
*/
|
|
1160
|
+
required?: boolean | number
|
|
1161
|
+
/**
|
|
1162
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1163
|
+
*/
|
|
1164
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1165
|
+
/**
|
|
1166
|
+
* Wrapper element settings
|
|
1167
|
+
*/
|
|
1168
|
+
wrapper?: {
|
|
1169
|
+
/**
|
|
1170
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1171
|
+
*/
|
|
1172
|
+
width?: string
|
|
1173
|
+
/**
|
|
1174
|
+
* CSS class(es) for the field wrapper
|
|
1175
|
+
*/
|
|
1176
|
+
class?: string
|
|
1177
|
+
/**
|
|
1178
|
+
* HTML ID for the field wrapper
|
|
1179
|
+
*/
|
|
1180
|
+
id?: string
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Order of the field within its parent
|
|
1184
|
+
*/
|
|
1185
|
+
menu_order?: number
|
|
1186
|
+
/**
|
|
1187
|
+
* Parent field or field group key/ID
|
|
1188
|
+
*/
|
|
1189
|
+
parent?: string | number
|
|
1190
|
+
/**
|
|
1191
|
+
* Parent layout key for flexible content sub-fields
|
|
1192
|
+
*/
|
|
1193
|
+
parent_layout?: string
|
|
1194
|
+
choices?: Choices
|
|
1195
|
+
default_value?: DefaultValue
|
|
1196
|
+
return_format?: ReturnFormatChoice
|
|
1197
|
+
layout?: LayoutChoice
|
|
1198
|
+
allow_null?: AllowNull
|
|
1199
|
+
/**
|
|
1200
|
+
* Add an other choice with text input (1 for yes, 0 for no)
|
|
1201
|
+
*/
|
|
1202
|
+
other_choice?: number
|
|
1203
|
+
/**
|
|
1204
|
+
* Save other choice values to the field choices (1 for yes, 0 for no)
|
|
1205
|
+
*/
|
|
1206
|
+
save_other_choice?: number
|
|
1207
|
+
}
|
|
1208
|
+
| {
|
|
1209
|
+
/**
|
|
1210
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1211
|
+
*/
|
|
1212
|
+
key: string
|
|
1213
|
+
/**
|
|
1214
|
+
* The label displayed for this field
|
|
1215
|
+
*/
|
|
1216
|
+
label: string
|
|
1217
|
+
/**
|
|
1218
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1219
|
+
*/
|
|
1220
|
+
name: string
|
|
1221
|
+
/**
|
|
1222
|
+
* Accessible label for screen readers
|
|
1223
|
+
*/
|
|
1224
|
+
"aria-label"?: string
|
|
1225
|
+
/**
|
|
1226
|
+
* The type of field
|
|
1227
|
+
*/
|
|
1228
|
+
type: "select"
|
|
1229
|
+
/**
|
|
1230
|
+
* Instructions for content editors
|
|
1231
|
+
*/
|
|
1232
|
+
instructions?: string
|
|
1233
|
+
/**
|
|
1234
|
+
* Whether the field is required
|
|
1235
|
+
*/
|
|
1236
|
+
required?: boolean | number
|
|
1237
|
+
/**
|
|
1238
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1239
|
+
*/
|
|
1240
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1241
|
+
/**
|
|
1242
|
+
* Wrapper element settings
|
|
1243
|
+
*/
|
|
1244
|
+
wrapper?: {
|
|
1245
|
+
/**
|
|
1246
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1247
|
+
*/
|
|
1248
|
+
width?: string
|
|
1249
|
+
/**
|
|
1250
|
+
* CSS class(es) for the field wrapper
|
|
1251
|
+
*/
|
|
1252
|
+
class?: string
|
|
1253
|
+
/**
|
|
1254
|
+
* HTML ID for the field wrapper
|
|
1255
|
+
*/
|
|
1256
|
+
id?: string
|
|
1257
|
+
}
|
|
1258
|
+
/**
|
|
1259
|
+
* Order of the field within its parent
|
|
1260
|
+
*/
|
|
1261
|
+
menu_order?: number
|
|
1262
|
+
/**
|
|
1263
|
+
* Parent field or field group key/ID
|
|
1264
|
+
*/
|
|
1265
|
+
parent?: string | number
|
|
1266
|
+
/**
|
|
1267
|
+
* Parent layout key for flexible content sub-fields
|
|
1268
|
+
*/
|
|
1269
|
+
parent_layout?: string
|
|
1270
|
+
choices?: Choices
|
|
1271
|
+
default_value?: DefaultValueMulti
|
|
1272
|
+
return_format?: ReturnFormatChoice
|
|
1273
|
+
multiple?: Multiple
|
|
1274
|
+
allow_null?: AllowNull
|
|
1275
|
+
placeholder?: Placeholder
|
|
1276
|
+
/**
|
|
1277
|
+
* Use enhanced Select2 UI (1 for yes, 0 for no)
|
|
1278
|
+
*/
|
|
1279
|
+
ui?: number
|
|
1280
|
+
/**
|
|
1281
|
+
* Use AJAX to lazy load choices (1 for yes, 0 for no)
|
|
1282
|
+
*/
|
|
1283
|
+
ajax?: number
|
|
1284
|
+
/**
|
|
1285
|
+
* Allow new options to be created while editing (1 for yes, 0 for no)
|
|
1286
|
+
*/
|
|
1287
|
+
create_options?: number
|
|
1288
|
+
/**
|
|
1289
|
+
* Save newly created options to the field choices (1 for yes, 0 for no)
|
|
1290
|
+
*/
|
|
1291
|
+
save_options?: number
|
|
1292
|
+
}
|
|
1293
|
+
| {
|
|
1294
|
+
/**
|
|
1295
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1296
|
+
*/
|
|
1297
|
+
key: string
|
|
1298
|
+
/**
|
|
1299
|
+
* The label displayed for this field
|
|
1300
|
+
*/
|
|
1301
|
+
label: string
|
|
1302
|
+
/**
|
|
1303
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1304
|
+
*/
|
|
1305
|
+
name: string
|
|
1306
|
+
/**
|
|
1307
|
+
* Accessible label for screen readers
|
|
1308
|
+
*/
|
|
1309
|
+
"aria-label"?: string
|
|
1310
|
+
/**
|
|
1311
|
+
* The type of field
|
|
1312
|
+
*/
|
|
1313
|
+
type: "true_false"
|
|
1314
|
+
/**
|
|
1315
|
+
* Instructions for content editors
|
|
1316
|
+
*/
|
|
1317
|
+
instructions?: string
|
|
1318
|
+
/**
|
|
1319
|
+
* Whether the field is required
|
|
1320
|
+
*/
|
|
1321
|
+
required?: boolean | number
|
|
1322
|
+
/**
|
|
1323
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1324
|
+
*/
|
|
1325
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1326
|
+
/**
|
|
1327
|
+
* Wrapper element settings
|
|
1328
|
+
*/
|
|
1329
|
+
wrapper?: {
|
|
1330
|
+
/**
|
|
1331
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1332
|
+
*/
|
|
1333
|
+
width?: string
|
|
1334
|
+
/**
|
|
1335
|
+
* CSS class(es) for the field wrapper
|
|
1336
|
+
*/
|
|
1337
|
+
class?: string
|
|
1338
|
+
/**
|
|
1339
|
+
* HTML ID for the field wrapper
|
|
1340
|
+
*/
|
|
1341
|
+
id?: string
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Order of the field within its parent
|
|
1345
|
+
*/
|
|
1346
|
+
menu_order?: number
|
|
1347
|
+
/**
|
|
1348
|
+
* Parent field or field group key/ID
|
|
1349
|
+
*/
|
|
1350
|
+
parent?: string | number
|
|
1351
|
+
/**
|
|
1352
|
+
* Parent layout key for flexible content sub-fields
|
|
1353
|
+
*/
|
|
1354
|
+
parent_layout?: string
|
|
1355
|
+
/**
|
|
1356
|
+
* Default state (0 for off, 1 for on)
|
|
1357
|
+
*/
|
|
1358
|
+
default_value?: number
|
|
1359
|
+
/**
|
|
1360
|
+
* Text displayed alongside the checkbox
|
|
1361
|
+
*/
|
|
1362
|
+
message?: string
|
|
1363
|
+
/**
|
|
1364
|
+
* Use stylized toggle UI (1 for yes, 0 for no)
|
|
1365
|
+
*/
|
|
1366
|
+
ui?: number
|
|
1367
|
+
/**
|
|
1368
|
+
* Text shown when toggle is on (empty for default 'Yes')
|
|
1369
|
+
*/
|
|
1370
|
+
ui_on_text?: string
|
|
1371
|
+
/**
|
|
1372
|
+
* Text shown when toggle is off (empty for default 'No')
|
|
1373
|
+
*/
|
|
1374
|
+
ui_off_text?: string
|
|
1375
|
+
}
|
|
1376
|
+
| {
|
|
1377
|
+
/**
|
|
1378
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1379
|
+
*/
|
|
1380
|
+
key: string
|
|
1381
|
+
/**
|
|
1382
|
+
* The label displayed for this field
|
|
1383
|
+
*/
|
|
1384
|
+
label: string
|
|
1385
|
+
/**
|
|
1386
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1387
|
+
*/
|
|
1388
|
+
name: string
|
|
1389
|
+
/**
|
|
1390
|
+
* Accessible label for screen readers
|
|
1391
|
+
*/
|
|
1392
|
+
"aria-label"?: string
|
|
1393
|
+
/**
|
|
1394
|
+
* The type of field
|
|
1395
|
+
*/
|
|
1396
|
+
type: "file"
|
|
1397
|
+
/**
|
|
1398
|
+
* Instructions for content editors
|
|
1399
|
+
*/
|
|
1400
|
+
instructions?: string
|
|
1401
|
+
/**
|
|
1402
|
+
* Whether the field is required
|
|
1403
|
+
*/
|
|
1404
|
+
required?: boolean | number
|
|
1405
|
+
/**
|
|
1406
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1407
|
+
*/
|
|
1408
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1409
|
+
/**
|
|
1410
|
+
* Wrapper element settings
|
|
1411
|
+
*/
|
|
1412
|
+
wrapper?: {
|
|
1413
|
+
/**
|
|
1414
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1415
|
+
*/
|
|
1416
|
+
width?: string
|
|
1417
|
+
/**
|
|
1418
|
+
* CSS class(es) for the field wrapper
|
|
1419
|
+
*/
|
|
1420
|
+
class?: string
|
|
1421
|
+
/**
|
|
1422
|
+
* HTML ID for the field wrapper
|
|
1423
|
+
*/
|
|
1424
|
+
id?: string
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* Order of the field within its parent
|
|
1428
|
+
*/
|
|
1429
|
+
menu_order?: number
|
|
1430
|
+
/**
|
|
1431
|
+
* Parent field or field group key/ID
|
|
1432
|
+
*/
|
|
1433
|
+
parent?: string | number
|
|
1434
|
+
/**
|
|
1435
|
+
* Parent layout key for flexible content sub-fields
|
|
1436
|
+
*/
|
|
1437
|
+
parent_layout?: string
|
|
1438
|
+
return_format?: ReturnFormatMedia
|
|
1439
|
+
library?: Library
|
|
1440
|
+
min_size?: MinSize
|
|
1441
|
+
max_size?: MaxSize
|
|
1442
|
+
mime_types?: MimeTypes
|
|
1443
|
+
}
|
|
1444
|
+
| {
|
|
1445
|
+
/**
|
|
1446
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1447
|
+
*/
|
|
1448
|
+
key: string
|
|
1449
|
+
/**
|
|
1450
|
+
* The label displayed for this field
|
|
1451
|
+
*/
|
|
1452
|
+
label: string
|
|
1453
|
+
/**
|
|
1454
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1455
|
+
*/
|
|
1456
|
+
name: string
|
|
1457
|
+
/**
|
|
1458
|
+
* Accessible label for screen readers
|
|
1459
|
+
*/
|
|
1460
|
+
"aria-label"?: string
|
|
1461
|
+
/**
|
|
1462
|
+
* The type of field
|
|
1463
|
+
*/
|
|
1464
|
+
type: "gallery"
|
|
1465
|
+
/**
|
|
1466
|
+
* Instructions for content editors
|
|
1467
|
+
*/
|
|
1468
|
+
instructions?: string
|
|
1469
|
+
/**
|
|
1470
|
+
* Whether the field is required
|
|
1471
|
+
*/
|
|
1472
|
+
required?: boolean | number
|
|
1473
|
+
/**
|
|
1474
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1475
|
+
*/
|
|
1476
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1477
|
+
/**
|
|
1478
|
+
* Wrapper element settings
|
|
1479
|
+
*/
|
|
1480
|
+
wrapper?: {
|
|
1481
|
+
/**
|
|
1482
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1483
|
+
*/
|
|
1484
|
+
width?: string
|
|
1485
|
+
/**
|
|
1486
|
+
* CSS class(es) for the field wrapper
|
|
1487
|
+
*/
|
|
1488
|
+
class?: string
|
|
1489
|
+
/**
|
|
1490
|
+
* HTML ID for the field wrapper
|
|
1491
|
+
*/
|
|
1492
|
+
id?: string
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Order of the field within its parent
|
|
1496
|
+
*/
|
|
1497
|
+
menu_order?: number
|
|
1498
|
+
/**
|
|
1499
|
+
* Parent field or field group key/ID
|
|
1500
|
+
*/
|
|
1501
|
+
parent?: string | number
|
|
1502
|
+
/**
|
|
1503
|
+
* Parent layout key for flexible content sub-fields
|
|
1504
|
+
*/
|
|
1505
|
+
parent_layout?: string
|
|
1506
|
+
return_format?: ReturnFormatMedia
|
|
1507
|
+
preview_size?: PreviewSize
|
|
1508
|
+
library?: Library
|
|
1509
|
+
min_width?: MinWidth
|
|
1510
|
+
min_height?: MinHeight
|
|
1511
|
+
min_size?: MinSize
|
|
1512
|
+
max_width?: MaxWidth
|
|
1513
|
+
max_height?: MaxHeight
|
|
1514
|
+
max_size?: MaxSize
|
|
1515
|
+
mime_types?: MimeTypes
|
|
1516
|
+
min?: Min
|
|
1517
|
+
max?: Max
|
|
1518
|
+
/**
|
|
1519
|
+
* Where to insert new images (append or prepend)
|
|
1520
|
+
*/
|
|
1521
|
+
insert?: "append" | "prepend"
|
|
1522
|
+
}
|
|
1523
|
+
| {
|
|
1524
|
+
/**
|
|
1525
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1526
|
+
*/
|
|
1527
|
+
key: string
|
|
1528
|
+
/**
|
|
1529
|
+
* The label displayed for this field
|
|
1530
|
+
*/
|
|
1531
|
+
label: string
|
|
1532
|
+
/**
|
|
1533
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1534
|
+
*/
|
|
1535
|
+
name: string
|
|
1536
|
+
/**
|
|
1537
|
+
* Accessible label for screen readers
|
|
1538
|
+
*/
|
|
1539
|
+
"aria-label"?: string
|
|
1540
|
+
/**
|
|
1541
|
+
* The type of field
|
|
1542
|
+
*/
|
|
1543
|
+
type: "image"
|
|
1544
|
+
/**
|
|
1545
|
+
* Instructions for content editors
|
|
1546
|
+
*/
|
|
1547
|
+
instructions?: string
|
|
1548
|
+
/**
|
|
1549
|
+
* Whether the field is required
|
|
1550
|
+
*/
|
|
1551
|
+
required?: boolean | number
|
|
1552
|
+
/**
|
|
1553
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1554
|
+
*/
|
|
1555
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1556
|
+
/**
|
|
1557
|
+
* Wrapper element settings
|
|
1558
|
+
*/
|
|
1559
|
+
wrapper?: {
|
|
1560
|
+
/**
|
|
1561
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1562
|
+
*/
|
|
1563
|
+
width?: string
|
|
1564
|
+
/**
|
|
1565
|
+
* CSS class(es) for the field wrapper
|
|
1566
|
+
*/
|
|
1567
|
+
class?: string
|
|
1568
|
+
/**
|
|
1569
|
+
* HTML ID for the field wrapper
|
|
1570
|
+
*/
|
|
1571
|
+
id?: string
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Order of the field within its parent
|
|
1575
|
+
*/
|
|
1576
|
+
menu_order?: number
|
|
1577
|
+
/**
|
|
1578
|
+
* Parent field or field group key/ID
|
|
1579
|
+
*/
|
|
1580
|
+
parent?: string | number
|
|
1581
|
+
/**
|
|
1582
|
+
* Parent layout key for flexible content sub-fields
|
|
1583
|
+
*/
|
|
1584
|
+
parent_layout?: string
|
|
1585
|
+
return_format?: ReturnFormatMedia
|
|
1586
|
+
preview_size?: PreviewSize
|
|
1587
|
+
library?: Library
|
|
1588
|
+
min_width?: MinWidth
|
|
1589
|
+
min_height?: MinHeight
|
|
1590
|
+
min_size?: MinSize
|
|
1591
|
+
max_width?: MaxWidth
|
|
1592
|
+
max_height?: MaxHeight
|
|
1593
|
+
max_size?: MaxSize
|
|
1594
|
+
mime_types?: MimeTypes
|
|
1595
|
+
}
|
|
1596
|
+
| {
|
|
1597
|
+
/**
|
|
1598
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1599
|
+
*/
|
|
1600
|
+
key: string
|
|
1601
|
+
/**
|
|
1602
|
+
* The label displayed for this field
|
|
1603
|
+
*/
|
|
1604
|
+
label: string
|
|
1605
|
+
/**
|
|
1606
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1607
|
+
*/
|
|
1608
|
+
name: string
|
|
1609
|
+
/**
|
|
1610
|
+
* Accessible label for screen readers
|
|
1611
|
+
*/
|
|
1612
|
+
"aria-label"?: string
|
|
1613
|
+
/**
|
|
1614
|
+
* The type of field
|
|
1615
|
+
*/
|
|
1616
|
+
type: "oembed"
|
|
1617
|
+
/**
|
|
1618
|
+
* Instructions for content editors
|
|
1619
|
+
*/
|
|
1620
|
+
instructions?: string
|
|
1621
|
+
/**
|
|
1622
|
+
* Whether the field is required
|
|
1623
|
+
*/
|
|
1624
|
+
required?: boolean | number
|
|
1625
|
+
/**
|
|
1626
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1627
|
+
*/
|
|
1628
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1629
|
+
/**
|
|
1630
|
+
* Wrapper element settings
|
|
1631
|
+
*/
|
|
1632
|
+
wrapper?: {
|
|
1633
|
+
/**
|
|
1634
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1635
|
+
*/
|
|
1636
|
+
width?: string
|
|
1637
|
+
/**
|
|
1638
|
+
* CSS class(es) for the field wrapper
|
|
1639
|
+
*/
|
|
1640
|
+
class?: string
|
|
1641
|
+
/**
|
|
1642
|
+
* HTML ID for the field wrapper
|
|
1643
|
+
*/
|
|
1644
|
+
id?: string
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* Order of the field within its parent
|
|
1648
|
+
*/
|
|
1649
|
+
menu_order?: number
|
|
1650
|
+
/**
|
|
1651
|
+
* Parent field or field group key/ID
|
|
1652
|
+
*/
|
|
1653
|
+
parent?: string | number
|
|
1654
|
+
/**
|
|
1655
|
+
* Parent layout key for flexible content sub-fields
|
|
1656
|
+
*/
|
|
1657
|
+
parent_layout?: string
|
|
1658
|
+
/**
|
|
1659
|
+
* Maximum width of embedded content in pixels (empty for default)
|
|
1660
|
+
*/
|
|
1661
|
+
width?: string
|
|
1662
|
+
/**
|
|
1663
|
+
* Maximum height of embedded content in pixels (empty for default)
|
|
1664
|
+
*/
|
|
1665
|
+
height?: string
|
|
1666
|
+
}
|
|
1667
|
+
| {
|
|
1668
|
+
/**
|
|
1669
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1670
|
+
*/
|
|
1671
|
+
key: string
|
|
1672
|
+
/**
|
|
1673
|
+
* The label displayed for this field
|
|
1674
|
+
*/
|
|
1675
|
+
label: string
|
|
1676
|
+
/**
|
|
1677
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1678
|
+
*/
|
|
1679
|
+
name: string
|
|
1680
|
+
/**
|
|
1681
|
+
* Accessible label for screen readers
|
|
1682
|
+
*/
|
|
1683
|
+
"aria-label"?: string
|
|
1684
|
+
/**
|
|
1685
|
+
* The type of field
|
|
1686
|
+
*/
|
|
1687
|
+
type: "wysiwyg"
|
|
1688
|
+
/**
|
|
1689
|
+
* Instructions for content editors
|
|
1690
|
+
*/
|
|
1691
|
+
instructions?: string
|
|
1692
|
+
/**
|
|
1693
|
+
* Whether the field is required
|
|
1694
|
+
*/
|
|
1695
|
+
required?: boolean | number
|
|
1696
|
+
/**
|
|
1697
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1698
|
+
*/
|
|
1699
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1700
|
+
/**
|
|
1701
|
+
* Wrapper element settings
|
|
1702
|
+
*/
|
|
1703
|
+
wrapper?: {
|
|
1704
|
+
/**
|
|
1705
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1706
|
+
*/
|
|
1707
|
+
width?: string
|
|
1708
|
+
/**
|
|
1709
|
+
* CSS class(es) for the field wrapper
|
|
1710
|
+
*/
|
|
1711
|
+
class?: string
|
|
1712
|
+
/**
|
|
1713
|
+
* HTML ID for the field wrapper
|
|
1714
|
+
*/
|
|
1715
|
+
id?: string
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Order of the field within its parent
|
|
1719
|
+
*/
|
|
1720
|
+
menu_order?: number
|
|
1721
|
+
/**
|
|
1722
|
+
* Parent field or field group key/ID
|
|
1723
|
+
*/
|
|
1724
|
+
parent?: string | number
|
|
1725
|
+
/**
|
|
1726
|
+
* Parent layout key for flexible content sub-fields
|
|
1727
|
+
*/
|
|
1728
|
+
parent_layout?: string
|
|
1729
|
+
default_value?: DefaultValue
|
|
1730
|
+
/**
|
|
1731
|
+
* Which editor tabs to show (all, visual only, or text only)
|
|
1732
|
+
*/
|
|
1733
|
+
tabs?: "all" | "visual" | "text"
|
|
1734
|
+
/**
|
|
1735
|
+
* Toolbar configuration (full or basic)
|
|
1736
|
+
*/
|
|
1737
|
+
toolbar?: string
|
|
1738
|
+
/**
|
|
1739
|
+
* Show media upload button (1 for yes, 0 for no)
|
|
1740
|
+
*/
|
|
1741
|
+
media_upload?: number
|
|
1742
|
+
/**
|
|
1743
|
+
* Delay TinyMCE initialization until field is clicked (1 for yes, 0 for no)
|
|
1744
|
+
*/
|
|
1745
|
+
delay?: number
|
|
1746
|
+
}
|
|
1747
|
+
| {
|
|
1748
|
+
/**
|
|
1749
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1750
|
+
*/
|
|
1751
|
+
key: string
|
|
1752
|
+
/**
|
|
1753
|
+
* The label displayed for this field
|
|
1754
|
+
*/
|
|
1755
|
+
label: string
|
|
1756
|
+
/**
|
|
1757
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1758
|
+
*/
|
|
1759
|
+
name: string
|
|
1760
|
+
/**
|
|
1761
|
+
* Accessible label for screen readers
|
|
1762
|
+
*/
|
|
1763
|
+
"aria-label"?: string
|
|
1764
|
+
/**
|
|
1765
|
+
* The type of field
|
|
1766
|
+
*/
|
|
1767
|
+
type: "accordion"
|
|
1768
|
+
/**
|
|
1769
|
+
* Instructions for content editors
|
|
1770
|
+
*/
|
|
1771
|
+
instructions?: string
|
|
1772
|
+
/**
|
|
1773
|
+
* Whether the field is required
|
|
1774
|
+
*/
|
|
1775
|
+
required?: boolean | number
|
|
1776
|
+
/**
|
|
1777
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1778
|
+
*/
|
|
1779
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1780
|
+
/**
|
|
1781
|
+
* Wrapper element settings
|
|
1782
|
+
*/
|
|
1783
|
+
wrapper?: {
|
|
1784
|
+
/**
|
|
1785
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1786
|
+
*/
|
|
1787
|
+
width?: string
|
|
1788
|
+
/**
|
|
1789
|
+
* CSS class(es) for the field wrapper
|
|
1790
|
+
*/
|
|
1791
|
+
class?: string
|
|
1792
|
+
/**
|
|
1793
|
+
* HTML ID for the field wrapper
|
|
1794
|
+
*/
|
|
1795
|
+
id?: string
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Order of the field within its parent
|
|
1799
|
+
*/
|
|
1800
|
+
menu_order?: number
|
|
1801
|
+
/**
|
|
1802
|
+
* Parent field or field group key/ID
|
|
1803
|
+
*/
|
|
1804
|
+
parent?: string | number
|
|
1805
|
+
/**
|
|
1806
|
+
* Parent layout key for flexible content sub-fields
|
|
1807
|
+
*/
|
|
1808
|
+
parent_layout?: string
|
|
1809
|
+
/**
|
|
1810
|
+
* Display this accordion as open on page load
|
|
1811
|
+
*/
|
|
1812
|
+
open?: number
|
|
1813
|
+
/**
|
|
1814
|
+
* Allow this accordion to open without closing others
|
|
1815
|
+
*/
|
|
1816
|
+
multi_expand?: number
|
|
1817
|
+
endpoint?: Endpoint
|
|
1818
|
+
}| {
|
|
1819
|
+
/**
|
|
1820
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1821
|
+
*/
|
|
1822
|
+
key: string
|
|
1823
|
+
/**
|
|
1824
|
+
* The label displayed for this field
|
|
1825
|
+
*/
|
|
1826
|
+
label: string
|
|
1827
|
+
/**
|
|
1828
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1829
|
+
*/
|
|
1830
|
+
name: string
|
|
1831
|
+
/**
|
|
1832
|
+
* Accessible label for screen readers
|
|
1833
|
+
*/
|
|
1834
|
+
"aria-label"?: string
|
|
1835
|
+
/**
|
|
1836
|
+
* The type of field
|
|
1837
|
+
*/
|
|
1838
|
+
type: "flexible_content"
|
|
1839
|
+
/**
|
|
1840
|
+
* Instructions for content editors
|
|
1841
|
+
*/
|
|
1842
|
+
instructions?: string
|
|
1843
|
+
/**
|
|
1844
|
+
* Whether the field is required
|
|
1845
|
+
*/
|
|
1846
|
+
required?: boolean | number
|
|
1847
|
+
/**
|
|
1848
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1849
|
+
*/
|
|
1850
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1851
|
+
/**
|
|
1852
|
+
* Wrapper element settings
|
|
1853
|
+
*/
|
|
1854
|
+
wrapper?: {
|
|
1855
|
+
/**
|
|
1856
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1857
|
+
*/
|
|
1858
|
+
width?: string
|
|
1859
|
+
/**
|
|
1860
|
+
* CSS class(es) for the field wrapper
|
|
1861
|
+
*/
|
|
1862
|
+
class?: string
|
|
1863
|
+
/**
|
|
1864
|
+
* HTML ID for the field wrapper
|
|
1865
|
+
*/
|
|
1866
|
+
id?: string
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* Order of the field within its parent
|
|
1870
|
+
*/
|
|
1871
|
+
menu_order?: number
|
|
1872
|
+
/**
|
|
1873
|
+
* Parent field or field group key/ID
|
|
1874
|
+
*/
|
|
1875
|
+
parent?: string | number
|
|
1876
|
+
/**
|
|
1877
|
+
* Parent layout key for flexible content sub-fields
|
|
1878
|
+
*/
|
|
1879
|
+
parent_layout?: string
|
|
1880
|
+
/**
|
|
1881
|
+
* Available layout configurations
|
|
1882
|
+
*/
|
|
1883
|
+
layouts?: ACFLayout[]
|
|
1884
|
+
/**
|
|
1885
|
+
* Minimum number of layouts (empty for no limit)
|
|
1886
|
+
*/
|
|
1887
|
+
min?: number | string
|
|
1888
|
+
/**
|
|
1889
|
+
* Maximum number of layouts (empty for no limit)
|
|
1890
|
+
*/
|
|
1891
|
+
max?: number | string
|
|
1892
|
+
/**
|
|
1893
|
+
* Text label for the add row button
|
|
1894
|
+
*/
|
|
1895
|
+
button_label?: string
|
|
1896
|
+
}
|
|
1897
|
+
| {
|
|
1898
|
+
/**
|
|
1899
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1900
|
+
*/
|
|
1901
|
+
key: string
|
|
1902
|
+
/**
|
|
1903
|
+
* The label displayed for this field
|
|
1904
|
+
*/
|
|
1905
|
+
label: string
|
|
1906
|
+
/**
|
|
1907
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1908
|
+
*/
|
|
1909
|
+
name: string
|
|
1910
|
+
/**
|
|
1911
|
+
* Accessible label for screen readers
|
|
1912
|
+
*/
|
|
1913
|
+
"aria-label"?: string
|
|
1914
|
+
/**
|
|
1915
|
+
* The type of field
|
|
1916
|
+
*/
|
|
1917
|
+
type: "group"
|
|
1918
|
+
/**
|
|
1919
|
+
* Instructions for content editors
|
|
1920
|
+
*/
|
|
1921
|
+
instructions?: string
|
|
1922
|
+
/**
|
|
1923
|
+
* Whether the field is required
|
|
1924
|
+
*/
|
|
1925
|
+
required?: boolean | number
|
|
1926
|
+
/**
|
|
1927
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1928
|
+
*/
|
|
1929
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1930
|
+
/**
|
|
1931
|
+
* Wrapper element settings
|
|
1932
|
+
*/
|
|
1933
|
+
wrapper?: {
|
|
1934
|
+
/**
|
|
1935
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
1936
|
+
*/
|
|
1937
|
+
width?: string
|
|
1938
|
+
/**
|
|
1939
|
+
* CSS class(es) for the field wrapper
|
|
1940
|
+
*/
|
|
1941
|
+
class?: string
|
|
1942
|
+
/**
|
|
1943
|
+
* HTML ID for the field wrapper
|
|
1944
|
+
*/
|
|
1945
|
+
id?: string
|
|
1946
|
+
}
|
|
1947
|
+
/**
|
|
1948
|
+
* Order of the field within its parent
|
|
1949
|
+
*/
|
|
1950
|
+
menu_order?: number
|
|
1951
|
+
/**
|
|
1952
|
+
* Parent field or field group key/ID
|
|
1953
|
+
*/
|
|
1954
|
+
parent?: string | number
|
|
1955
|
+
/**
|
|
1956
|
+
* Parent layout key for flexible content sub-fields
|
|
1957
|
+
*/
|
|
1958
|
+
parent_layout?: string
|
|
1959
|
+
sub_fields?: SubFields
|
|
1960
|
+
/**
|
|
1961
|
+
* Visual layout style for rendering fields
|
|
1962
|
+
*/
|
|
1963
|
+
layout?: "block" | "table" | "row"
|
|
1964
|
+
}
|
|
1965
|
+
| {
|
|
1966
|
+
/**
|
|
1967
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
1968
|
+
*/
|
|
1969
|
+
key: string
|
|
1970
|
+
/**
|
|
1971
|
+
* The label displayed for this field
|
|
1972
|
+
*/
|
|
1973
|
+
label: string
|
|
1974
|
+
/**
|
|
1975
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
1976
|
+
*/
|
|
1977
|
+
name: string
|
|
1978
|
+
/**
|
|
1979
|
+
* Accessible label for screen readers
|
|
1980
|
+
*/
|
|
1981
|
+
"aria-label"?: string
|
|
1982
|
+
/**
|
|
1983
|
+
* The type of field
|
|
1984
|
+
*/
|
|
1985
|
+
type: "message"
|
|
1986
|
+
/**
|
|
1987
|
+
* Instructions for content editors
|
|
1988
|
+
*/
|
|
1989
|
+
instructions?: string
|
|
1990
|
+
/**
|
|
1991
|
+
* Whether the field is required
|
|
1992
|
+
*/
|
|
1993
|
+
required?: boolean | number
|
|
1994
|
+
/**
|
|
1995
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
1996
|
+
*/
|
|
1997
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
1998
|
+
/**
|
|
1999
|
+
* Wrapper element settings
|
|
2000
|
+
*/
|
|
2001
|
+
wrapper?: {
|
|
2002
|
+
/**
|
|
2003
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2004
|
+
*/
|
|
2005
|
+
width?: string
|
|
2006
|
+
/**
|
|
2007
|
+
* CSS class(es) for the field wrapper
|
|
2008
|
+
*/
|
|
2009
|
+
class?: string
|
|
2010
|
+
/**
|
|
2011
|
+
* HTML ID for the field wrapper
|
|
2012
|
+
*/
|
|
2013
|
+
id?: string
|
|
2014
|
+
}
|
|
2015
|
+
/**
|
|
2016
|
+
* Order of the field within its parent
|
|
2017
|
+
*/
|
|
2018
|
+
menu_order?: number
|
|
2019
|
+
/**
|
|
2020
|
+
* Parent field or field group key/ID
|
|
2021
|
+
*/
|
|
2022
|
+
parent?: string | number
|
|
2023
|
+
/**
|
|
2024
|
+
* Parent layout key for flexible content sub-fields
|
|
2025
|
+
*/
|
|
2026
|
+
parent_layout?: string
|
|
2027
|
+
/**
|
|
2028
|
+
* Message content to display
|
|
2029
|
+
*/
|
|
2030
|
+
message?: string
|
|
2031
|
+
/**
|
|
2032
|
+
* Display HTML as visible text instead of rendering
|
|
2033
|
+
*/
|
|
2034
|
+
esc_html?: number
|
|
2035
|
+
/**
|
|
2036
|
+
* Controls how new lines are rendered
|
|
2037
|
+
*/
|
|
2038
|
+
new_lines?: "wpautop" | "br" | ""
|
|
2039
|
+
}
|
|
2040
|
+
| {
|
|
2041
|
+
/**
|
|
2042
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2043
|
+
*/
|
|
2044
|
+
key: string
|
|
2045
|
+
/**
|
|
2046
|
+
* The label displayed for this field
|
|
2047
|
+
*/
|
|
2048
|
+
label: string
|
|
2049
|
+
/**
|
|
2050
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2051
|
+
*/
|
|
2052
|
+
name: string
|
|
2053
|
+
/**
|
|
2054
|
+
* Accessible label for screen readers
|
|
2055
|
+
*/
|
|
2056
|
+
"aria-label"?: string
|
|
2057
|
+
/**
|
|
2058
|
+
* The type of field
|
|
2059
|
+
*/
|
|
2060
|
+
type: "repeater"
|
|
2061
|
+
/**
|
|
2062
|
+
* Instructions for content editors
|
|
2063
|
+
*/
|
|
2064
|
+
instructions?: string
|
|
2065
|
+
/**
|
|
2066
|
+
* Whether the field is required
|
|
2067
|
+
*/
|
|
2068
|
+
required?: boolean | number
|
|
2069
|
+
/**
|
|
2070
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2071
|
+
*/
|
|
2072
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2073
|
+
/**
|
|
2074
|
+
* Wrapper element settings
|
|
2075
|
+
*/
|
|
2076
|
+
wrapper?: {
|
|
2077
|
+
/**
|
|
2078
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2079
|
+
*/
|
|
2080
|
+
width?: string
|
|
2081
|
+
/**
|
|
2082
|
+
* CSS class(es) for the field wrapper
|
|
2083
|
+
*/
|
|
2084
|
+
class?: string
|
|
2085
|
+
/**
|
|
2086
|
+
* HTML ID for the field wrapper
|
|
2087
|
+
*/
|
|
2088
|
+
id?: string
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Order of the field within its parent
|
|
2092
|
+
*/
|
|
2093
|
+
menu_order?: number
|
|
2094
|
+
/**
|
|
2095
|
+
* Parent field or field group key/ID
|
|
2096
|
+
*/
|
|
2097
|
+
parent?: string | number
|
|
2098
|
+
/**
|
|
2099
|
+
* Parent layout key for flexible content sub-fields
|
|
2100
|
+
*/
|
|
2101
|
+
parent_layout?: string
|
|
2102
|
+
sub_fields?: SubFields
|
|
2103
|
+
min?: Min
|
|
2104
|
+
max?: Max
|
|
2105
|
+
/**
|
|
2106
|
+
* Visual layout style for rendering fields
|
|
2107
|
+
*/
|
|
2108
|
+
layout?: "block" | "table" | "row"
|
|
2109
|
+
button_label?: ButtonLabel
|
|
2110
|
+
/**
|
|
2111
|
+
* Enable pagination for repeaters with many rows
|
|
2112
|
+
*/
|
|
2113
|
+
pagination?: boolean | number
|
|
2114
|
+
/**
|
|
2115
|
+
* Number of rows displayed per page when pagination is enabled
|
|
2116
|
+
*/
|
|
2117
|
+
rows_per_page?: number
|
|
2118
|
+
/**
|
|
2119
|
+
* Field key to use as collapsed row title
|
|
2120
|
+
*/
|
|
2121
|
+
collapsed?: string
|
|
2122
|
+
}
|
|
2123
|
+
| {
|
|
2124
|
+
/**
|
|
2125
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2126
|
+
*/
|
|
2127
|
+
key: string
|
|
2128
|
+
/**
|
|
2129
|
+
* The label displayed for this field
|
|
2130
|
+
*/
|
|
2131
|
+
label: string
|
|
2132
|
+
/**
|
|
2133
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2134
|
+
*/
|
|
2135
|
+
name: string
|
|
2136
|
+
/**
|
|
2137
|
+
* Accessible label for screen readers
|
|
2138
|
+
*/
|
|
2139
|
+
"aria-label"?: string
|
|
2140
|
+
/**
|
|
2141
|
+
* The type of field
|
|
2142
|
+
*/
|
|
2143
|
+
type: "separator"
|
|
2144
|
+
/**
|
|
2145
|
+
* Instructions for content editors
|
|
2146
|
+
*/
|
|
2147
|
+
instructions?: string
|
|
2148
|
+
/**
|
|
2149
|
+
* Whether the field is required
|
|
2150
|
+
*/
|
|
2151
|
+
required?: boolean | number
|
|
2152
|
+
/**
|
|
2153
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2154
|
+
*/
|
|
2155
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2156
|
+
/**
|
|
2157
|
+
* Wrapper element settings
|
|
2158
|
+
*/
|
|
2159
|
+
wrapper?: {
|
|
2160
|
+
/**
|
|
2161
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2162
|
+
*/
|
|
2163
|
+
width?: string
|
|
2164
|
+
/**
|
|
2165
|
+
* CSS class(es) for the field wrapper
|
|
2166
|
+
*/
|
|
2167
|
+
class?: string
|
|
2168
|
+
/**
|
|
2169
|
+
* HTML ID for the field wrapper
|
|
2170
|
+
*/
|
|
2171
|
+
id?: string
|
|
2172
|
+
}
|
|
2173
|
+
/**
|
|
2174
|
+
* Order of the field within its parent
|
|
2175
|
+
*/
|
|
2176
|
+
menu_order?: number
|
|
2177
|
+
/**
|
|
2178
|
+
* Parent field or field group key/ID
|
|
2179
|
+
*/
|
|
2180
|
+
parent?: string | number
|
|
2181
|
+
/**
|
|
2182
|
+
* Parent layout key for flexible content sub-fields
|
|
2183
|
+
*/
|
|
2184
|
+
parent_layout?: string
|
|
2185
|
+
}
|
|
2186
|
+
| {
|
|
2187
|
+
/**
|
|
2188
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2189
|
+
*/
|
|
2190
|
+
key: string
|
|
2191
|
+
/**
|
|
2192
|
+
* The label displayed for this field
|
|
2193
|
+
*/
|
|
2194
|
+
label: string
|
|
2195
|
+
/**
|
|
2196
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2197
|
+
*/
|
|
2198
|
+
name: string
|
|
2199
|
+
/**
|
|
2200
|
+
* Accessible label for screen readers
|
|
2201
|
+
*/
|
|
2202
|
+
"aria-label"?: string
|
|
2203
|
+
/**
|
|
2204
|
+
* The type of field
|
|
2205
|
+
*/
|
|
2206
|
+
type: "tab"
|
|
2207
|
+
/**
|
|
2208
|
+
* Instructions for content editors
|
|
2209
|
+
*/
|
|
2210
|
+
instructions?: string
|
|
2211
|
+
/**
|
|
2212
|
+
* Whether the field is required
|
|
2213
|
+
*/
|
|
2214
|
+
required?: boolean | number
|
|
2215
|
+
/**
|
|
2216
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2217
|
+
*/
|
|
2218
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2219
|
+
/**
|
|
2220
|
+
* Wrapper element settings
|
|
2221
|
+
*/
|
|
2222
|
+
wrapper?: {
|
|
2223
|
+
/**
|
|
2224
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2225
|
+
*/
|
|
2226
|
+
width?: string
|
|
2227
|
+
/**
|
|
2228
|
+
* CSS class(es) for the field wrapper
|
|
2229
|
+
*/
|
|
2230
|
+
class?: string
|
|
2231
|
+
/**
|
|
2232
|
+
* HTML ID for the field wrapper
|
|
2233
|
+
*/
|
|
2234
|
+
id?: string
|
|
2235
|
+
}
|
|
2236
|
+
/**
|
|
2237
|
+
* Order of the field within its parent
|
|
2238
|
+
*/
|
|
2239
|
+
menu_order?: number
|
|
2240
|
+
/**
|
|
2241
|
+
* Parent field or field group key/ID
|
|
2242
|
+
*/
|
|
2243
|
+
parent?: string | number
|
|
2244
|
+
/**
|
|
2245
|
+
* Parent layout key for flexible content sub-fields
|
|
2246
|
+
*/
|
|
2247
|
+
parent_layout?: string
|
|
2248
|
+
/**
|
|
2249
|
+
* Tab placement position
|
|
2250
|
+
*/
|
|
2251
|
+
placement?: "top" | "left"
|
|
2252
|
+
endpoint?: Endpoint
|
|
2253
|
+
/**
|
|
2254
|
+
* Whether this tab is selected by default
|
|
2255
|
+
*/
|
|
2256
|
+
selected?: number
|
|
2257
|
+
}
|
|
2258
|
+
| {
|
|
2259
|
+
/**
|
|
2260
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2261
|
+
*/
|
|
2262
|
+
key: string
|
|
2263
|
+
/**
|
|
2264
|
+
* The label displayed for this field
|
|
2265
|
+
*/
|
|
2266
|
+
label: string
|
|
2267
|
+
/**
|
|
2268
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2269
|
+
*/
|
|
2270
|
+
name: string
|
|
2271
|
+
/**
|
|
2272
|
+
* Accessible label for screen readers
|
|
2273
|
+
*/
|
|
2274
|
+
"aria-label"?: string
|
|
2275
|
+
/**
|
|
2276
|
+
* The type of field
|
|
2277
|
+
*/
|
|
2278
|
+
type: "link"
|
|
2279
|
+
/**
|
|
2280
|
+
* Instructions for content editors
|
|
2281
|
+
*/
|
|
2282
|
+
instructions?: string
|
|
2283
|
+
/**
|
|
2284
|
+
* Whether the field is required
|
|
2285
|
+
*/
|
|
2286
|
+
required?: boolean | number
|
|
2287
|
+
/**
|
|
2288
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2289
|
+
*/
|
|
2290
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2291
|
+
/**
|
|
2292
|
+
* Wrapper element settings
|
|
2293
|
+
*/
|
|
2294
|
+
wrapper?: {
|
|
2295
|
+
/**
|
|
2296
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2297
|
+
*/
|
|
2298
|
+
width?: string
|
|
2299
|
+
/**
|
|
2300
|
+
* CSS class(es) for the field wrapper
|
|
2301
|
+
*/
|
|
2302
|
+
class?: string
|
|
2303
|
+
/**
|
|
2304
|
+
* HTML ID for the field wrapper
|
|
2305
|
+
*/
|
|
2306
|
+
id?: string
|
|
2307
|
+
}
|
|
2308
|
+
/**
|
|
2309
|
+
* Order of the field within its parent
|
|
2310
|
+
*/
|
|
2311
|
+
menu_order?: number
|
|
2312
|
+
/**
|
|
2313
|
+
* Parent field or field group key/ID
|
|
2314
|
+
*/
|
|
2315
|
+
parent?: string | number
|
|
2316
|
+
/**
|
|
2317
|
+
* Parent layout key for flexible content sub-fields
|
|
2318
|
+
*/
|
|
2319
|
+
parent_layout?: string
|
|
2320
|
+
/**
|
|
2321
|
+
* Value returned (array with url/title/target or just URL string)
|
|
2322
|
+
*/
|
|
2323
|
+
return_format?: "array" | "url"
|
|
2324
|
+
}
|
|
2325
|
+
| {
|
|
2326
|
+
/**
|
|
2327
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2328
|
+
*/
|
|
2329
|
+
key: string
|
|
2330
|
+
/**
|
|
2331
|
+
* The label displayed for this field
|
|
2332
|
+
*/
|
|
2333
|
+
label: string
|
|
2334
|
+
/**
|
|
2335
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2336
|
+
*/
|
|
2337
|
+
name: string
|
|
2338
|
+
/**
|
|
2339
|
+
* Accessible label for screen readers
|
|
2340
|
+
*/
|
|
2341
|
+
"aria-label"?: string
|
|
2342
|
+
/**
|
|
2343
|
+
* The type of field
|
|
2344
|
+
*/
|
|
2345
|
+
type: "page_link"
|
|
2346
|
+
/**
|
|
2347
|
+
* Instructions for content editors
|
|
2348
|
+
*/
|
|
2349
|
+
instructions?: string
|
|
2350
|
+
/**
|
|
2351
|
+
* Whether the field is required
|
|
2352
|
+
*/
|
|
2353
|
+
required?: boolean | number
|
|
2354
|
+
/**
|
|
2355
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2356
|
+
*/
|
|
2357
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2358
|
+
/**
|
|
2359
|
+
* Wrapper element settings
|
|
2360
|
+
*/
|
|
2361
|
+
wrapper?: {
|
|
2362
|
+
/**
|
|
2363
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2364
|
+
*/
|
|
2365
|
+
width?: string
|
|
2366
|
+
/**
|
|
2367
|
+
* CSS class(es) for the field wrapper
|
|
2368
|
+
*/
|
|
2369
|
+
class?: string
|
|
2370
|
+
/**
|
|
2371
|
+
* HTML ID for the field wrapper
|
|
2372
|
+
*/
|
|
2373
|
+
id?: string
|
|
2374
|
+
}
|
|
2375
|
+
/**
|
|
2376
|
+
* Order of the field within its parent
|
|
2377
|
+
*/
|
|
2378
|
+
menu_order?: number
|
|
2379
|
+
/**
|
|
2380
|
+
* Parent field or field group key/ID
|
|
2381
|
+
*/
|
|
2382
|
+
parent?: string | number
|
|
2383
|
+
/**
|
|
2384
|
+
* Parent layout key for flexible content sub-fields
|
|
2385
|
+
*/
|
|
2386
|
+
parent_layout?: string
|
|
2387
|
+
post_type?: PostType
|
|
2388
|
+
taxonomy?: TaxonomyFilter
|
|
2389
|
+
allow_null?: AllowNull
|
|
2390
|
+
multiple?: Multiple
|
|
2391
|
+
/**
|
|
2392
|
+
* Allow archive URLs to be selected (1 for yes, 0 for no)
|
|
2393
|
+
*/
|
|
2394
|
+
allow_archives?: number
|
|
2395
|
+
}
|
|
2396
|
+
| {
|
|
2397
|
+
/**
|
|
2398
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2399
|
+
*/
|
|
2400
|
+
key: string
|
|
2401
|
+
/**
|
|
2402
|
+
* The label displayed for this field
|
|
2403
|
+
*/
|
|
2404
|
+
label: string
|
|
2405
|
+
/**
|
|
2406
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2407
|
+
*/
|
|
2408
|
+
name: string
|
|
2409
|
+
/**
|
|
2410
|
+
* Accessible label for screen readers
|
|
2411
|
+
*/
|
|
2412
|
+
"aria-label"?: string
|
|
2413
|
+
/**
|
|
2414
|
+
* The type of field
|
|
2415
|
+
*/
|
|
2416
|
+
type: "post_object"
|
|
2417
|
+
/**
|
|
2418
|
+
* Instructions for content editors
|
|
2419
|
+
*/
|
|
2420
|
+
instructions?: string
|
|
2421
|
+
/**
|
|
2422
|
+
* Whether the field is required
|
|
2423
|
+
*/
|
|
2424
|
+
required?: boolean | number
|
|
2425
|
+
/**
|
|
2426
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2427
|
+
*/
|
|
2428
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2429
|
+
/**
|
|
2430
|
+
* Wrapper element settings
|
|
2431
|
+
*/
|
|
2432
|
+
wrapper?: {
|
|
2433
|
+
/**
|
|
2434
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2435
|
+
*/
|
|
2436
|
+
width?: string
|
|
2437
|
+
/**
|
|
2438
|
+
* CSS class(es) for the field wrapper
|
|
2439
|
+
*/
|
|
2440
|
+
class?: string
|
|
2441
|
+
/**
|
|
2442
|
+
* HTML ID for the field wrapper
|
|
2443
|
+
*/
|
|
2444
|
+
id?: string
|
|
2445
|
+
}
|
|
2446
|
+
/**
|
|
2447
|
+
* Order of the field within its parent
|
|
2448
|
+
*/
|
|
2449
|
+
menu_order?: number
|
|
2450
|
+
/**
|
|
2451
|
+
* Parent field or field group key/ID
|
|
2452
|
+
*/
|
|
2453
|
+
parent?: string | number
|
|
2454
|
+
/**
|
|
2455
|
+
* Parent layout key for flexible content sub-fields
|
|
2456
|
+
*/
|
|
2457
|
+
parent_layout?: string
|
|
2458
|
+
post_type?: PostType
|
|
2459
|
+
taxonomy?: TaxonomyFilter
|
|
2460
|
+
allow_null?: AllowNull
|
|
2461
|
+
multiple?: Multiple
|
|
2462
|
+
/**
|
|
2463
|
+
* Value returned (WP_Post object or post ID)
|
|
2464
|
+
*/
|
|
2465
|
+
return_format?: "object" | "id"
|
|
2466
|
+
/**
|
|
2467
|
+
* Use enhanced Select2 UI (1 for yes, 0 for no)
|
|
2468
|
+
*/
|
|
2469
|
+
ui?: number
|
|
2470
|
+
bidirectional_target?: BidirectionalTarget
|
|
2471
|
+
}
|
|
2472
|
+
| {
|
|
2473
|
+
/**
|
|
2474
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2475
|
+
*/
|
|
2476
|
+
key: string
|
|
2477
|
+
/**
|
|
2478
|
+
* The label displayed for this field
|
|
2479
|
+
*/
|
|
2480
|
+
label: string
|
|
2481
|
+
/**
|
|
2482
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2483
|
+
*/
|
|
2484
|
+
name: string
|
|
2485
|
+
/**
|
|
2486
|
+
* Accessible label for screen readers
|
|
2487
|
+
*/
|
|
2488
|
+
"aria-label"?: string
|
|
2489
|
+
/**
|
|
2490
|
+
* The type of field
|
|
2491
|
+
*/
|
|
2492
|
+
type: "relationship"
|
|
2493
|
+
/**
|
|
2494
|
+
* Instructions for content editors
|
|
2495
|
+
*/
|
|
2496
|
+
instructions?: string
|
|
2497
|
+
/**
|
|
2498
|
+
* Whether the field is required
|
|
2499
|
+
*/
|
|
2500
|
+
required?: boolean | number
|
|
2501
|
+
/**
|
|
2502
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2503
|
+
*/
|
|
2504
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2505
|
+
/**
|
|
2506
|
+
* Wrapper element settings
|
|
2507
|
+
*/
|
|
2508
|
+
wrapper?: {
|
|
2509
|
+
/**
|
|
2510
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2511
|
+
*/
|
|
2512
|
+
width?: string
|
|
2513
|
+
/**
|
|
2514
|
+
* CSS class(es) for the field wrapper
|
|
2515
|
+
*/
|
|
2516
|
+
class?: string
|
|
2517
|
+
/**
|
|
2518
|
+
* HTML ID for the field wrapper
|
|
2519
|
+
*/
|
|
2520
|
+
id?: string
|
|
2521
|
+
}
|
|
2522
|
+
/**
|
|
2523
|
+
* Order of the field within its parent
|
|
2524
|
+
*/
|
|
2525
|
+
menu_order?: number
|
|
2526
|
+
/**
|
|
2527
|
+
* Parent field or field group key/ID
|
|
2528
|
+
*/
|
|
2529
|
+
parent?: string | number
|
|
2530
|
+
/**
|
|
2531
|
+
* Parent layout key for flexible content sub-fields
|
|
2532
|
+
*/
|
|
2533
|
+
parent_layout?: string
|
|
2534
|
+
post_type?: PostType
|
|
2535
|
+
taxonomy?: TaxonomyFilter
|
|
2536
|
+
min?: Min
|
|
2537
|
+
max?: Max
|
|
2538
|
+
/**
|
|
2539
|
+
* Enabled filters for the relationship field UI
|
|
2540
|
+
*/
|
|
2541
|
+
filters?: unknown[]
|
|
2542
|
+
/**
|
|
2543
|
+
* Additional elements to display (e.g., 'featured_image')
|
|
2544
|
+
*/
|
|
2545
|
+
elements?: unknown[]
|
|
2546
|
+
/**
|
|
2547
|
+
* Value returned (WP_Post object or post ID)
|
|
2548
|
+
*/
|
|
2549
|
+
return_format?: "object" | "id"
|
|
2550
|
+
bidirectional_target?: BidirectionalTarget
|
|
2551
|
+
}
|
|
2552
|
+
| {
|
|
2553
|
+
/**
|
|
2554
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2555
|
+
*/
|
|
2556
|
+
key: string
|
|
2557
|
+
/**
|
|
2558
|
+
* The label displayed for this field
|
|
2559
|
+
*/
|
|
2560
|
+
label: string
|
|
2561
|
+
/**
|
|
2562
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2563
|
+
*/
|
|
2564
|
+
name: string
|
|
2565
|
+
/**
|
|
2566
|
+
* Accessible label for screen readers
|
|
2567
|
+
*/
|
|
2568
|
+
"aria-label"?: string
|
|
2569
|
+
/**
|
|
2570
|
+
* The type of field
|
|
2571
|
+
*/
|
|
2572
|
+
type: "taxonomy"
|
|
2573
|
+
/**
|
|
2574
|
+
* Instructions for content editors
|
|
2575
|
+
*/
|
|
2576
|
+
instructions?: string
|
|
2577
|
+
/**
|
|
2578
|
+
* Whether the field is required
|
|
2579
|
+
*/
|
|
2580
|
+
required?: boolean | number
|
|
2581
|
+
/**
|
|
2582
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2583
|
+
*/
|
|
2584
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2585
|
+
/**
|
|
2586
|
+
* Wrapper element settings
|
|
2587
|
+
*/
|
|
2588
|
+
wrapper?: {
|
|
2589
|
+
/**
|
|
2590
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2591
|
+
*/
|
|
2592
|
+
width?: string
|
|
2593
|
+
/**
|
|
2594
|
+
* CSS class(es) for the field wrapper
|
|
2595
|
+
*/
|
|
2596
|
+
class?: string
|
|
2597
|
+
/**
|
|
2598
|
+
* HTML ID for the field wrapper
|
|
2599
|
+
*/
|
|
2600
|
+
id?: string
|
|
2601
|
+
}
|
|
2602
|
+
/**
|
|
2603
|
+
* Order of the field within its parent
|
|
2604
|
+
*/
|
|
2605
|
+
menu_order?: number
|
|
2606
|
+
/**
|
|
2607
|
+
* Parent field or field group key/ID
|
|
2608
|
+
*/
|
|
2609
|
+
parent?: string | number
|
|
2610
|
+
/**
|
|
2611
|
+
* Parent layout key for flexible content sub-fields
|
|
2612
|
+
*/
|
|
2613
|
+
parent_layout?: string
|
|
2614
|
+
/**
|
|
2615
|
+
* The taxonomy to select terms from
|
|
2616
|
+
*/
|
|
2617
|
+
taxonomy?: string
|
|
2618
|
+
/**
|
|
2619
|
+
* UI type for term selection
|
|
2620
|
+
*/
|
|
2621
|
+
field_type?: "checkbox" | "multi_select" | "radio" | "select"
|
|
2622
|
+
multiple?: Multiple
|
|
2623
|
+
allow_null?: AllowNull
|
|
2624
|
+
/**
|
|
2625
|
+
* Value returned (WP_Term object or term ID)
|
|
2626
|
+
*/
|
|
2627
|
+
return_format?: "object" | "id"
|
|
2628
|
+
/**
|
|
2629
|
+
* Allow new terms to be created (1 for yes, 0 for no)
|
|
2630
|
+
*/
|
|
2631
|
+
add_term?: number
|
|
2632
|
+
/**
|
|
2633
|
+
* Load terms assigned to post (1 for yes, 0 for no)
|
|
2634
|
+
*/
|
|
2635
|
+
load_terms?: number
|
|
2636
|
+
/**
|
|
2637
|
+
* Connect selected terms to post (1 for yes, 0 for no)
|
|
2638
|
+
*/
|
|
2639
|
+
save_terms?: number
|
|
2640
|
+
bidirectional_target?: BidirectionalTarget
|
|
2641
|
+
}
|
|
2642
|
+
| {
|
|
2643
|
+
/**
|
|
2644
|
+
* Unique identifier for the field with field_ prefix (e.g. 'field_abc123')
|
|
2645
|
+
*/
|
|
2646
|
+
key: string
|
|
2647
|
+
/**
|
|
2648
|
+
* The label displayed for this field
|
|
2649
|
+
*/
|
|
2650
|
+
label: string
|
|
2651
|
+
/**
|
|
2652
|
+
* The field name/meta_key used to save and load data (empty for layout fields like tab, accordion)
|
|
2653
|
+
*/
|
|
2654
|
+
name: string
|
|
2655
|
+
/**
|
|
2656
|
+
* Accessible label for screen readers
|
|
2657
|
+
*/
|
|
2658
|
+
"aria-label"?: string
|
|
2659
|
+
/**
|
|
2660
|
+
* The type of field
|
|
2661
|
+
*/
|
|
2662
|
+
type: "user"
|
|
2663
|
+
/**
|
|
2664
|
+
* Instructions for content editors
|
|
2665
|
+
*/
|
|
2666
|
+
instructions?: string
|
|
2667
|
+
/**
|
|
2668
|
+
* Whether the field is required
|
|
2669
|
+
*/
|
|
2670
|
+
required?: boolean | number
|
|
2671
|
+
/**
|
|
2672
|
+
* Conditional logic rules for field visibility. False/0/empty string to disable, or array of rule groups.
|
|
2673
|
+
*/
|
|
2674
|
+
conditional_logic?: boolean | number | string | unknown[]
|
|
2675
|
+
/**
|
|
2676
|
+
* Wrapper element settings
|
|
2677
|
+
*/
|
|
2678
|
+
wrapper?: {
|
|
2679
|
+
/**
|
|
2680
|
+
* Width of the field wrapper (e.g. '50' for 50%)
|
|
2681
|
+
*/
|
|
2682
|
+
width?: string
|
|
2683
|
+
/**
|
|
2684
|
+
* CSS class(es) for the field wrapper
|
|
2685
|
+
*/
|
|
2686
|
+
class?: string
|
|
2687
|
+
/**
|
|
2688
|
+
* HTML ID for the field wrapper
|
|
2689
|
+
*/
|
|
2690
|
+
id?: string
|
|
2691
|
+
}
|
|
2692
|
+
/**
|
|
2693
|
+
* Order of the field within its parent
|
|
2694
|
+
*/
|
|
2695
|
+
menu_order?: number
|
|
2696
|
+
/**
|
|
2697
|
+
* Parent field or field group key/ID
|
|
2698
|
+
*/
|
|
2699
|
+
parent?: string | number
|
|
2700
|
+
/**
|
|
2701
|
+
* Parent layout key for flexible content sub-fields
|
|
2702
|
+
*/
|
|
2703
|
+
parent_layout?: string
|
|
2704
|
+
/**
|
|
2705
|
+
* Limit to specific user role (empty for all roles)
|
|
2706
|
+
*/
|
|
2707
|
+
role?: string
|
|
2708
|
+
multiple?: Multiple
|
|
2709
|
+
allow_null?: AllowNull
|
|
2710
|
+
/**
|
|
2711
|
+
* Value returned (WP_User object, or user ID)
|
|
2712
|
+
*/
|
|
2713
|
+
return_format?: "object" | "id"
|
|
2714
|
+
bidirectional_target?: BidirectionalTarget
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* Default value for the field
|
|
2719
|
+
*/
|
|
2720
|
+
type DefaultValue = string
|
|
2721
|
+
/**
|
|
2722
|
+
* Week start day (0 = Sunday, 1 = Monday, etc.)
|
|
2723
|
+
*/
|
|
2724
|
+
type FirstDay = number
|
|
2725
|
+
/**
|
|
2726
|
+
* Set current date/time as default value (1 for yes, 0 for no)
|
|
2727
|
+
*/
|
|
2728
|
+
type DefaultToCurrentDate = number
|
|
2729
|
+
/**
|
|
2730
|
+
* Placeholder text shown when field is empty
|
|
2731
|
+
*/
|
|
2732
|
+
type Placeholder = string
|
|
2733
|
+
/**
|
|
2734
|
+
* Text or HTML displayed before the input
|
|
2735
|
+
*/
|
|
2736
|
+
type Prepend = string
|
|
2737
|
+
/**
|
|
2738
|
+
* Text or HTML displayed after the input
|
|
2739
|
+
*/
|
|
2740
|
+
type Append = string
|
|
2741
|
+
/**
|
|
2742
|
+
* Default value for numeric fields (string for empty, number for value)
|
|
2743
|
+
*/
|
|
2744
|
+
type DefaultValueNumeric = string | number
|
|
2745
|
+
/**
|
|
2746
|
+
* Maximum character length (empty string for unlimited)
|
|
2747
|
+
*/
|
|
2748
|
+
type Maxlength = number | string
|
|
2749
|
+
/**
|
|
2750
|
+
* Number of rows for textarea display
|
|
2751
|
+
*/
|
|
2752
|
+
type Rows = number | string
|
|
2753
|
+
/**
|
|
2754
|
+
* How to handle new lines in output (wpautop, br, or none)
|
|
2755
|
+
*/
|
|
2756
|
+
type NewLines = "wpautop" | "br" | ""
|
|
2757
|
+
/**
|
|
2758
|
+
* Available choices as value:label pairs (object when populated, array when empty)
|
|
2759
|
+
*/
|
|
2760
|
+
type Choices =
|
|
2761
|
+
| Record<string, string>;
|
|
2762
|
+
/**
|
|
2763
|
+
* Value returned (value, label, or both as array)
|
|
2764
|
+
*/
|
|
2765
|
+
type ReturnFormatChoice = "value" | "label" | "array"
|
|
2766
|
+
/**
|
|
2767
|
+
* Allow a null/empty value to be selected (1 for yes, 0 for no)
|
|
2768
|
+
*/
|
|
2769
|
+
type AllowNull = number
|
|
2770
|
+
/**
|
|
2771
|
+
* Default value(s) for multi-select fields (string for single, array for multiple)
|
|
2772
|
+
*/
|
|
2773
|
+
type DefaultValueMulti = string | unknown[]
|
|
2774
|
+
/**
|
|
2775
|
+
* Layout direction for choices (default varies by field type)
|
|
2776
|
+
*/
|
|
2777
|
+
type LayoutChoice = "vertical" | "horizontal"
|
|
2778
|
+
/**
|
|
2779
|
+
* Allow multiple values to be selected (1 for yes, 0 for no)
|
|
2780
|
+
*/
|
|
2781
|
+
type Multiple = 1 | 0
|
|
2782
|
+
/**
|
|
2783
|
+
* How the media value is returned (array of data, URL string, or attachment ID)
|
|
2784
|
+
*/
|
|
2785
|
+
type ReturnFormatMedia = "id"
|
|
2786
|
+
/**
|
|
2787
|
+
* Media library source (all media or uploaded to current post only)
|
|
2788
|
+
*/
|
|
2789
|
+
type Library = "all" | "uploadedTo"
|
|
2790
|
+
/**
|
|
2791
|
+
* Minimum file size in MB (0 for no limit)
|
|
2792
|
+
*/
|
|
2793
|
+
type MinSize = number
|
|
2794
|
+
/**
|
|
2795
|
+
* Maximum file size in MB (0 for no limit)
|
|
2796
|
+
*/
|
|
2797
|
+
type MaxSize = number
|
|
2798
|
+
/**
|
|
2799
|
+
* Comma-separated list of allowed MIME types (e.g., 'image/png, image/jpeg')
|
|
2800
|
+
*/
|
|
2801
|
+
type MimeTypes = string
|
|
2802
|
+
/**
|
|
2803
|
+
* Image size for preview display in admin
|
|
2804
|
+
*/
|
|
2805
|
+
type PreviewSize = string
|
|
2806
|
+
/**
|
|
2807
|
+
* Minimum image width in pixels (0 for no limit)
|
|
2808
|
+
*/
|
|
2809
|
+
type MinWidth = number
|
|
2810
|
+
/**
|
|
2811
|
+
* Minimum image height in pixels (0 for no limit)
|
|
2812
|
+
*/
|
|
2813
|
+
type MinHeight = number
|
|
2814
|
+
/**
|
|
2815
|
+
* Maximum image width in pixels (0 for no limit)
|
|
2816
|
+
*/
|
|
2817
|
+
type MaxWidth = number
|
|
2818
|
+
/**
|
|
2819
|
+
* Maximum image height in pixels (0 for no limit)
|
|
2820
|
+
*/
|
|
2821
|
+
type MaxHeight = number
|
|
2822
|
+
/**
|
|
2823
|
+
* Minimum number of items required (0 for no minimum)
|
|
2824
|
+
*/
|
|
2825
|
+
type Min = number
|
|
2826
|
+
/**
|
|
2827
|
+
* Maximum number of items allowed (0 for no limit)
|
|
2828
|
+
*/
|
|
2829
|
+
type Max = number
|
|
2830
|
+
/**
|
|
2831
|
+
* Define an endpoint for the previous accordion/tab group
|
|
2832
|
+
*/
|
|
2833
|
+
type Endpoint = number
|
|
2834
|
+
/**
|
|
2835
|
+
* Nested fields within this field
|
|
2836
|
+
*/
|
|
2837
|
+
type SubFields = ACFField[]
|
|
2838
|
+
/**
|
|
2839
|
+
* Text label for the add row button
|
|
2840
|
+
*/
|
|
2841
|
+
type ButtonLabel = string
|
|
2842
|
+
/**
|
|
2843
|
+
* Limit selection to specific post types (empty for all)
|
|
2844
|
+
*/
|
|
2845
|
+
type PostType = unknown[]
|
|
2846
|
+
/**
|
|
2847
|
+
* Limit selection to posts with specific taxonomy terms
|
|
2848
|
+
*/
|
|
2849
|
+
type TaxonomyFilter = unknown[]
|
|
2850
|
+
/**
|
|
2851
|
+
* Target fields for bidirectional relationships
|
|
2852
|
+
*/
|
|
2853
|
+
type BidirectionalTarget = unknown[]
|