'acf-field-object acf-field-object-' . acf_slugify( $field['type'] ), 'data-id' => $field['ID'], 'data-key' => $field['key'], 'data-type' => $field['type'], ); // Add additional class if the field is an endpoint. if ( isset( $field['endpoint'] ) && $field['endpoint'] ) { $div_attrs['class'] .= ' acf-field-is-endpoint'; } // Misc template vars. $field_label = acf_get_field_label( $field, 'admin' ); $field_type_label = acf_get_field_type_label( $field['type'] ); if ( acf_is_pro() && acf_get_field_type_prop( $field['type'], 'pro' ) && ! acf_pro_is_license_active() ) { $field_type_label .= 'PRO'; } if ( ! isset( $num_field_groups ) ) { $num_field_groups = 0; } $conditional_logic_class = $conditional_logic_text = ''; if ( isset( $field['conditional_logic'] ) && is_array( $field['conditional_logic'] ) && count( $field['conditional_logic'] ) > 0 ) { $conditional_logic_class = ' is-enabled'; $conditional_logic_text = __( 'Active', 'acf' ); } ?>
>
$field['ID'], 'key' => $field['key'], 'parent' => $field['parent'], 'menu_order' => $i, 'save' => '', ); foreach ( $meta_inputs as $k => $v ) : acf_hidden_input( array( 'name' => $input_prefix . '[' . $k . ']', 'value' => $v, 'id' => $input_id . '-' . $k, ) ); endforeach; ?>
$tab_label ) { $field_to_render = array( 'type' => 'tab', 'label' => $tab_label, 'key' => 'acf_field_settings_tabs', 'settings-type' => $tab_key, ); if ( $tab_key === 'conditional_logic' ) { $field_to_render['label'] = __( 'Conditional Logic', 'acf' ) . '' . $conditional_logic_text . ''; } acf_render_field_wrap( $field_to_render ); ?>
__( 'Field Type', 'acf' ), 'instructions' => '', 'type' => 'select', 'name' => 'type', 'choices' => acf_get_grouped_field_types(), 'class' => $field_type_select_class, ), true ); if ( apply_filters( 'acf/field_group/enable_field_browser', true ) ) { ?>
__( 'Field Label', 'acf' ), 'instructions' => __( 'This is the name which will appear on the EDIT page', 'acf' ), 'name' => 'label', 'type' => 'text', 'class' => 'field-label', ), true ); // name acf_render_field_setting( $field, array( 'label' => __( 'Field Name', 'acf' ), 'instructions' => __( 'Single word, no spaces. Underscores and dashes allowed', 'acf' ), 'name' => 'name', 'type' => 'text', 'class' => 'field-name', ), true ); // 3rd party settings do_action( 'acf/render_field_settings', $field ); do_action( "acf/field_group/render_field_settings_tab/{$tab_key}", $field ); ?>
__( 'Required', 'acf' ), 'instructions' => '', 'type' => 'true_false', 'name' => 'required', 'ui' => 1, 'class' => 'field-required', ), true ); do_action( "acf/field_group/render_field_settings_tab/{$tab_key}", $field ); ?>
__( 'Instructions', 'acf' ), 'instructions' => __( 'Instructions for authors. Shown when submitting data', 'acf' ), 'type' => 'textarea', 'name' => 'instructions', 'rows' => 5, ), true ); acf_render_field_wrap( array( 'label' => '', 'instructions' => '', 'type' => 'text', 'name' => 'class', 'prefix' => $field['prefix'] . '[wrapper]', 'value' => $field['wrapper']['class'], 'prepend' => __( 'class', 'acf' ), 'wrapper' => array( 'data-append' => 'wrapper', ), ), 'div' ); acf_render_field_wrap( array( 'label' => '', 'instructions' => '', 'type' => 'text', 'name' => 'id', 'prefix' => $field['prefix'] . '[wrapper]', 'value' => $field['wrapper']['id'], 'prepend' => __( 'id', 'acf' ), 'wrapper' => array( 'data-append' => 'wrapper', ), ), 'div' ); do_action( "acf/field_group/render_field_settings_tab/{$tab_key}", $field ); ?>
__( 'Wrapper Attributes', 'acf' ), 'instructions' => '', 'type' => 'number', 'name' => 'width', 'prefix' => $field['prefix'] . '[wrapper]', 'value' => $field['wrapper']['width'], 'prepend' => __( 'width', 'acf' ), 'append' => '%', 'wrapper' => array( 'data-name' => 'wrapper', 'class' => 'acf-field-setting-wrapper', ), ), 'div' ); break; case 'conditional_logic': acf_get_view( 'acf-field-group/conditional-logic', array( 'field' => $field ) ); do_action( "acf/field_group/render_field_settings_tab/{$tab_key}", $field ); ?>