flyntwp / acf-field-group-composer

Configuration builder for advanced custom fields field groups
MIT License
48 stars 11 forks source link

Update ResolveConfig.php #24

Closed manh-trinhquoc closed 2 years ago

manh-trinhquoc commented 2 years ago

I run following sample code and get an error. I manage to hot fix it. ` add_filter('MyProject/ACF/fields/field1', function ($field) { return [ 'label' => 'Subtitle', 'name' => 'subtitle', 'type' => 'text' ]; });

add_filter('MyProject/ACF/locations/postTypePost', function ($location) { return [ 'param' => 'post_type', 'operator' => '==', 'value' => 'post' ]; });

$config = [ 'name' => 'group1', 'title' => 'My Group', 'fields' => [ 'MyProject/ACF/fields/field1' ], 'location' => [ [ 'MyProject/ACF/locations/postTypePost' ] ] ];

ACFComposer\ACFComposer::registerFieldGroup($config); `

image

manh-trinhquoc commented 2 years ago

Sorry I made a mistake