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