add_control( 'icon', [ 'label' => __( 'Icon', 'awelementor' ), 'type' => Controls_Manager::ICON, // 'condition' => [ // 'icon_type' => 'icon', // ], ] ); $repeater->add_control( 'link', [ 'label' => __( 'Link', 'awelementor' ), 'type' => Controls_Manager::URL, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'https://your-link.com', 'awelementor' ), ] ); return $repeater; } /** * @param array $item * @param string $key * @return string */ protected function get_item_html(array $item, $key = 'icon') { $this->add_render_attribute($key, 'class', "fa fa-{$item['icon']}"); $icon_html = "get_render_attribute_string($key)}>"; return empty($item['link']['url']) ? $icon_html : $this->get_link_html($item['link'], "{$key}-link") . $icon_html . '' ; } }