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.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 / basic-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
basic-settings.php
162 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 $acf_duplicate_taxonomy = acf_get_taxonomy_from_request_args( 'acfduplicate' );
15
16 if ( acf_is_taxonomy( $acf_duplicate_taxonomy ) ) {
17 // Reset vars that likely have to be changed.
18 $acf_duplicate_taxonomy['key'] = uniqid( 'taxonomy_' );
19 $acf_duplicate_taxonomy['title'] = '';
20 $acf_duplicate_taxonomy['labels'] = array_map( '__return_empty_string', $acf_duplicate_taxonomy['labels'] );
21 $acf_duplicate_taxonomy['taxonomy'] = '';
22 $acf_duplicate_taxonomy['rewrite']['slug'] = '';
23 $acf_duplicate_taxonomy['query_var_name'] = '';
24 $acf_duplicate_taxonomy['rest_base'] = '';
25
26 // Rest of the vars can be reused.
27 $acf_taxonomy = $acf_duplicate_taxonomy;
28 }
29
30 acf_render_field_wrap(
31 array(
32 'label' => __( 'Plural Label', 'acf' ),
33 /* translators: example taxonomy */
34 'placeholder' => __( 'Genres', 'acf' ),
35 'type' => 'text',
36 'key' => 'name',
37 'name' => 'name',
38 'class' => 'acf_plural_label',
39 'prefix' => 'acf_taxonomy[labels]',
40 'value' => $acf_taxonomy['labels']['name'],
41 'required' => 1,
42 ),
43 'div',
44 'field'
45 );
46
47 acf_render_field_wrap(
48 array(
49 'label' => __( 'Singular Label', 'acf' ),
50 /* translators: example taxonomy */
51 'placeholder' => __( 'Genre', 'acf' ),
52 'type' => 'text',
53 'key' => 'singular_name',
54 'name' => 'singular_name',
55 'class' => 'acf_slugify_to_key acf_singular_label',
56 'prefix' => 'acf_taxonomy[labels]',
57 'value' => $acf_taxonomy['labels']['singular_name'],
58 'required' => 1,
59 ),
60 'div',
61 'field'
62 );
63
64 acf_render_field_wrap(
65 array(
66 'label' => __( 'Taxonomy Key', 'acf' ),
67 'instructions' => __( 'Lower case letters, underscores and dashes only, Max 32 characters.', 'acf' ),
68 /* translators: example taxonomy */
69 'placeholder' => __( 'genre', 'acf' ),
70 'type' => 'text',
71 'key' => 'taxonomy',
72 'name' => 'taxonomy',
73 'maxlength' => 32,
74 'class' => 'acf_slugified_key',
75 'prefix' => 'acf_taxonomy',
76 'value' => $acf_taxonomy['taxonomy'],
77 'required' => 1,
78 ),
79 'div',
80 'field'
81 );
82
83 // Allow preselecting the linked post types based on previously created post type.
84 $acf_use_post_type = acf_get_post_type_from_request_args( 'create-taxonomy' );
85 if ( $acf_use_post_type && ! empty( $acf_use_post_type['post_type'] ) ) {
86 $acf_taxonomy['object_type'] = array( $acf_use_post_type['post_type'] );
87 }
88
89 acf_render_field_wrap(
90 array(
91 'label' => __( 'Post Types', 'acf' ),
92 'type' => 'select',
93 'name' => 'object_type',
94 'prefix' => 'acf_taxonomy',
95 'value' => $acf_taxonomy['object_type'],
96 'choices' => acf_get_pretty_post_types(),
97 'multiple' => 1,
98 'ui' => 1,
99 'allow_null' => 1,
100 'instructions' => __( 'One or many post types that can be classified with this taxonomy.', 'acf' ),
101 ),
102 'div',
103 'field'
104 );
105
106 acf_render_field_wrap( array( 'type' => 'seperator' ) );
107
108 acf_render_field_wrap(
109 array(
110 'type' => 'true_false',
111 'key' => 'public',
112 'name' => 'public',
113 'prefix' => 'acf_taxonomy',
114 'value' => $acf_taxonomy['public'],
115 'label' => __( 'Public', 'acf' ),
116 'instructions' => __( 'Makes a taxonomy visible on the frontend and in the admin dashboard.', 'acf' ),
117 'ui' => true,
118 'default' => 1,
119 )
120 );
121
122 acf_render_field_wrap(
123 array(
124 'type' => 'true_false',
125 'key' => 'hierarchical',
126 'name' => 'hierarchical',
127 'class' => 'acf_hierarchical_switch',
128 'prefix' => 'acf_taxonomy',
129 'value' => $acf_taxonomy['hierarchical'],
130 'label' => __( 'Hierarchical', 'acf' ),
131 'instructions' => __( 'Hierarchical taxonomies can have descendants (like categories).', 'acf' ),
132 'ui' => true,
133 ),
134 'div'
135 );
136
137 do_action( 'acf/taxonomy/basic_settings', $acf_taxonomy );
138
139 acf_render_field_wrap( array( 'type' => 'seperator' ) );
140
141 acf_render_field_wrap(
142 array(
143 'label' => __( 'Advanced Configuration', 'acf' ),
144 'instructions' => __( 'I know what I\'m doing, show me all the options.', 'acf' ),
145 'type' => 'true_false',
146 'key' => 'advanced_configuration',
147 'name' => 'advanced_configuration',
148 'prefix' => 'acf_taxonomy',
149 'value' => $acf_taxonomy['advanced_configuration'],
150 'ui' => 1,
151 'class' => 'acf-advanced-settings-toggle',
152 )
153 );
154
155 ?>
156 <div class="acf-hidden">
157 <input type="hidden" name="acf_taxonomy[key]" value="<?php echo esc_attr( $acf_taxonomy['key'] ); ?>" />
158 <input type="hidden" name="acf_taxonomy[import_source]" value="<?php echo esc_attr( $acf_taxonomy['import_source'] ); ?>" />
159 <input type="hidden" name="acf_taxonomy[import_date]" value="<?php echo esc_attr( $acf_taxonomy['import_date'] ); ?>" />
160 </div>
161 <?php
162