folbert / fewbricks

Write code to create ACF field groups, fields and re-usable modules.
https://fewbricks2.folbert.com
GNU General Public License v3.0
124 stars 12 forks source link

Key for a group must start with "group_" #33

Closed alicam closed 7 years ago

alicam commented 7 years ago

Well this nearly killed me.

ACF would not display Fewbricks groups in admin, until (after a VERY LONG time), I worked out it ignores groups where the key doesn't begin with "group_".

This is an easy fix, adding this line to the top of the __contruct() of \fewbricks\acf\field_group class.

$key = (strpos($key, 'group_') === 0) ? $key : "group_$key";

A

folbert commented 7 years ago

Also thanks for this suggestion.

Did a quick test on this and as I suspected, since the key-value changes, any data entered before the change will disappear.

Also, even if I can see some value in being able to check fields in the ACF GUI, one of the main points of Fewbricks is to move away from the GUI.

So I wont be implementing this.