Widget_Social_Icons::render()
Render social icons 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/social-icons.php
$social = str_replace( 'fa fa-', '', $item['social'] ); $link_key = 'link_' . $index; $this->add_render_attribute( $link_key, 'href', $item['link']['url'] ); if ( $item['link']['is_external'] ) { $this->add_render_attribute( $link_key, 'target', '_blank' ); } if ( $item['link']['nofollow'] ) { $this->add_render_attribute( $link_key, 'rel', 'nofollow' ); } ?> <a class="elementor-icon elementor-social-icon elementor-social-icon-<?php echo $social . $class_animation; ?>" <?php echo $this->get_render_attribute_string( $link_key ); ?>> <span class="elementor-screen-only"><?php echo ucwords( $social ); ?></span> <i class="<?php echo $item['social']; ?>"></i> </a> <?php } ?> </div> <?php } /** * Render social icons widget output in the editor. * * Written as a Backbone JavaScript template and used to generate the live preview. * * @since 1.0.0 * @access protected */ protected function _content_template() { ?> <div class="elementor-social-icons-wrapper">