acf_field_icon_picker::initialize
Initialize icon picker field
Method of the class: acf_field_icon_picker{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_field_icon_picker = new acf_field_icon_picker(); $acf_field_icon_picker->initialize();
Changelog
| Since 6.3 | Introduced. |
acf_field_icon_picker::initialize() acf field icon picker::initialize code ACF 6.8.8
public function initialize() {
$this->name = 'icon_picker';
$this->label = __( 'Icon Picker', 'acf' );
$this->public = true;
$this->category = 'advanced';
$this->description = __( 'An interactive UI for selecting an icon. Select from Dashicons, the media library, or a standalone URL input.', 'acf' );
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-icon-picker.png';
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/icon-picker/', 'docs', 'field-type-selection' );
$this->defaults = array(
'library' => 'all',
'tabs' => array_keys( $this->get_tabs() ),
'return_format' => 'string',
'default_value' => array(
'type' => null,
'value' => null,
),
);
}