Skip to content

feat: add icon picker and separator fields to FieldsBuilder - #204

Open
Levdbas wants to merge 1 commit into
StoutLogic:masterfrom
Levdbas:add-missing-fields
Open

Levdbas wants to merge 1 commit into
StoutLogic:masterfrom
Levdbas:add-missing-fields

Conversation

@Levdbas

@Levdbas Levdbas commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Issue

ACF Builder was missing wrapper methods for two ACF Pro field types: icon_picker and separator.

Solution

This change adds the missing field helpers to FieldsBuilder:

  • addIconPicker()
  • addSeparator()

It also updates the @method annotations in FieldBuilder so IDE autocomplete and static analysis reflect the supported ACF field API.

Impact

This is a backwards-compatible enhancement to the public API. Existing field group builders continue to work as before, and the generated ACF configuration matches the upstream field types for these two additions.

Usage changes

No migration steps are required for existing users. New usage is as follows:

$fields->addIconPicker('social_icon', [
    'tabs' => ['dashicons', 'url'],
    'return_format' => 'string',
]);

$fields->addSeparator('content_break', [
    'label' => 'Content Settings',
]);

Testing

Added regression coverage for the two missing field helpers.

Command run:

cd /home/erik/anders/pullrequests/acf-builder && ./vendor/bin/phpunit --filter 'testAddIconPicker|testAddSeparator' --colors=never

Result: OK (2 tests, 2 assertions)

@Levdbas Levdbas mentioned this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant