nextpress-core 1.0.0 → 1.0.1

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