PluginProbe ʕ •ᴥ•ʔ
Advanced Custom Fields (ACF®) / 6.8.9
Advanced Custom Fields (ACF®) v6.8.9
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 6.0.1 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.1.0 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.2.0 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.6.1 6.2.7 6.2.8 6.2.9 6.3.0 6.3.1 6.3.10.2 6.3.11 6.3.12 6.3.2 6.3.3 6.3.4 6.3.5 6.3.6 6.3.6.1 6.4.0 6.4.0.1 6.4.1 6.4.2 6.4.3 6.5.0 6.5.1 6.6.0 6.6.1 6.6.2 6.7.0 6.7.1 6.7.2 6.8.0 trunk 1.0.0 1.0.2 1.0.3 1.0.5 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1.1 2.1.3 2.1.4 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.6 3.0.7 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.8 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.8 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.4.10 4.4.11 4.4.12 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 5.10 5.10.1 5.10.2 5.11 5.11.1 5.11.2 5.11.3 5.11.4 5.12 5.12.1 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.6.10 5.6.2 5.6.3 5.6.4 5.6.5 5.6.6 5.6.7 5.6.8 5.6.9 5.7.0 5.7.1 5.7.10 5.7.12 5.7.13 5.7.2 5.7.3 5.7.4 5.7.5 5.7.6 5.7.7 5.7.8 5.7.9 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.2 5.8.3 5.8.4
advanced-custom-fields / includes / admin / views / acf-taxonomy / advanced-settings.php
advanced-custom-fields / includes / admin / views / acf-taxonomy Last commit date
advanced-settings.php 6 months ago basic-settings.php 6 months ago index.php 2 years ago list-empty.php 6 months ago
advanced-settings.php
1258 lines
1 <?php
2 /**
3 * @package ACF
4 * @author WP Engine
5 *
6 * © 2026 Advanced Custom Fields (ACF®). All rights reserved.
7 * "ACF" is a trademark of WP Engine.
8 * Licensed under the GNU General Public License v2 or later.
9 * https://www.gnu.org/licenses/gpl-2.0.html
10 */
11
12 global $acf_taxonomy;
13
14 foreach ( acf_get_combined_taxonomy_settings_tabs() as $tab_key => $tab_label ) {
15 acf_render_field_wrap(
16 array(
17 'type' => 'tab',
18 'label' => $tab_label,
19 'key' => 'acf_taxonomy_tabs',
20 )
21 );
22
23 $wrapper_class = str_replace( '_', '-', $tab_key );
24
25 echo '<div class="acf-taxonomy-advanced-settings acf-taxonomy-' . esc_attr( $wrapper_class ) . '-settings">';
26
27 switch ( $tab_key ) {
28 case 'general':
29 acf_render_field_wrap(
30 array(
31 'type' => 'true_false',
32 'key' => 'sort',
33 'name' => 'sort',
34 'prefix' => 'acf_taxonomy',
35 'value' => $acf_taxonomy['sort'],
36 'label' => __( 'Sort Terms', 'acf' ),
37 'instructions' => __( 'Whether terms in this taxonomy should be sorted in the order they are provided to `wp_set_object_terms()`.', 'acf' ),
38 'ui' => true,
39 )
40 );
41
42 acf_render_field_wrap(
43 array(
44 'type' => 'true_false',
45 'key' => 'default_term_enabled',
46 'name' => 'default_term_enabled',
47 'prefix' => 'acf_taxonomy[default_term]',
48 'value' => $acf_taxonomy['default_term']['default_term_enabled'],
49 'label' => __( 'Default Term', 'acf' ),
50 'instructions' => __( 'Create a term for the taxonomy that cannot be deleted. It will not be selected for posts by default.', 'acf' ),
51 'ui' => true,
52 )
53 );
54 ?>
55
56 <?php
57 acf_render_field_wrap(
58 array(
59 'type' => 'text',
60 'name' => 'default_term_name',
61 'key' => 'default_term_name',
62 'prefix' => 'acf_taxonomy[default_term]',
63 'value' => isset( $acf_taxonomy['default_term']['default_term_name'] ) ? $acf_taxonomy['default_term']['default_term_name'] : '',
64 'label' => __( 'Term Name', 'acf' ),
65 'instructions' => __( 'The name of the default term.', 'acf' ),
66 'required' => 1,
67 'conditions' => array(
68 'field' => 'default_term_enabled',
69 'operator' => '==',
70 'value' => '1',
71 ),
72 ),
73 'div',
74 'field'
75 );
76
77 acf_render_field_wrap(
78 array(
79 'type' => 'text',
80 'name' => 'default_term_slug',
81 'key' => 'default_term_slug',
82 'prefix' => 'acf_taxonomy[default_term]',
83 'value' => isset( $acf_taxonomy['default_term']['default_term_slug'] ) ? $acf_taxonomy['default_term']['default_term_slug'] : '',
84 'label' => __( 'Term Slug', 'acf' ),
85 'instructions' => __( 'Single word, no spaces. Underscores and dashes allowed.', 'acf' ),
86 'conditions' => array(
87 'field' => 'default_term_enabled',
88 'operator' => '==',
89 'value' => '1',
90 ),
91 ),
92 'div',
93 'field'
94 );
95
96 acf_render_field_wrap(
97 array(
98 'type' => 'text',
99 'name' => 'description',
100 'key' => 'default_term_description',
101 'prefix' => 'acf_taxonomy[default_term]',
102 'value' => isset( $acf_taxonomy['default_term']['default_term_description'] ) ? $acf_taxonomy['default_term']['default_term_description'] : '',
103 'label' => __( 'Term Description', 'acf' ),
104 'instructions' => __( 'A descriptive summary of the term.', 'acf' ),
105 'conditions' => array(
106 'field' => 'default_term_enabled',
107 'operator' => '==',
108 'value' => '1',
109 ),
110 ),
111 'div',
112 'field'
113 );
114
115 acf_render_field_wrap( array( 'type' => 'seperator' ) );
116
117 acf_render_field_wrap(
118 array(
119 'type' => 'text',
120 'name' => 'description',
121 'prefix' => 'acf_taxonomy',
122 'value' => $acf_taxonomy['description'],
123 'label' => __( 'Description', 'acf' ),
124 'instructions' => __( 'A descriptive summary of the taxonomy.', 'acf' ),
125 ),
126 'div',
127 'field'
128 );
129
130 acf_render_field_wrap( array( 'type' => 'seperator' ) );
131
132 acf_render_field_wrap(
133 array(
134 'type' => 'true_false',
135 'name' => 'active',
136 'key' => 'active',
137 'prefix' => 'acf_taxonomy',
138 'value' => $acf_taxonomy['active'],
139 'label' => __( 'Active', 'acf' ),
140 'instructions' => __( 'Active taxonomies are enabled and registered with WordPress.', 'acf' ),
141 'ui' => true,
142 'default' => 1,
143 )
144 );
145
146 break;
147 case 'labels':
148 echo '<div class="acf-field acf-regenerate-labels-bar">';
149 echo '<span class="acf-btn acf-btn-sm acf-btn-clear acf-regenerate-labels"><i class="acf-icon acf-icon-regenerate"></i>' . esc_html__( 'Regenerate', 'acf' ) . '</span>';
150 echo '<span class="acf-btn acf-btn-sm acf-btn-clear acf-clear-labels"><i class="acf-icon acf-icon-trash"></i>' . esc_html__( 'Clear', 'acf' ) . '</span>';
151 echo '<span class="acf-tip acf-labels-tip"><i class="acf-icon acf-icon-help acf-js-tooltip" title="' . esc_attr__( 'Regenerate all labels using the Singular and Plural labels', 'acf' ) . '"></i></span>';
152 echo '</div>';
153
154 acf_render_field_wrap(
155 array(
156 'type' => 'text',
157 'key' => 'menu_name',
158 'name' => 'menu_name',
159 'prefix' => 'acf_taxonomy[labels]',
160 'value' => $acf_taxonomy['labels']['menu_name'],
161 'data' => array(
162 /* translators: %s Plural form of taxonomy name */
163 'label' => '%s',
164 'replace' => 'plural',
165 ),
166 'label' => __( 'Menu Label', 'acf' ),
167 'instructions' => __( 'Assigns the menu name text.', 'acf' ),
168 'placeholder' => __( 'Tags', 'acf' ),
169 ),
170 'div',
171 'field'
172 );
173
174 acf_render_field_wrap(
175 array(
176 'type' => 'text',
177 'name' => 'all_items',
178 'prefix' => 'acf_taxonomy[labels]',
179 'value' => $acf_taxonomy['labels']['all_items'],
180 'data' => array(
181 /* translators: %s Plural form of taxonomy name */
182 'label' => __( 'All %s', 'acf' ),
183 'replace' => 'plural',
184 ),
185 'label' => __( 'All Items', 'acf' ),
186 'instructions' => __( 'Assigns the all items text.', 'acf' ),
187 'placeholder' => __( 'All Tags', 'acf' ),
188 ),
189 'div',
190 'field'
191 );
192
193 acf_render_field_wrap(
194 array(
195 'type' => 'text',
196 'key' => 'edit_item',
197 'name' => 'edit_item',
198 'prefix' => 'acf_taxonomy[labels]',
199 'value' => $acf_taxonomy['labels']['edit_item'],
200 'data' => array(
201 /* translators: %s Singular form of taxonomy name */
202 'label' => __( 'Edit %s', 'acf' ),
203 'replace' => 'singular',
204 ),
205 'label' => __( 'Edit Item', 'acf' ),
206 'instructions' => __( 'At the top of the editor screen when editing a term.', 'acf' ),
207 'placeholder' => __( 'Edit Tag', 'acf' ),
208 ),
209 'div',
210 'field'
211 );
212
213 acf_render_field_wrap(
214 array(
215 'type' => 'text',
216 'key' => 'view_item',
217 'name' => 'view_item',
218 'prefix' => 'acf_taxonomy[labels]',
219 'value' => $acf_taxonomy['labels']['view_item'],
220 'data' => array(
221 /* translators: %s Singular form of taxonomy name */
222 'label' => __( 'View %s', 'acf' ),
223 'replace' => 'singular',
224 ),
225 'label' => __( 'View Item', 'acf' ),
226 'instructions' => __( 'In the admin bar to view term during editing.', 'acf' ),
227 'placeholder' => __( 'View Tag', 'acf' ),
228 ),
229 'div',
230 'field'
231 );
232
233 acf_render_field_wrap(
234 array(
235 'type' => 'text',
236 'key' => 'update_item',
237 'name' => 'update_item',
238 'prefix' => 'acf_taxonomy[labels]',
239 'value' => $acf_taxonomy['labels']['update_item'],
240 'data' => array(
241 /* translators: %s Singular form of taxonomy name */
242 'label' => __( 'Update %s', 'acf' ),
243 'replace' => 'singular',
244 ),
245 'label' => __( 'Update Item', 'acf' ),
246 'instructions' => __( 'Assigns the update item text.', 'acf' ),
247 'placeholder' => __( 'Update Tag', 'acf' ),
248 ),
249 'div',
250 'field'
251 );
252
253 acf_render_field_wrap(
254 array(
255 'type' => 'text',
256 'key' => 'add_new_item',
257 'name' => 'add_new_item',
258 'prefix' => 'acf_taxonomy[labels]',
259 'value' => $acf_taxonomy['labels']['add_new_item'],
260 'data' => array(
261 /* translators: %s Singular form of taxonomy name */
262 'label' => __( 'Add New %s', 'acf' ),
263 'replace' => 'singular',
264 ),
265 'label' => __( 'Add New Item', 'acf' ),
266 'instructions' => __( 'Assigns the add new item text.', 'acf' ),
267 'placeholder' => __( 'Add New Tag', 'acf' ),
268 ),
269 'div',
270 'field'
271 );
272
273 acf_render_field_wrap(
274 array(
275 'type' => 'text',
276 'key' => 'new_item_name',
277 'name' => 'new_item_name',
278 'prefix' => 'acf_taxonomy[labels]',
279 'value' => $acf_taxonomy['labels']['new_item_name'],
280 'data' => array(
281 /* translators: %s Singular form of taxonomy name */
282 'label' => __( 'New %s Name', 'acf' ),
283 'replace' => 'singular',
284 ),
285 'label' => __( 'New Item Name', 'acf' ),
286 'instructions' => __( 'Assigns the new item name text.', 'acf' ),
287 'placeholder' => __( 'New Tag Name', 'acf' ),
288 ),
289 'div',
290 'field'
291 );
292
293 acf_render_field_wrap(
294 array(
295 'type' => 'text',
296 'key' => 'parent_item',
297 'name' => 'parent_item',
298 'prefix' => 'acf_taxonomy[labels]',
299 'value' => isset( $acf_taxonomy['labels']['parent_item'] ) ? $acf_taxonomy['labels']['parent_item'] : '',
300 'data' => array(
301 /* translators: %s Singular form of taxonomy name */
302 'label' => __( 'Parent %s', 'acf' ),
303 'replace' => 'singular',
304 ),
305 'label' => __( 'Parent Item', 'acf' ),
306 'instructions' => __( 'Assigns parent item text. Only used on hierarchical taxonomies.', 'acf' ),
307 'placeholder' => __( 'Parent Category', 'acf' ),
308 'conditions' => array(
309 'field' => 'hierarchical',
310 'operator' => '==',
311 'value' => '1',
312 ),
313 ),
314 'div',
315 'field'
316 );
317
318 acf_render_field_wrap(
319 array(
320 'type' => 'text',
321 'key' => 'parent_item_colon',
322 'name' => 'parent_item_colon',
323 'prefix' => 'acf_taxonomy[labels]',
324 'value' => isset( $acf_taxonomy['labels']['parent_item_colon'] ) ? $acf_taxonomy['labels']['parent_item_colon'] : '',
325 'data' => array(
326 /* translators: %s Singular form of taxonomy name */
327 'label' => __( 'Parent %s:', 'acf' ),
328 'replace' => 'singular',
329 ),
330 'label' => __( 'Parent Item With Colon', 'acf' ),
331 'instructions' => __( 'Assigns parent item text, but with a colon (:) added to the end.', 'acf' ),
332 'placeholder' => __( 'Parent Category:', 'acf' ),
333 'conditions' => array(
334 'field' => 'hierarchical',
335 'operator' => '==',
336 'value' => '1',
337 ),
338 ),
339 'div',
340 'field'
341 );
342
343 acf_render_field_wrap(
344 array(
345 'type' => 'text',
346 'name' => 'search_items',
347 'prefix' => 'acf_taxonomy[labels]',
348 'value' => $acf_taxonomy['labels']['search_items'],
349 'data' => array(
350 /* translators: %s Plural form of taxonomy name */
351 'label' => __( 'Search %s', 'acf' ),
352 'replace' => 'plural',
353 ),
354 'label' => __( 'Search Items', 'acf' ),
355 'instructions' => __( 'Assigns search items text.', 'acf' ),
356 'placeholder' => __( 'Search Tags', 'acf' ),
357 ),
358 'div',
359 'field'
360 );
361
362 acf_render_field_wrap(
363 array(
364 'type' => 'text',
365 'name' => 'popular_items',
366 'prefix' => 'acf_taxonomy[labels]',
367 'value' => isset( $acf_taxonomy['labels']['popular_items'] ) ? $acf_taxonomy['labels']['popular_items'] : '',
368 'data' => array(
369 /* translators: %s Plural form of taxonomy name */
370 'label' => __( 'Popular %s', 'acf' ),
371 'replace' => 'plural',
372 ),
373 'label' => __( 'Popular Items', 'acf' ),
374 'instructions' => __( 'Assigns popular items text. Only used for non-hierarchical taxonomies.', 'acf' ),
375 'placeholder' => __( 'Popular Tags', 'acf' ),
376 'conditions' => array(
377 'field' => 'hierarchical',
378 'operator' => '==',
379 'value' => '0',
380 ),
381 ),
382 'div',
383 'field'
384 );
385
386 acf_render_field_wrap(
387 array(
388 'type' => 'text',
389 'key' => 'separate_items_with_commas',
390 'name' => 'separate_items_with_commas',
391 'prefix' => 'acf_taxonomy[labels]',
392 'value' => isset( $acf_taxonomy['labels']['separate_items_with_commas'] ) ? $acf_taxonomy['labels']['separate_items_with_commas'] : '',
393 'data' => array(
394 /* translators: %s Plural form of taxonomy name */
395 'label' => __( 'Separate %s with commas', 'acf' ),
396 'replace' => 'plural',
397 'transform' => 'lower',
398 ),
399 'label' => __( 'Separate Items With Commas', 'acf' ),
400 'instructions' => __( 'Assigns the separate item with commas text used in the taxonomy meta box. Only used on non-hierarchical taxonomies.', 'acf' ),
401 'placeholder' => __( 'Separate tags with commas', 'acf' ),
402 'conditions' => array(
403 'field' => 'hierarchical',
404 'operator' => '==',
405 'value' => '0',
406 ),
407 ),
408 'div',
409 'field'
410 );
411
412 acf_render_field_wrap(
413 array(
414 'type' => 'text',
415 'key' => 'add_or_remove_items',
416 'name' => 'add_or_remove_items',
417 'prefix' => 'acf_taxonomy[labels]',
418 'value' => isset( $acf_taxonomy['labels']['add_or_remove_items'] ) ? $acf_taxonomy['labels']['add_or_remove_items'] : '',
419 'data' => array(
420 /* translators: %s Plural form of taxonomy name */
421 'label' => __( 'Add or remove %s', 'acf' ),
422 'replace' => 'plural',
423 'transform' => 'lower',
424 ),
425 'label' => __( 'Add Or Remove Items', 'acf' ),
426 'instructions' => __( 'Assigns the add or remove items text used in the meta box when JavaScript is disabled. Only used on non-hierarchical taxonomies', 'acf' ),
427 'placeholder' => __( 'Add or remove tags', 'acf' ),
428 'conditions' => array(
429 'field' => 'hierarchical',
430 'operator' => '==',
431 'value' => '0',
432 ),
433 ),
434 'div',
435 'field'
436 );
437
438 acf_render_field_wrap(
439 array(
440 'type' => 'text',
441 'key' => 'choose_from_most_used',
442 'name' => 'choose_from_most_used',
443 'prefix' => 'acf_taxonomy[labels]',
444 'value' => isset( $acf_taxonomy['labels']['choose_from_most_used'] ) ? $acf_taxonomy['labels']['choose_from_most_used'] : '',
445 'data' => array(
446 /* translators: %s Plural form of taxonomy name */
447 'label' => __( 'Choose from the most used %s', 'acf' ),
448 'replace' => 'plural',
449 'transform' => 'lower',
450 ),
451 'label' => __( 'Choose From Most Used', 'acf' ),
452 'instructions' => __( "Assigns the 'choose from most used' text used in the meta box when JavaScript is disabled. Only used on non-hierarchical taxonomies.", 'acf' ),
453 'placeholder' => __( 'Choose from the most used tags', 'acf' ),
454 'conditions' => array(
455 'field' => 'hierarchical',
456 'operator' => '==',
457 'value' => '0',
458 ),
459 ),
460 'div',
461 'field'
462 );
463
464 acf_render_field_wrap(
465 array(
466 'type' => 'text',
467 'key' => 'most_used',
468 'name' => 'most_used',
469 'prefix' => 'acf_taxonomy[labels]',
470 'value' => $acf_taxonomy['labels']['most_used'],
471 'label' => __( 'Most Used', 'acf' ),
472 'instructions' => __( 'Assigns text to the Title field of the Most Used tab.', 'acf' ),
473 'default' => __( 'Most Used', 'acf' ),
474 'placeholder' => __( 'Most Used', 'acf' ),
475 ),
476 'div',
477 'field'
478 );
479
480 acf_render_field_wrap(
481 array(
482 'type' => 'text',
483 'key' => 'not_found',
484 'name' => 'not_found',
485 'prefix' => 'acf_taxonomy[labels]',
486 'value' => $acf_taxonomy['labels']['not_found'],
487 'data' => array(
488 /* translators: %s Plural form of taxonomy name */
489 'label' => __( 'No %s found', 'acf' ),
490 'replace' => 'plural',
491 'transform' => 'lower',
492 ),
493 'label' => __( 'Not Found', 'acf' ),
494 'instructions' => __( "Assigns the text displayed when clicking the 'choose from most used' text in the taxonomy meta box when no tags are available, and assigns the text used in the terms list table when there are no items for a taxonomy.", 'acf' ),
495 'placeholder' => __( 'No tags found', 'acf' ),
496 ),
497 'div',
498 'field'
499 );
500
501 acf_render_field_wrap(
502 array(
503 'type' => 'text',
504 'key' => 'no_terms',
505 'name' => 'no_terms',
506 'prefix' => 'acf_taxonomy[labels]',
507 'value' => $acf_taxonomy['labels']['no_terms'],
508 'data' => array(
509 /* translators: %s Plural form of taxonomy name */
510 'label' => __( 'No %s', 'acf' ),
511 'replace' => 'plural',
512 'transform' => 'lower',
513 ),
514 'label' => __( 'No Terms', 'acf' ),
515 'instructions' => __( 'Assigns the text displayed in the posts and media list tables when no tags or categories are available.', 'acf' ),
516 'placeholder' => __( 'No tags', 'acf' ),
517 ),
518 'div',
519 'field'
520 );
521
522 acf_render_field_wrap(
523 array(
524 'type' => 'text',
525 'key' => 'name_field_description',
526 'name' => 'name_field_description',
527 'prefix' => 'acf_taxonomy[labels]',
528 'value' => $acf_taxonomy['labels']['name_field_description'],
529 'label' => __( 'Name Field Description', 'acf' ),
530 'instructions' => __( 'Describes the Name field on the Edit Tags screen.', 'acf' ),
531 'placeholder' => __( 'The name is how it appears on your site', 'acf' ),
532 'default' => __( 'The name is how it appears on your site', 'acf' ),
533 ),
534 'div',
535 'field'
536 );
537
538 acf_render_field_wrap(
539 array(
540 'type' => 'textarea',
541 'key' => 'slug_field_description',
542 'name' => 'slug_field_description',
543 'prefix' => 'acf_taxonomy[labels]',
544 'value' => $acf_taxonomy['labels']['slug_field_description'],
545 'label' => __( 'Slug Field Description', 'acf' ),
546 'instructions' => __( 'Describes the Slug field on the Edit Tags screen.', 'acf' ),
547 'placeholder' => __( 'The "slug" is the URL-friendly version of the name. It is usually all lower case and contains only letters, numbers, and hyphens.', 'acf' ),
548 'default' => __( 'The "slug" is the URL-friendly version of the name. It is usually all lower case and contains only letters, numbers, and hyphens.', 'acf' ),
549 ),
550 'div',
551 'field'
552 );
553
554 acf_render_field_wrap(
555 array(
556 'type' => 'text',
557 'key' => 'parent_field_description',
558 'name' => 'parent_field_description',
559 'prefix' => 'acf_taxonomy[labels]',
560 'value' => isset( $acf_taxonomy['labels']['parent_field_description'] ) ? $acf_taxonomy['labels']['parent_field_description'] : '',
561 'label' => __( 'Parent Field Description', 'acf' ),
562 'instructions' => __( 'Describes the Parent field on the Edit Tags screen.', 'acf' ),
563 'placeholder' => __( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band', 'acf' ),
564 'default' => __( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band', 'acf' ),
565 'conditions' => array(
566 'field' => 'hierarchical',
567 'operator' => '==',
568 'value' => '1',
569 ),
570 ),
571 'div',
572 'field'
573 );
574
575 acf_render_field_wrap(
576 array(
577 'type' => 'text',
578 'key' => 'desc_field_description',
579 'name' => 'desc_field_description',
580 'prefix' => 'acf_taxonomy[labels]',
581 'value' => $acf_taxonomy['labels']['desc_field_description'],
582 'label' => __( 'Description Field Description', 'acf' ),
583 'instructions' => __( 'Describes the Description field on the Edit Tags screen.', 'acf' ),
584 'placeholder' => __( 'The description is not prominent by default; however, some themes may show it.', 'acf' ),
585 'default' => __( 'The description is not prominent by default; however, some themes may show it.', 'acf' ),
586 ),
587 'div',
588 'field'
589 );
590
591 acf_render_field_wrap(
592 array(
593 'type' => 'text',
594 'key' => 'filter_by_item',
595 'name' => 'filter_by_item',
596 'prefix' => 'acf_taxonomy[labels]',
597 'value' => isset( $acf_taxonomy['labels']['filter_by_item'] ) ? $acf_taxonomy['labels']['filter_by_item'] : '',
598 'data' => array(
599 /* translators: %s Singular form of taxonomy name */
600 'label' => __( 'Filter by %s', 'acf' ),
601 'replace' => 'singular',
602 'transform' => 'lower',
603 ),
604 'label' => __( 'Filter By Item', 'acf' ),
605 'instructions' => __( 'Assigns text to the filter button in the posts lists table.', 'acf' ),
606 'placeholder' => __( 'Filter by category', 'acf' ),
607 'conditions' => array(
608 'field' => 'hierarchical',
609 'operator' => '==',
610 'value' => '1',
611 ),
612 ),
613 'div',
614 'field'
615 );
616
617 acf_render_field_wrap(
618 array(
619 'type' => 'text',
620 'key' => 'items_list_navigation',
621 'name' => 'items_list_navigation',
622 'prefix' => 'acf_taxonomy[labels]',
623 'value' => $acf_taxonomy['labels']['items_list_navigation'],
624 'data' => array(
625 /* translators: %s Plural form of taxonomy name */
626 'label' => __( '%s list navigation', 'acf' ),
627 'replace' => 'plural',
628 ),
629 'label' => __( 'Items List Navigation', 'acf' ),
630 'instructions' => __( 'Assigns text to the table pagination hidden heading.', 'acf' ),
631 'placeholder' => __( 'Tags list navigation', 'acf' ),
632 ),
633 'div',
634 'field'
635 );
636
637 acf_render_field_wrap(
638 array(
639 'type' => 'text',
640 'key' => 'items_list',
641 'name' => 'items_list',
642 'prefix' => 'acf_taxonomy[labels]',
643 'value' => $acf_taxonomy['labels']['items_list'],
644 'data' => array(
645 /* translators: %s Plural form of taxonomy name */
646 'label' => __( '%s list', 'acf' ),
647 'replace' => 'plural',
648 ),
649 'label' => __( 'Items List', 'acf' ),
650 'instructions' => __( 'Assigns text to the table hidden heading.', 'acf' ),
651 'placeholder' => __( 'Tags list', 'acf' ),
652 ),
653 'div',
654 'field'
655 );
656
657 acf_render_field_wrap(
658 array(
659 'type' => 'text',
660 'key' => 'back_to_items',
661 'name' => 'back_to_items',
662 'prefix' => 'acf_taxonomy[labels]',
663 'value' => $acf_taxonomy['labels']['back_to_items'],
664 'data' => array(
665 /* translators: %s Plural form of taxonomy name */
666 'label' => __( '← Go to %s', 'acf' ),
667 'replace' => 'plural',
668 'transform' => 'lower',
669 ),
670 'label' => __( 'Back To Items', 'acf' ),
671 'instructions' => __( 'Assigns the text used to link back to the main index after updating a term.', 'acf' ),
672 'placeholder' => __( '← Go to tags', 'acf' ),
673 ),
674 'div',
675 'field'
676 );
677
678 acf_render_field_wrap(
679 array(
680 'type' => 'text',
681 'key' => 'item_link',
682 'name' => 'item_link',
683 'prefix' => 'acf_taxonomy[labels]',
684 'value' => $acf_taxonomy['labels']['item_link'],
685 'data' => array(
686 /* translators: %s Singular form of taxonomy name */
687 'label' => __( '%s Link', 'acf' ),
688 'replace' => 'singular',
689 ),
690 'label' => __( 'Item Link', 'acf' ),
691 'instructions' => __( 'Assigns a title for navigation link block variation used in the block editor.', 'acf' ),
692 'placeholder' => __( 'Tag Link', 'acf' ),
693 ),
694 'div',
695 'field'
696 );
697
698 acf_render_field_wrap(
699 array(
700 'type' => 'text',
701 'key' => 'item_link_description',
702 'name' => 'item_link_description',
703 'prefix' => 'acf_taxonomy[labels]',
704 'value' => $acf_taxonomy['labels']['item_link_description'],
705 'data' => array(
706 /* translators: %s Singular form of taxonomy name */
707 'label' => __( 'A link to a %s', 'acf' ),
708 'replace' => 'singular',
709 'transform' => 'lower',
710 ),
711 'label' => __( 'Item Link Description', 'acf' ),
712 'instructions' => __( 'Describes a navigation link block variation used in the block editor.', 'acf' ),
713 'placeholder' => __( 'A link to a tag', 'acf' ),
714 ),
715 'div',
716 'field'
717 );
718 break;
719 case 'visibility':
720 acf_render_field_wrap(
721 array(
722 'type' => 'true_false',
723 'key' => 'show_ui',
724 'name' => 'show_ui',
725 'prefix' => 'acf_taxonomy',
726 'value' => $acf_taxonomy['show_ui'],
727 'label' => __( 'Show In UI', 'acf' ),
728 'instructions' => __( 'Items can be edited and managed in the admin dashboard.', 'acf' ),
729 'default' => 1,
730 'ui' => true,
731 ),
732 'div'
733 );
734
735 acf_render_field_wrap(
736 array(
737 'type' => 'true_false',
738 'key' => 'show_in_menu',
739 'name' => 'show_in_menu',
740 'prefix' => 'acf_taxonomy',
741 'value' => $acf_taxonomy['show_in_menu'],
742 'label' => __( 'Show In Admin Menu', 'acf' ),
743 'instructions' => __( 'Admin editor navigation in the sidebar menu.', 'acf' ),
744 'default' => 1,
745 'ui' => true,
746 'conditions' => array(
747 'field' => 'show_ui',
748 'operator' => '==',
749 'value' => '1',
750 ),
751 )
752 );
753
754 $acf_tags_meta_box_text = __( 'Tags Meta Box', 'acf' );
755 $acf_categories_meta_box_text = __( 'Categories Meta Box', 'acf' );
756 $acf_default_meta_box_text = empty( $acf_taxonomy['hierarchical'] ) ? $acf_tags_meta_box_text : $acf_categories_meta_box_text;
757 $acf_enable_meta_box_cb_edit = acf_get_setting( 'enable_meta_box_cb_edit' );
758 $acf_meta_box_choices = array(
759 'default' => $acf_default_meta_box_text,
760 'custom' => __( 'Custom Meta Box', 'acf' ),
761 'disabled' => __( 'No Meta Box', 'acf' ),
762 );
763
764 if ( ! $acf_enable_meta_box_cb_edit && 'custom' !== $acf_taxonomy['meta_box'] ) {
765 unset( $acf_meta_box_choices['custom'] );
766 }
767
768 acf_render_field_wrap(
769 array(
770 'type' => 'select',
771 'key' => 'meta_box',
772 'name' => 'meta_box',
773 'class' => 'meta_box',
774 'prefix' => 'acf_taxonomy',
775 'value' => $acf_taxonomy['meta_box'],
776 'label' => __( 'Meta Box', 'acf' ),
777 'instructions' => __( 'Controls the meta box on the content editor screen. By default, the Categories meta box is shown for hierarchical taxonomies, and the Tags meta box is shown for non-hierarchical taxonomies.', 'acf' ),
778 'hide_search' => true,
779 'choices' => $acf_meta_box_choices,
780 'data' => array(
781 'tags_meta_box' => __( 'Tags Meta Box', 'acf' ),
782 'categories_meta_box' => __( 'Categories Meta Box', 'acf' ),
783 ),
784 'conditions' => array(
785 'field' => 'show_ui',
786 'operator' => '==',
787 'value' => '1',
788 ),
789 ),
790 'div',
791 'field'
792 );
793
794 acf_render_field_wrap(
795 array(
796 'type' => 'seperator',
797 'conditions' => array(
798 array(
799 'field' => 'meta_box',
800 'operator' => '!=',
801 'value' => 'custom',
802 ),
803 array(
804 'field' => 'show_ui',
805 'operator' => '==',
806 'value' => '1',
807 ),
808 ),
809 )
810 );
811
812 if ( $acf_enable_meta_box_cb_edit || 'custom' === $acf_taxonomy['meta_box'] ) {
813 $acf_meta_box_cb_instructions = __( 'A PHP function name to be called to handle the content of a meta box on your taxonomy. For security, this callback will be executed in a special context without access to any superglobals like $_POST or $_GET.', 'acf' );
814
815 if ( ! $acf_enable_meta_box_cb_edit ) {
816 if ( is_multisite() ) {
817 $acf_meta_box_cb_instructions .= ' ' . __( 'By default only super admin users can edit this setting.', 'acf' );
818 } else {
819 $acf_meta_box_cb_instructions .= ' ' . __( 'By default only admin users can edit this setting.', 'acf' );
820 }
821 }
822
823 acf_render_field_wrap(
824 array(
825 'type' => 'text',
826 'name' => 'meta_box_cb',
827 'key' => 'meta_box_cb',
828 'prefix' => 'acf_taxonomy',
829 'value' => $acf_taxonomy['meta_box_cb'],
830 'label' => __( 'Register Meta Box Callback', 'acf' ),
831 'instructions' => $acf_meta_box_cb_instructions,
832 'readonly' => ! $acf_enable_meta_box_cb_edit,
833 'conditions' => array(
834 'field' => 'meta_box',
835 'operator' => '==',
836 'value' => 'custom',
837 ),
838 ),
839 'div',
840 'field'
841 );
842
843 acf_render_field_wrap(
844 array(
845 'type' => 'text',
846 'name' => 'meta_box_sanitize_cb',
847 'key' => 'meta_box_sanitize_cb',
848 'prefix' => 'acf_taxonomy',
849 'value' => $acf_taxonomy['meta_box_sanitize_cb'],
850 'label' => __( 'Meta Box Sanitization Callback', 'acf' ),
851 'instructions' => __( 'A PHP function name to be called for sanitizing taxonomy data saved from a meta box.', 'acf' ),
852 'readonly' => ! $acf_enable_meta_box_cb_edit,
853 'conditions' => array(
854 'field' => 'meta_box',
855 'operator' => '==',
856 'value' => 'custom',
857 ),
858 ),
859 'div',
860 'field'
861 );
862
863 acf_render_field_wrap(
864 array(
865 'type' => 'seperator',
866 'conditions' => array(
867 'field' => 'meta_box',
868 'operator' => '==',
869 'value' => 'custom',
870 ),
871 )
872 );
873 }
874
875 acf_render_field_wrap(
876 array(
877 'type' => 'true_false',
878 'key' => 'show_in_nav_menus',
879 'name' => 'show_in_nav_menus',
880 'prefix' => 'acf_taxonomy',
881 'value' => $acf_taxonomy['show_in_nav_menus'],
882 'label' => __( 'Appearance Menus Support', 'acf' ),
883 'instructions' => __( "Allow items to be added to menus in the 'Appearance' > 'Menus' screen. Must be turned on in 'Screen options'.", 'acf' ),
884 'default' => 1,
885 'ui' => true,
886 )
887 );
888
889 acf_render_field_wrap(
890 array(
891 'type' => 'true_false',
892 'key' => 'show_tagcloud',
893 'name' => 'show_tagcloud',
894 'prefix' => 'acf_taxonomy',
895 'value' => $acf_taxonomy['show_tagcloud'],
896 'label' => __( 'Tag Cloud', 'acf' ),
897 'instructions' => __( 'List the taxonomy in the Tag Cloud Widget controls.', 'acf' ),
898 'default' => 1,
899 'ui' => true,
900 )
901 );
902
903 acf_render_field_wrap(
904 array(
905 'type' => 'true_false',
906 'key' => 'show_in_quick_edit',
907 'name' => 'show_in_quick_edit',
908 'prefix' => 'acf_taxonomy',
909 'value' => $acf_taxonomy['show_in_quick_edit'],
910 'label' => __( 'Quick Edit', 'acf' ),
911 'instructions' => __( 'Show the taxonomy in the quick/bulk edit panel.', 'acf' ),
912 'default' => 1,
913 'ui' => true,
914 )
915 );
916
917 acf_render_field_wrap(
918 array(
919 'type' => 'true_false',
920 'key' => 'show_admin_column',
921 'name' => 'show_admin_column',
922 'prefix' => 'acf_taxonomy',
923 'value' => $acf_taxonomy['show_admin_column'],
924 'label' => __( 'Show Admin Column', 'acf' ),
925 'instructions' => __( 'Display a column for the taxonomy on post type listing screens.', 'acf' ),
926 'ui' => true,
927 )
928 );
929
930 break;
931 case 'urls':
932 acf_render_field_wrap(
933 array(
934 'type' => 'select',
935 'name' => 'permalink_rewrite',
936 'key' => 'permalink_rewrite',
937 'prefix' => 'acf_taxonomy[rewrite]',
938 'value' => isset( $acf_taxonomy['rewrite']['permalink_rewrite'] ) ? $acf_taxonomy['rewrite']['permalink_rewrite'] : 'taxonomy_key',
939 'label' => __( 'Permalink Rewrite', 'acf' ),
940 'instructions' => __( 'Select the type of permalink to use for this taxonomy.', 'acf' ) . ' {slug}.',
941 'choices' => array(
942 'taxonomy_key' => __( 'Taxonomy Key', 'acf' ),
943 'custom_permalink' => __( 'Custom Permalink', 'acf' ),
944 'no_permalink' => __( 'No Permalink (prevent URL rewriting)', 'acf' ),
945 ),
946 'default' => 'taxonomy_key',
947 'hide_search' => true,
948 'data' => array(
949 /* translators: this string will be appended with the new permalink structure. */
950 'taxonomy_key_instructions' => __( 'Rewrite the URL using the taxonomy key as the slug. Your permalink structure will be', 'acf' ) . ' {slug}.',
951 /* translators: this string will be appended with the new permalink structure. */
952 'custom_permalink_instructions' => __( 'Rewrite the URL using a custom slug defined in the input below. Your permalink structure will be', 'acf' ) . ' {slug}.',
953 'no_permalink_instructions' => __( 'Permalinks for this taxonomy are disabled.', 'acf' ),
954 'site_url' => get_site_url(),
955 ),
956 'class' => 'permalink_rewrite',
957 ),
958 'div',
959 'field'
960 );
961
962 acf_render_field_wrap(
963 array(
964 'type' => 'text',
965 'name' => 'slug',
966 'key' => 'slug',
967 'prefix' => 'acf_taxonomy[rewrite]',
968 'value' => isset( $acf_taxonomy['rewrite']['slug'] ) ? $acf_taxonomy['rewrite']['slug'] : '',
969 'label' => __( 'URL Slug', 'acf' ),
970 'instructions' => __( 'Customize the slug used in the URL', 'acf' ),
971 'conditions' => array(
972 'field' => 'permalink_rewrite',
973 'operator' => '==',
974 'value' => 'custom_permalink',
975 ),
976 'class' => 'rewrite_slug_field',
977 ),
978 'div',
979 'field'
980 );
981
982 acf_render_field_wrap(
983 array(
984 'type' => 'true_false',
985 'name' => 'with_front',
986 'key' => 'with_front',
987 'prefix' => 'acf_taxonomy[rewrite]',
988 'value' => isset( $acf_taxonomy['rewrite']['with_front'] ) ? $acf_taxonomy['rewrite']['with_front'] : true,
989 'label' => __( 'Front URL Prefix', 'acf' ),
990 'instructions' => __( 'Alters the permalink structure to add the `WP_Rewrite::$front` prefix to URLs.', 'acf' ),
991 'ui' => true,
992 'default' => 1,
993 'conditions' => array(
994 'field' => 'permalink_rewrite',
995 'operator' => '!=',
996 'value' => 'no_permalink',
997 ),
998 ),
999 'div'
1000 );
1001
1002 acf_render_field_wrap(
1003 array(
1004 'type' => 'true_false',
1005 'name' => 'rewrite_hierarchical',
1006 'key' => 'rewrite_hierarchical',
1007 'prefix' => 'acf_taxonomy[rewrite]',
1008 'value' => isset( $acf_taxonomy['rewrite']['rewrite_hierarchical'] ) ? $acf_taxonomy['rewrite']['rewrite_hierarchical'] : false,
1009 'label' => __( 'Hierarchical', 'acf' ),
1010 'instructions' => __( 'Parent-child terms in URLs for hierarchical taxonomies.', 'acf' ),
1011 'ui' => true,
1012 'default' => 0,
1013 'conditions' => array(
1014 'field' => 'permalink_rewrite',
1015 'operator' => '!=',
1016 'value' => 'no_permalink',
1017 ),
1018 ),
1019 'div'
1020 );
1021
1022 acf_render_field_wrap( array( 'type' => 'seperator' ) );
1023
1024 acf_render_field_wrap(
1025 array(
1026 'type' => 'true_false',
1027 'name' => 'publicly_queryable',
1028 'key' => 'publicly_queryable',
1029 'prefix' => 'acf_taxonomy',
1030 'value' => $acf_taxonomy['publicly_queryable'],
1031 'label' => __( 'Publicly Queryable', 'acf' ),
1032 'instructions' => __( 'URLs for an item and items can be accessed with a query string.', 'acf' ),
1033 'default' => 1,
1034 'ui' => true,
1035 )
1036 );
1037
1038 acf_render_field_wrap(
1039 array(
1040 'type' => 'seperator',
1041 'conditions' => array(
1042 'field' => 'publicly_queryable',
1043 'operator' => '==',
1044 'value' => 1,
1045 ),
1046 )
1047 );
1048
1049 acf_render_field_wrap(
1050 array(
1051 'type' => 'select',
1052 'name' => 'query_var',
1053 'key' => 'query_var',
1054 'prefix' => 'acf_taxonomy',
1055 'value' => $acf_taxonomy['query_var'],
1056 'label' => __( 'Query Variable Support', 'acf' ),
1057 'instructions' => __( 'Terms can be accessed using the non-pretty permalink, e.g., {query_var}={term_slug}.', 'acf' ),
1058 'choices' => array(
1059 'post_type_key' => __( 'Taxonomy Key', 'acf' ),
1060 'custom_query_var' => __( 'Custom Query Variable', 'acf' ),
1061 'none' => __( 'No Query Variable Support', 'acf' ),
1062 ),
1063 'default' => 1,
1064 'hide_search' => true,
1065 'class' => 'query_var',
1066 'conditions' => array(
1067 'field' => 'publicly_queryable',
1068 'operator' => '==',
1069 'value' => 1,
1070 ),
1071 ),
1072 'div',
1073 'field'
1074 );
1075
1076 acf_render_field_wrap(
1077 array(
1078 'type' => 'text',
1079 'name' => 'query_var_name',
1080 'key' => 'query_var_name',
1081 'prefix' => 'acf_taxonomy',
1082 'value' => $acf_taxonomy['query_var_name'],
1083 'label' => __( 'Query Variable', 'acf' ),
1084 'instructions' => __( 'Customize the query variable name', 'acf' ),
1085 'ui' => true,
1086 'conditions' => array(
1087 'field' => 'query_var',
1088 'operator' => '==',
1089 'value' => 'custom_query_var',
1090 ),
1091 ),
1092 'div',
1093 'field'
1094 );
1095
1096 break;
1097 case 'permissions':
1098 $acf_all_caps = array();
1099
1100 foreach ( wp_roles()->roles as $acf_role ) {
1101 $acf_all_caps = array_merge( $acf_all_caps, $acf_role['capabilities'] );
1102 }
1103 $acf_all_caps = array_unique( array_keys( $acf_all_caps ) );
1104 $acf_all_caps = array_combine( $acf_all_caps, $acf_all_caps );
1105
1106 acf_render_field_wrap(
1107 array(
1108 'type' => 'select',
1109 'name' => 'manage_terms',
1110 'key' => 'manage_terms',
1111 'prefix' => 'acf_taxonomy[capabilities]',
1112 'value' => $acf_taxonomy['capabilities']['manage_terms'],
1113 'label' => __( 'Manage Terms Capability', 'acf' ),
1114 'instructions' => __( 'The capability name for managing terms of this taxonomy.', 'acf' ),
1115 'choices' => $acf_all_caps,
1116 'default' => 'manage_categories',
1117 'class' => 'acf-taxonomy-manage_terms',
1118 ),
1119 'div',
1120 'field'
1121 );
1122
1123 acf_render_field_wrap(
1124 array(
1125 'type' => 'select',
1126 'name' => 'edit_terms',
1127 'key' => 'edit_terms',
1128 'prefix' => 'acf_taxonomy[capabilities]',
1129 'value' => $acf_taxonomy['capabilities']['edit_terms'],
1130 'label' => __( 'Edit Terms Capability', 'acf' ),
1131 'instructions' => __( 'The capability name for editing terms of this taxonomy.', 'acf' ),
1132 'choices' => $acf_all_caps,
1133 'default' => 'manage_categories',
1134 'class' => 'acf-taxonomy-edit_terms',
1135 ),
1136 'div',
1137 'field'
1138 );
1139
1140 acf_render_field_wrap(
1141 array(
1142 'type' => 'select',
1143 'name' => 'delete_terms',
1144 'key' => 'delete_terms',
1145 'prefix' => 'acf_taxonomy[capabilities]',
1146 'value' => $acf_taxonomy['capabilities']['delete_terms'],
1147 'label' => __( 'Delete Terms Capability', 'acf' ),
1148 'instructions' => __( 'The capability name for deleting terms of this taxonomy.', 'acf' ),
1149 'choices' => $acf_all_caps,
1150 'default' => 'manage_categories',
1151 'class' => 'acf-taxonomy-delete_terms',
1152 ),
1153 'div',
1154 'field'
1155 );
1156
1157 acf_render_field_wrap(
1158 array(
1159 'type' => 'select',
1160 'name' => 'assign_terms',
1161 'key' => 'assign_terms',
1162 'prefix' => 'acf_taxonomy[capabilities]',
1163 'value' => $acf_taxonomy['capabilities']['assign_terms'],
1164 'label' => __( 'Assign Terms Capability', 'acf' ),
1165 'instructions' => __( 'The capability name for assigning terms of this taxonomy.', 'acf' ),
1166 'choices' => $acf_all_caps,
1167 'default' => 'edit_posts',
1168 'class' => 'acf-taxonomy-assign_terms',
1169 ),
1170 'div',
1171 'field'
1172 );
1173
1174 break;
1175 case 'rest_api':
1176 acf_render_field_wrap(
1177 array(
1178 'type' => 'true_false',
1179 'key' => 'show_in_rest',
1180 'name' => 'show_in_rest',
1181 'prefix' => 'acf_taxonomy',
1182 'value' => $acf_taxonomy['show_in_rest'],
1183 'label' => __( 'Show In REST API', 'acf' ),
1184 'instructions' => __( 'Expose this post type in the REST API.', 'acf' ),
1185 'default' => 1,
1186 'ui' => true,
1187 ),
1188 'div'
1189 );
1190 ?>
1191
1192 <?php
1193 acf_render_field_wrap(
1194 array(
1195 'type' => 'text',
1196 'key' => 'rest_base',
1197 'name' => 'rest_base',
1198 'prefix' => 'acf_taxonomy',
1199 'value' => $acf_taxonomy['rest_base'],
1200 'label' => __( 'Base URL', 'acf' ),
1201 'instructions' => __( 'The base URL for the post type REST API URLs.', 'acf' ),
1202 'conditions' => array(
1203 'field' => 'show_in_rest',
1204 'operator' => '==',
1205 'value' => '1',
1206 ),
1207 ),
1208 'div',
1209 'field'
1210 );
1211
1212 acf_render_field_wrap(
1213 array(
1214 'type' => 'text',
1215 'name' => 'rest_namespace',
1216 'key' => 'rest_namespace',
1217 'prefix' => 'acf_taxonomy',
1218 'value' => $acf_taxonomy['rest_namespace'],
1219 'label' => __( 'Namespace Route', 'acf' ),
1220 'instructions' => __( 'The namespace part of the REST API URL.', 'acf' ),
1221 'placeholder' => 'wp/v2',
1222 'conditions' => array(
1223 'field' => 'show_in_rest',
1224 'operator' => '==',
1225 'value' => '1',
1226 ),
1227 ),
1228 'div',
1229 'field'
1230 );
1231
1232 acf_render_field_wrap(
1233 array(
1234 'type' => 'text',
1235 'key' => 'rest_controller_class',
1236 'name' => 'rest_controller_class',
1237 'prefix' => 'acf_taxonomy',
1238 'value' => $acf_taxonomy['rest_controller_class'],
1239 'label' => __( 'Controller Class', 'acf' ),
1240 'instructions' => __( 'Optional custom controller to use instead of `WP_REST_Terms_Controller `.', 'acf' ),
1241 'placeholder' => 'WP_REST_Terms_Controller',
1242 'conditions' => array(
1243 'field' => 'show_in_rest',
1244 'operator' => '==',
1245 'value' => '1',
1246 ),
1247 ),
1248 'div',
1249 'field'
1250 );
1251 break;
1252 }
1253
1254 do_action( "acf/taxonomy/render_settings_tab/{$tab_key}", $acf_taxonomy );
1255
1256 echo '</div>';
1257 }
1258