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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 / global / form-top.php
advanced-custom-fields / includes / admin / views / global Last commit date
form-top.php 6 months ago header.php 6 months ago index.php 2 years ago navigation.php 6 months ago
form-top.php
108 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 $title, $post_new_file, $post_type_object, $post;
13 $acf_title_placeholder = apply_filters( 'enter_title_here', __( 'Add title' ), $post );
14 $acf_title = $post->post_title;
15 $acf_post_type = is_object( $post_type_object ) ? $post_type_object->name : '';
16 $acf_publish_btn_name = 'save';
17 $acf_duplicated_from = '';
18
19 if ( 'publish' !== $post->post_status ) {
20 $acf_publish_btn_name = 'publish';
21 }
22
23 if ( 'acf-field-group' === $acf_post_type ) {
24 $acf_use_post_type = acf_get_post_type_from_request_args( 'add-fields' );
25 $acf_use_taxonomy = acf_get_taxonomy_from_request_args( 'add-fields' );
26 $acf_use_options_page = acf_get_ui_options_page_from_request_args( 'add-fields' );
27
28 /* translators: %s - singular label of post type/taxonomy, i.e. "Movie"/"Genre" */
29 $acf_prefilled_title = __( '%s fields', 'acf' );
30
31 /**
32 * Sets a default title to be prefilled (e.g. "Movies Fields") for a post type or taxonomy.
33 *
34 * @since 6.1.5
35 *
36 * @param string $acf_prefilled_title A string to define the prefilled title for a post type or taxonomy.
37 */
38 $acf_prefilled_title = (string) apply_filters( 'acf/field_group/prefill_title', $acf_prefilled_title );
39
40 if ( $acf_use_post_type && ! empty( $acf_use_post_type['labels']['singular_name'] ) ) {
41 $acf_prefilled_title = sprintf( $acf_prefilled_title, $acf_use_post_type['labels']['singular_name'] );
42 } elseif ( $acf_use_taxonomy && ! empty( $acf_use_taxonomy['labels']['singular_name'] ) ) {
43 $acf_prefilled_title = sprintf( $acf_prefilled_title, $acf_use_taxonomy['labels']['singular_name'] );
44 } elseif ( $acf_use_options_page && ! empty( $acf_use_options_page['page_title'] ) ) {
45 $acf_prefilled_title = sprintf( $acf_prefilled_title, $acf_use_options_page['page_title'] );
46 } else {
47 $acf_prefilled_title = false;
48 }
49
50 if ( empty( $acf_title ) && $acf_prefilled_title ) {
51 $acf_title = $acf_prefilled_title;
52 }
53 } elseif ( in_array( $acf_post_type, array( 'acf-post-type', 'acf-taxonomy', 'acf-ui-options-page' ), true ) ) {
54 $acf_duplicate_post_type = acf_get_post_type_from_request_args( 'acfduplicate' );
55 $acf_duplicate_taxonomy = acf_get_taxonomy_from_request_args( 'acfduplicate' );
56 $acf_duplicate_ui_options_page = acf_get_ui_options_page_from_request_args( 'acfduplicate' );
57 $acf_duplicated_from_label = '';
58
59 if ( $acf_duplicate_post_type && ! empty( $acf_duplicate_post_type['labels']['singular_name'] ) ) {
60 $acf_duplicated_from_label = $acf_duplicate_post_type['labels']['singular_name'];
61 } elseif ( $acf_duplicate_taxonomy && ! empty( $acf_duplicate_taxonomy['labels']['singular_name'] ) ) {
62 $acf_duplicated_from_label = $acf_duplicate_taxonomy['labels']['singular_name'];
63 } elseif ( $acf_duplicate_ui_options_page && ! empty( $acf_duplicate_ui_options_page['page_title'] ) ) {
64 $acf_duplicated_from_label = $acf_duplicate_ui_options_page['page_title'];
65 }
66
67 if ( ! empty( $acf_duplicated_from_label ) ) {
68 /* translators: %s - A singular label for a post type or taxonomy. */
69 $acf_duplicated_from = ' ' . sprintf( __( '(Duplicated from %s)', 'acf' ), $acf_duplicated_from_label );
70 }
71 }
72 ?>
73 <div class="acf-headerbar acf-headerbar-field-editor">
74 <div class="acf-headerbar-inner">
75
76 <div class="acf-headerbar-content">
77 <h1 class="acf-page-title">
78 <?php
79 echo esc_html( $title );
80
81 if ( ! empty( $acf_duplicated_from ) ) {
82 echo '<span class="acf-duplicated-from">' . esc_html( $acf_duplicated_from ) . '</span>';
83 }
84 ?>
85 </h1>
86 <?php if ( 'acf-field-group' === $acf_post_type ) : ?>
87 <div class="acf-title-wrap">
88 <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo esc_html( $acf_title_placeholder ); ?></label>
89 <input form="post" type="text" name="post_title" size="30" value="<?php echo esc_attr( $acf_title ); ?>" id="title" class="acf-headerbar-title-field" spellcheck="true" autocomplete="off" placeholder="<?php esc_attr_e( 'Field Group Title', 'acf' ); ?>" />
90 </div>
91 <?php endif; ?>
92 </div>
93
94 <div class="acf-headerbar-actions" id="submitpost">
95 <?php if ( 'acf-field-group' === $acf_post_type ) : ?>
96 <a href="#" class="acf-btn acf-btn-secondary add-field">
97 <i class="acf-icon acf-icon-plus"></i>
98 <?php esc_html_e( 'Add Field', 'acf' ); ?>
99 </a>
100 <?php endif; ?>
101 <button form="post" class="acf-btn acf-publish" name="<?php echo esc_attr( $acf_publish_btn_name ); ?>" type="submit">
102 <?php esc_html_e( 'Save Changes', 'acf' ); ?>
103 </button>
104 </div>
105
106 </div>
107 </div>
108