PluginProbe
Advanced Custom Fields (ACF®) / 6.8.7
Advanced Custom Fields (ACF®) v6.8.7
6.8.9 6.8.8 6.8.7 6.8.6 6.8.5 6.8.4 6.8.3 6.8.2 6.8.1 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 All 230 releases
advanced-custom-fields / schemas / fields / v1 / post_object.json
post_object.json
147 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "type": "object",
4 "additionalProperties": false,
5 "properties": {
6 "label": {
7 "type": "string",
8 "description": "The field label displayed in the edit screen",
9 "minLength": 1
10 },
11 "type": {
12 "type": "string",
13 "enum": [
14 "post_object"
15 ],
16 "description": "Field type identifier. Must be \"post_object\" for this field type."
17 },
18 "name": {
19 "type": "string",
20 "description": "The field name used to save/load data. Auto-generated from label if not provided.",
21 "pattern": "^[a-z_][a-z0-9_]*$"
22 },
23 "key": {
24 "type": "string",
25 "description": "Unique field key. Auto-generated if not provided.",
26 "pattern": "^field_[a-z0-9]+$"
27 },
28 "instructions": {
29 "type": "string",
30 "description": "Instructions displayed to editors below the field label"
31 },
32 "required": {
33 "type": "boolean",
34 "description": "Whether this field is required",
35 "default": false
36 },
37 "conditional_logic": {
38 "type": [
39 "boolean",
40 "array"
41 ],
42 "description": "Conditional logic rules. Set to false to disable, or provide rules array.",
43 "default": false
44 },
45 "wrapper": {
46 "type": "object",
47 "description": "HTML wrapper attributes",
48 "properties": {
49 "width": {
50 "type": "string",
51 "description": "Width percentage (e.g., \"50\")"
52 },
53 "class": {
54 "type": "string",
55 "description": "Custom CSS classes"
56 },
57 "id": {
58 "type": "string",
59 "description": "Custom HTML ID"
60 }
61 }
62 },
63 "default_value": {
64 "type": [
65 "string",
66 "number",
67 "boolean",
68 "null"
69 ],
70 "description": "Default value when creating new content"
71 },
72 "placeholder": {
73 "type": "string",
74 "description": "Placeholder text shown in empty fields"
75 },
76 "prepend": {
77 "type": "string",
78 "description": "Text to prepend before the input"
79 },
80 "append": {
81 "type": "string",
82 "description": "Text to append after the input"
83 },
84 "maxlength": {
85 "type": "integer",
86 "description": "Maximum character length (if applicable)",
87 "minimum": 1
88 },
89 "allow_in_bindings": {
90 "type": "boolean",
91 "description": "Whether this field can be used in block bindings",
92 "default": false
93 },
94 "post_type": {
95 "type": "array",
96 "description": "Array of post types to query (e.g., [\"post\", \"page\"]). Leave empty for all post types.",
97 "items": {
98 "type": "string"
99 },
100 "default": []
101 },
102 "taxonomy": {
103 "type": "array",
104 "description": "Array of taxonomy terms to filter by (e.g., [\"category:news\", \"post_tag:featured\"])",
105 "items": {
106 "type": "string"
107 },
108 "default": []
109 },
110 "allow_null": {
111 "type": "boolean",
112 "description": "Allow a null (empty) value to be selected",
113 "default": false
114 },
115 "multiple": {
116 "type": "boolean",
117 "description": "Allow multiple values to be selected",
118 "default": false
119 },
120 "return_format": {
121 "type": "string",
122 "description": "Format of returned value",
123 "enum": [
124 "object",
125 "id"
126 ],
127 "default": "object"
128 },
129 "ui": {
130 "type": "boolean",
131 "description": "Use enhanced Select2 UI",
132 "default": true
133 },
134 "bidirectional_target": {
135 "type": "array",
136 "description": "Array of field keys for bidirectional relationships",
137 "items": {
138 "type": "string"
139 },
140 "default": []
141 }
142 },
143 "required": [
144 "label",
145 "type"
146 ]
147 }