vamtam-team-member.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. $biography = trim( $settings->biography );
  3. $icons_map = array(
  4. 'googleplus' => 'vamtam-theme-google-plus',
  5. 'linkedin' => 'vamtam-theme-linkedin',
  6. 'facebook' => 'vamtam-theme-facebook',
  7. 'twitter' => 'vamtam-theme-twitter',
  8. 'youtube' => 'vamtam-theme-youtube',
  9. 'pinterest' => 'vamtam-theme-pinterest',
  10. 'lastfm' => 'vamtam-theme-last-fm',
  11. 'instagram' => 'vamtam-theme-instagram',
  12. 'dribble' => 'vamtam-theme-dribbble',
  13. 'vimeo' => 'vamtam-theme-vimeo',
  14. );
  15. $used_icons = array();
  16. foreach ( $icons_map as $icon => $icon_name ) {
  17. if ( ! empty( $settings->$icon ) ) {
  18. $used_icons[] = array(
  19. 'url' => $settings->$icon,
  20. 'name' => $icon_name,
  21. );
  22. }
  23. }
  24. ?>
  25. <div class="team-member <?php echo ( ! empty( $biography ) ? 'has-content' : '' ) ?>">
  26. <?php if ( ! empty( $settings->picture_src ) ) : ?>
  27. <div class="thumbnail">
  28. <?php if ( ! empty( $settings->url ) ) : ?>
  29. <a href="<?php echo esc_url( $settings->url ) ?>" title="<?php echo esc_attr( $settings->name ) ?>">
  30. <?php endif ?>
  31. <?php echo VamtamTemplates::lazyload_image( $settings->picture, 'full' ); ?>
  32. <?php if ( ! empty( $settings->url ) ) : ?>
  33. </a>
  34. <?php endif ?>
  35. <?php if ( ! empty( $used_icons ) ): ?>
  36. <div class="share-icons clearfix">
  37. <?php foreach ( $used_icons as $icon ) : ?>
  38. <a href="<?php echo esc_url( $icon['url'] )?>" title=""><?php echo vamtam_get_icon_html( array( // xss ok
  39. 'name' => $icon['name'],
  40. ) ); ?></a>
  41. <?php endforeach; ?>
  42. </div>
  43. <?php endif ?>
  44. </div>
  45. <?php endif ?>
  46. <div class="team-member-info">
  47. <?php if ( ! empty( $settings->position ) ) : ?>
  48. <h5 class="regular-title-wrapper team-member-position"><?php echo wp_kses_post( $settings->position ) ?></h5>
  49. <?php endif ?>
  50. <h3>
  51. <?php if ( ! empty( $settings->url ) ) : ?>
  52. <a href="<?php echo esc_url( $settings->url ) ?>" title="<?php echo esc_attr( $settings->name ) ?>">
  53. <?php endif ?>
  54. <?php echo wp_kses_post( $settings->name ) ?>
  55. <?php if ( ! empty( $settings->url ) ) : ?>
  56. </a>
  57. <?php endif ?>
  58. </h3>
  59. <?php if ( ! empty( $settings->phone ) ) : ?>
  60. <div class="team-member-phone"><a href="tel:<?php echo esc_url( $settings->phone ) ?>" title="<?php echo esc_attr( sprintf( 'Call %s', $settings->name ) ) ?>"><?php esc_html_e( 'Tel:', 'vamtam-consulting' ) ?> <?php echo wp_kses_post( $settings->phone ) ?></a></div>
  61. <?php endif ?>
  62. <?php if ( ! empty( $settings->email ) ) : ?>
  63. <div class="team-member-email"><a href="mailto:<?php echo esc_attr( $settings->email ) ?>" title="<?php echo esc_attr( sprintf( __( 'email %s', 'vamtam-consulting' ), $settings->name ) ) ?>"><?php echo wp_kses_post( $settings->email ); ?></a></div>
  64. <?php endif ?>
  65. <?php if ( ! empty( $settings->biography ) ) : ?>
  66. <div class="team-member-bio">
  67. <?php echo do_shortcode( $settings->biography ) ?>
  68. </div>
  69. <?php endif ?>
  70. </div>
  71. </div>