Closed UlrichThomasGabor closed 7 months ago
It works, if you use the proper array keys.
There are some examples in test/acf-json/
:
https://github.com/mcguffin/acf-quickedit-fields/blob/4ec0aeaab208978db6962a43a883043b7d17bbae/test/acf-json/group_acf_qef_basic.json#L24-L29
Ok, thanks!
I noticed that additionally it is picky regarding the truth values.
This one does not work:
acf_add_local_field_group(
[
'key' => 'group_global_quickedit_test',
'title' => 'QuickEdit-Test',
'fields' => [
[
'key' => 'quickedit-test',
'name' => 'quickedit-test',
'label' => 'quickedit-test',
'type' => 'text',
'show_column' => true,
'show_column_sortable' => true,
'show_column_weight' => 1010,
'allow_quickedit' => true,
'allow_bulkedit' => true,
'allow_backendsearch' => true,
],
],
'location' => [
[
[
'param' => 'post_type',
'operator' => '==',
'value' => 'page',
],
],
],
'menu_order' => 0,
],
);
This works:
acf_add_local_field_group(
[
'key' => 'group_global_quickedit_test',
'title' => 'QuickEdit-Test',
'fields' => [
[
'key' => 'quickedit-test',
'name' => 'quickedit-test',
'label' => 'quickedit-test',
'type' => 'text',
'show_column' => 1,
'show_column_sortable' => 1,
'show_column_weight' => 1010,
'allow_quickedit' => 1,
'allow_bulkedit' => 1,
'allow_backendsearch' => 1,
],
],
'location' => [
[
[
'param' => 'post_type',
'operator' => '==',
'value' => 'page',
],
],
],
'menu_order' => 0,
],
);
Would maybe be good to add some documentation for that?
Hi
Does this somehow work with fields added via PHP, i.e.
acf_add_local_field
?I tried setting the options like that, but nothing happens:
Or is it necessary to bind a filter to
acf_quick_edit_fields_types
?