Log1x / acf-composer

Compose ACF Fields, Blocks, Widgets, and Option Pages with ACF Builder on Sage 10.
https://github.com/Log1x/acf-composer
MIT License
413 stars 56 forks source link

Register paths on acf/init #163

Closed JUVOJustin closed 1 year ago

JUVOJustin commented 1 year ago

I encountered that i cannot use acfs´s get_field() within my field declarations. https://github.com/Log1x/acf-composer/issues/162

I noticed that all code is executed immediately and is not registered with the acf/init hook. After changing that it is now possible to use acf related code. This might even fix https://github.com/Log1x/acf-composer/issues/94

I did some test and with these adjustments i was able to create field groups, blocks, options and widgets through the cli.

The thing I am not sure about is the registerPlugin function. It also registers the path but i didn´t get my head around what this functions does or when it is called. Maybe it needs to be wrapped around the action hook too.