Icon Popup

The icon-popup is an efficient field to use icon from various types.

Field Parameters

Name Type Default Description
type string ‘icon-popup’ Value identifies the field types.
id string Identifies unique ID for the field. It must be different from other existing field IDs.
title string Displays the field label.
desc string Describe the field option in details, appears underneath the field control.
required array Acts like boolean operator and provides the parent, comparison operation, and value which decides the field visibility.
value string Display default string in the text input.
buttons array Popup Buttons
providers array upb_icon_providers() Icon Providers

Example Declaration

    'id' => 'icon',
    'title' => esc_html__( 'Label', 'ultimate-page-builder' ),
    'desc' => wp_kses_post( __( 'Description', 'ultimate-page-builder' )),
    'type' => 'icon-popup',
    'value' => '',
    'providers' => upb_icon_providers()

upb_icon_providers() have upb_icon_providers filter to modify icon providers lists globally.

How to add extra icons?

  • Add Icon fonts CSS on upb_boilerplate_print_styles and wp_enqueue_scripts
  • Add a provider first.
  • Use upb_icon_popup_icons filter to add your specific provider icons. This filter have 2 argument. 1st one is icons 2nd one is provider.


add_filter( 'upb_icon_popup_icons', function ( $icons, $provider ) {

        switch ( $provider ) {
            case 'materialdesign':
                $icons = upb_material_design_icons();

            case 'fontawesome':
                $icons = upb_font_awesome_icons();

            case 'dashicons':
                $icons = upb_dash_icon_icons();

        return $icons;

    }, 10, 2 );

results matching ""

    No results matching ""