Skip to content

Commit

Permalink
adds deprecated field
Browse files Browse the repository at this point in the history
  • Loading branch information
kasprzyk-sz committed Nov 2, 2024
1 parent 5e8765c commit 95a1323
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions wp-content/plugins/embl-taxonomy/includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,50 @@ function acf_init() {
'ui_off_text' => '',
)
);

// New field group specifically for Deprecated checkbox
acf_add_local_field_group(array(
'key' => 'group_embl_taxonomy_deprecated',
'fields' => array(
array(
'key' => 'field_embl_taxonomy_deprecated',
'label' => 'Deprecated',
'name' => 'embl_taxonomy_deprecated',
'type' => 'true_false',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'message' => '',
'default_value' => get_term_meta(get_queried_object_id(), EMBL_Taxonomy::META_DEPRECATED, true) ? 1 : 0,
'ui' => 1,
'ui_on_text' => 'Yes',
'ui_off_text' => 'No',
),
),
'location' => array(
array(
array(
'param' => 'taxonomy',
'operator' => '==',
'value' => 'embl_taxonomy', // Specify the taxonomy
),
),
),
'menu_order' => 20,
'position' => 'side',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => true,
'description' => '',
));

}

/**
Expand Down

0 comments on commit 95a1323

Please sign in to comment.