Open ivangretsky opened 4 years ago
Hi @ivangretsky ,
It's been a while since I introduced this feature and I can't quite remember why I did it this way. I could go ahead and change this to use numeric keys but that could potentially break sites that were already using MB dev version.
I'll have a think.
Thanks.
Ok. But that's the great thing about dev branch - you can change things)
P.S. Oh, it's in the master now. But still fresh, so still some time for the breaking changes)))
Good day, @kongondo !
I love the new extra_fields option for getMenuItems() on the dev branch!
When used with image fields the returned array for the field is associated and the keys for it are the file names (see the screenshot).
I think it would be much easier to deal with numeric keys in the code. For now I have to write something like this:
...instead of this:
... and get a php notice anyway. The filename of the image is in the array already so seems like there is no need to duplicate it as a key.
What do you think? Or maybe I am using it all wrong?