pods
pods copied to clipboard
Feature: New icon picker field
Issue: #4298
It will add a composer dependency for WP Icon Picker library: https://github.com/ineagu/wp-icon-picker
TODO:
- [ ] Selection of which icon libraries are available for a field
- Implement this globally or per-field?
- [ ] Other field options?
- [ ]
field::display()
implementation - [ ]
field::ui()
implementation - [ ] Test with front-end forms
- [ ] Other tests?
- [ ] Check storage (@sc0ttkclark) Currently stores as an array (
array( 'type' => '', 'icon' => '' )
)
Why store type and icon? Why not just store the type and get the associated type with the icon selected?
That is how wp-icon-picker handles it.
type
is the font library prefix (fa
, dashicons
, etc) and icon
is the actual icon class.
In case of an SVG image the type => 'svg'
and icon
is the attachment ID.
Can we store formatted separated by pipe "|"?
Like "dashicons|the-icon"
I don't see why not. A space would work even better I guess.
Is there any developement or a roadmap to add this icon picker in Pods?