PluginProbe
AWSM Team – Team Showcase Plugin / 1.3.3
AWSM Team – Team Showcase Plugin v1.3.3
trunk 1.0 1.1 1.1.2 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4
awsm-team / templates / partials / social.php

social.php in AWSM Team – Team Showcase Plugin 1.3.3, at templates/partials/social.php

29 lines 925 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Social Info Template Part.
4 *
5 * @package awsm-team
6 */
7
8 if ( ! empty( $teamdata['awsm_social'] ) ) {
9 echo '<div class="awsm-social-icons">';
10 foreach ( $teamdata['awsm_social'] as $social ) {
11
12 $social_link = '';
13 $links = isset( $social['link'] ) ? $social['link'] : '';
14 $icon = isset( $social['icon'] ) ? $social['icon'] : '';
15 if ( filter_var( $links, FILTER_VALIDATE_EMAIL ) ) {
16 $social_link = sprintf( 'href="mailto:%1$s"', esc_attr( $links ) );
17 } elseif ( $this->validate_phone_number( $links ) === true ) {
18 $social_link = sprintf( 'href="tel:%1$s"', esc_attr( $links ) );
19 } else {
20
21 $social_link = sprintf( 'href="%1$s" target="_blank"', esc_url( $links ) );
22 }
23
24 echo '<span><a ' . $social_link . '><i class="awsm-icon-' . esc_attr( $icon ) . '" aria-hidden="true"></i></a></span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
25 }
26 echo '</div>';
27 }
28
29