Widget_Icon_List::render()
Render icon list widget output on the frontend.
Description
Written in PHP and used to generate the final HTML.
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |
Source
includes/widgets/icon-list.php
] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'icon_typography', 'selector' => '{{WRAPPER}} .elementor-icon-list-item', 'scheme' => Scheme_Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); } /** * Render icon list widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $this->add_render_attribute( 'icon_list', 'class', 'elementor-icon-list-items' ); $this->add_render_attribute( 'list_item', 'class', 'elementor-icon-list-item' ); if ( 'inline' === $settings['view'] ) { $this->add_render_attribute( 'icon_list', 'class', 'elementor-grid' ); $this->add_render_attribute( 'list_item', 'class', 'elementor-grid-item' ); } ?> <ul <?php echo $this->get_render_attribute_string( 'icon_list' ); ?>> <?php foreach ( $settings['icon_list'] as $index => $item ) : $repeater_setting_key = $this->get_repeater_setting_key( 'text', 'icon_list', $index ); $this->add_render_attribute( $repeater_setting_key, 'class', 'elementor-icon-list-text' ); $this->add_inline_editing_attributes( $repeater_setting_key ); ?> <li class="elementor-icon-list-item" > <?php if ( ! empty( $item['link']['url'] ) ) { $link_key = 'link_' . $index; $this->add_render_attribute( $link_key, 'href', $item['link']['url'] );