
The dashicons
control allows you to select an available icons from the WordPress Dashicons iconfont.
The returned value is a string and does not contain the dashicons dashicons-
prefix, and allows you to handle the selected values as you see fit.
Example
Kirki::add_field( 'theme_config_id', [
'type' => 'dashicons',
'settings' => 'dashicons_setting',
'label' => esc_html__( 'Dashicons Control', 'kirki' ),
'section' => 'section_id',
'default' => 'menu',
'priority' => 10,
] );
Usage
<?php $icon = get_theme_mod( 'dashicons_setting', 'menu' ); ?>
<span class="dashicons dashicons-<?php echo esc_attr( $icon ); ?>"></span>