r/ProWordPress • u/SkySarwer • 1d ago
Help with hook schema for the icon picker of my public plugin
I’m refining the hook API for the icon picker of my public plugin, that is reused across several custom blocks and an ACF field type.
The picker integrates with Iconify and supports multiple open-source icon collections. In the UI, there are three tabs:
- Default
- Collection
- All
“Default” already supports a filter to set one or more default collections, with Lucide as the default.
The issue is that Iconify exposes a very large number of collections, and I’m not sure it makes sense to expose all of them in the collection picker by default. I can see many site admins wanting to limit that list.
For a public plugin API, would you prefer:
- a whitelist filter
- a blacklist filter
- both
And would you keep that as one global filter for available collections, or expose separate filters for the “Collection” and “All” tabs?
I’m trying to keep the API flexible without overdesigning, would love input from people who’ve had to make similar decisions in public plugins.
Screencapture showing the UI
