89 lines
4.6 KiB
PHP
89 lines
4.6 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
$tpc_tribe_events_speakers = get_the_terms( get_the_ID(), 'tribe_events_speaker' );
|
||
|
|
|
||
|
|
$tribe_event_speaker_columns = Upstudy::setting( 'tribe_event_speaker_columns' );
|
||
|
|
$tribe_event_speaker_designation = Upstudy::setting( 'tribe_event_speaker_designation' );
|
||
|
|
$tribe_event_speaker_social = Upstudy::setting( 'tribe_event_speaker_social' );
|
||
|
|
$tribe_event_speaker_layout = Upstudy::setting( 'tribe_event_speaker_layout' );
|
||
|
|
|
||
|
|
foreach ( $tpc_tribe_events_speakers as $key => $term ) {
|
||
|
|
$designation = get_term_meta( $term->term_id, 'upstudy_tribe_events_speaker_designation', true );
|
||
|
|
$image_url = get_term_meta( $term->term_id, 'upstudy_tribe_events_speaker_image', true );
|
||
|
|
$speaker_details_url = get_term_meta( $term->term_id, 'upstudy_tribe_event_speaker_details_url', true );
|
||
|
|
$fb_profile = get_term_meta( $term->term_id, 'upstudy_tribe_events_speaker_fb_profile', true );
|
||
|
|
$tw_profile = get_term_meta( $term->term_id, 'upstudy_tribe_events_speaker_tw_profile', true );
|
||
|
|
$lk_profile = get_term_meta( $term->term_id, 'upstudy_tribe_events_speaker_lk_profile', true );
|
||
|
|
|
||
|
|
echo '<div class="upstudy-team-1-widget upstudy-slider-item upstudy-col-lg-'. esc_attr( $tribe_event_speaker_columns ). '">';
|
||
|
|
|
||
|
|
$svg_shape = '<svg xmlns="http://www.w3.org/2000/svg" width="179.031" height="196" viewBox="0 0 179.031 196">
|
||
|
|
<path xmlns="http://www.w3.org/2000/svg" id="Shape" d="M574.8,4430c72.242,0,54.982-32.75,2.593-82.49-54.616-51.84-133.4-197.12-133.4-48.29A130.792,130.792,0,0,0,574.8,4430Z" transform="translate(-444 -4234)"/>
|
||
|
|
</svg>';
|
||
|
|
$allowed_tags = array(
|
||
|
|
'svg' => array(
|
||
|
|
'xmlns' => true,
|
||
|
|
'width' => true,
|
||
|
|
'height' => true,
|
||
|
|
'viewBox' => true,
|
||
|
|
),
|
||
|
|
'path' => array(
|
||
|
|
'id' => true,
|
||
|
|
'd' => true,
|
||
|
|
'transform' => true,
|
||
|
|
),
|
||
|
|
);
|
||
|
|
|
||
|
|
echo '<div class="upstudy-teacher-item upstudy-teacher-style-'. esc_attr( $tribe_event_speaker_layout ).'">';
|
||
|
|
echo '<div class="teacher-img-wrap">';
|
||
|
|
echo '<a href="' . esc_url( $speaker_details_url ) . '">';
|
||
|
|
echo '<div class="teacher-img">';
|
||
|
|
echo '<img src="' . esc_url( $image_url ) . '" alt="">';
|
||
|
|
|
||
|
|
echo '<span class="teacher-svg-shape">';
|
||
|
|
echo wp_kses($svg_shape, $allowed_tags);
|
||
|
|
echo '</span>';
|
||
|
|
|
||
|
|
echo '</div>';
|
||
|
|
echo '</a>';
|
||
|
|
if( $tribe_event_speaker_social || $fb_profile || $tw_profile || $lk_profile ){
|
||
|
|
echo '<div class="teacher-social">';
|
||
|
|
if ( $fb_profile ) {
|
||
|
|
echo '<a class="social-link" href="' . esc_url( $fb_profile ) . '" target="_blank">';
|
||
|
|
echo '<i class="dt-icon-facebook" aria-hidden="true"></i>';
|
||
|
|
echo '</a>';
|
||
|
|
};
|
||
|
|
|
||
|
|
if ( $tw_profile ) {
|
||
|
|
echo '<a class="social-link" href="' . esc_url( $tw_profile ) . '" target="_blank">';
|
||
|
|
echo '<i class="dt-icon-twitter" aria-hidden="true"></i>';
|
||
|
|
echo '</a>';
|
||
|
|
};
|
||
|
|
|
||
|
|
if ( $lk_profile ) {
|
||
|
|
echo '<a class="social-link" href="' . esc_url( $lk_profile ) . '" target="_blank">';
|
||
|
|
echo '<i class="dt-icon-linkedin" aria-hidden="true"></i>';
|
||
|
|
echo '</a>';
|
||
|
|
};
|
||
|
|
echo '</div>';
|
||
|
|
}
|
||
|
|
echo '</div>';
|
||
|
|
|
||
|
|
echo '<div class="teacher-content">';
|
||
|
|
echo '<h5 class="title">';
|
||
|
|
if ( $term->name ) {
|
||
|
|
echo '<a href="' . esc_url( $speaker_details_url ) . '">';
|
||
|
|
echo esc_html( $term->name );
|
||
|
|
echo '</a>';
|
||
|
|
};
|
||
|
|
echo '</h5>';
|
||
|
|
if ( $tribe_event_speaker_designation ) {
|
||
|
|
echo '<span class="speaker-degree">' . esc_html( $designation ). '</span>';
|
||
|
|
};
|
||
|
|
echo '</div>';
|
||
|
|
|
||
|
|
echo '</div>'; //single speaker
|
||
|
|
|
||
|
|
echo '</div>';
|
||
|
|
};
|