| 1 |
<?php |
| 2 |
/* Call the action for team section */ |
| 3 |
add_action('innofit_team','innofit_team_section'); |
| 4 |
/* Function for team section*/ |
| 5 |
function innofit_team_section() |
| 6 |
{ |
| 7 |
$team_options = get_theme_mod('innofit_team_content'); |
| 8 |
$team_section_enable = get_theme_mod('team_section_enable','on'); |
| 9 |
if($team_section_enable !='off') |
| 10 |
{ |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
?> |
| 15 |
<!-- Team Section --> |
| 16 |
<section class="section-module team-members" id="team"> |
| 17 |
|
| 18 |
<div class="container"> |
| 19 |
|
| 20 |
<?php |
| 21 |
$home_team_section_title = get_theme_mod('home_team_section_title',__('Meet our superheroes','spicebox')); |
| 22 |
$home_team_section_discription = get_theme_mod('home_team_section_discription',__('The best team available','spicebox')); |
| 23 |
if(($home_team_section_title) || ($home_team_section_discription)!='' ) { |
| 24 |
?> |
| 25 |
<div class="row"> |
| 26 |
<div class="col-md-12"> |
| 27 |
<div class="section-header"> |
| 28 |
<p class="section-subtitle"><?php echo $home_team_section_title; ?></p> |
| 29 |
<h1 class="section-title"><?php echo $home_team_section_discription; ?></h1> |
| 30 |
</div> |
| 31 |
</div> |
| 32 |
</div> |
| 33 |
<?php } ?> |
| 34 |
|
| 35 |
</div> |
| 36 |
|
| 37 |
<div class="container-fluid fullwidth"> |
| 38 |
|
| 39 |
<div class="row"> |
| 40 |
<?php $team_options = json_decode($team_options); |
| 41 |
if( $team_options!='' ) |
| 42 |
{ |
| 43 |
foreach($team_options as $team_item){ |
| 44 |
|
| 45 |
$image = ! empty( $team_item->image_url ) ? apply_filters( 'innofit_translate_single_string', $team_item->image_url, 'Team section' ) : ''; |
| 46 |
$title = ! empty( $team_item->title ) ? apply_filters( 'innofit_translate_single_string', $team_item->title, 'Team section' ) : ''; |
| 47 |
$subtitle = ! empty( $team_item->subtitle ) ? apply_filters( 'innofit_translate_single_string', $team_item->subtitle, 'Team section' ) : ''; |
| 48 |
$link = ! empty( $team_item->link ) ? apply_filters( 'innofit_translate_single_string', $team_item->link, 'Team section' ) : ''; |
| 49 |
$open_new_tab = $team_item->open_new_tab; ?> |
| 50 |
<div class="item"> |
| 51 |
<div class="col-md-3 col-sm-6 col-xs-12"> |
| 52 |
|
| 53 |
<div class="team-grid"> |
| 54 |
<div class="img-holder"> |
| 55 |
<?php if ( ! empty( $image ) ) : ?> |
| 56 |
<?php |
| 57 |
if ( ! empty( $link ) ) : |
| 58 |
$link_html = '<a href="' . esc_url( $link ) . '"'; |
| 59 |
if ( function_exists( 'innofit_is_external_url' ) ) { |
| 60 |
$link_html .= innofit_is_external_url( $link ); |
| 61 |
} |
| 62 |
$link_html .= '>'; |
| 63 |
echo wp_kses_post( $link_html ); |
| 64 |
endif; |
| 65 |
echo '<img class="img" src="' . esc_url( $image ) . '"'; |
| 66 |
if ( ! empty( $title ) ) { |
| 67 |
echo 'alt="' . esc_attr( $title ) . '" title="' . esc_attr( $title ) . '"'; |
| 68 |
} |
| 69 |
echo '/>'; |
| 70 |
if ( ! empty( $link ) ) { |
| 71 |
echo '</a>'; |
| 72 |
} |
| 73 |
?> |
| 74 |
<?php endif; ?> |
| 75 |
</div> |
| 76 |
<div class="details"> |
| 77 |
<?php if ( ! empty( $title ) ) : ?> |
| 78 |
|
| 79 |
<?php if ( ! empty( $link ) ) : ?> |
| 80 |
<a href="<?php echo $link ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>> |
| 81 |
<?php endif; ?> |
| 82 |
<h6 class="name"><?php echo esc_html( $title ); ?></h6> |
| 83 |
<?php if ( ! empty( $link ) ) : ?> |
| 84 |
</a> |
| 85 |
<?php endif; ?> |
| 86 |
|
| 87 |
<?php endif; ?><?php if ( ! empty( $subtitle ) ) : ?> |
| 88 |
<span class="position"><?php echo esc_html( $subtitle ); ?></span> |
| 89 |
<?php endif; |
| 90 |
if ( ! empty( $team_item->social_repeater ) ) : |
| 91 |
$icons = html_entity_decode( $team_item->social_repeater ); |
| 92 |
$icons_decoded = json_decode( $icons, true ); |
| 93 |
if ( ! empty( $icons_decoded ) ) : ?> |
| 94 |
<ul class="social-links"> |
| 95 |
<?php |
| 96 |
foreach ( $icons_decoded as $value ) { |
| 97 |
$social_icon = ! empty( $value['icon'] ) ? apply_filters( 'innofit_translate_single_string', $value['icon'], 'Team section' ) : ''; |
| 98 |
$social_link = ! empty( $value['link'] ) ? apply_filters( 'innofit_translate_single_string', $value['link'], 'Team section' ) : ''; |
| 99 |
|
| 100 |
if ( ! empty( $social_icon ) ) { |
| 101 |
|
| 102 |
?> |
| 103 |
|
| 104 |
|
| 105 |
<li><a <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?> href="<?php echo esc_url( $social_link ); ?>" class="btn btn-just-icon btn-simple"><i class="fa <?php echo esc_attr( $social_icon ); ?> "></i></a></li> |
| 106 |
|
| 107 |
<?php |
| 108 |
|
| 109 |
|
| 110 |
} |
| 111 |
|
| 112 |
} endif; |
| 113 |
endif; |
| 114 |
|
| 115 |
|
| 116 |
?> |
| 117 |
</ul> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
</div> |
| 121 |
</div> |
| 122 |
<?php } } else { ?> |
| 123 |
|
| 124 |
|
| 125 |
<div class="col-md-3 col-sm-6 col-xs-12"> |
| 126 |
<div class="team-grid"> |
| 127 |
<div class="img-holder"> |
| 128 |
<img src="<?php echo SPICEB_PLUGIN_URL ?>inc/innofit/images/team/team1.jpg" alt="Danial Wilson"> |
| 129 |
</div> |
| 130 |
<div class="details"> |
| 131 |
<h6 class="name"><?php echo 'Danial Wilson'; ?></h6> |
| 132 |
<span class="position"><?php _e('Senior Manager','spicebox'); ?></span> |
| 133 |
<ul class="social-links"> |
| 134 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-facebook"></i></a></li> |
| 135 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-twitter"></i></a></li> |
| 136 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-google-plus"></i></a></li> |
| 137 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-behance"></i></a></li> |
| 138 |
</ul> |
| 139 |
</div> |
| 140 |
</div> |
| 141 |
</div> |
| 142 |
<div class="col-md-3 col-sm-6 col-xs-12"> |
| 143 |
<div class="team-grid"> |
| 144 |
<div class="img-holder"> |
| 145 |
<img src="<?php echo SPICEB_PLUGIN_URL ?>inc/innofit/images/team/team2.jpg" alt="Danial Wilson"> |
| 146 |
</div> |
| 147 |
<div class="details"> |
| 148 |
<h6 class="name"><?php echo 'Amanda Smith'; ?></h6> |
| 149 |
<span class="position"><?php _e('Founder & CEO','spicebox'); ?></span> |
| 150 |
<ul class="social-links"> |
| 151 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-facebook"></i></a></li> |
| 152 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-twitter"></i></a></li> |
| 153 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-google-plus"></i></a></li> |
| 154 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-behance"></i></a></li> |
| 155 |
</ul> |
| 156 |
</div> |
| 157 |
</div> |
| 158 |
</div> |
| 159 |
<div class="col-md-3 col-sm-6 col-xs-12"> |
| 160 |
<div class="team-grid"> |
| 161 |
<div class="img-holder"> |
| 162 |
<img src="<?php echo SPICEB_PLUGIN_URL ?>inc/innofit/images/team/team3.jpg" alt="Danial Wilson"> |
| 163 |
</div> |
| 164 |
<div class="details"> |
| 165 |
<h6 class="name"><?php echo 'Victoria Wills'; ?></h6> |
| 166 |
<span class="position"><?php _e('Web Master','spicebox'); ?></span> |
| 167 |
<ul class="social-links"> |
| 168 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-facebook"></i></a></li> |
| 169 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-twitter"></i></a></li> |
| 170 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-google-plus"></i></a></li> |
| 171 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-behance"></i></a></li> |
| 172 |
</ul> |
| 173 |
</div> |
| 174 |
</div> |
| 175 |
</div> |
| 176 |
<div class="col-md-3 col-sm-6 col-xs-12"> |
| 177 |
<div class="team-grid"> |
| 178 |
<div class="img-holder"> |
| 179 |
<img src="<?php echo SPICEB_PLUGIN_URL ?>inc/innofit/images/team/team4.jpg" alt="Danial Wilson"> |
| 180 |
</div> |
| 181 |
<div class="details"> |
| 182 |
<h6 class="name"><?php echo 'Travis Marcus'; ?></h6> |
| 183 |
<span class="position"><?php _e('UI Developer','spicebox'); ?></span> |
| 184 |
<ul class="social-links"> |
| 185 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-facebook"></i></a></li> |
| 186 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-twitter"></i></a></li> |
| 187 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-google-plus"></i></a></li> |
| 188 |
<li><a href="#" class="btn btn-just-icon btn-simple"><i class="fa fa-behance"></i></a></li> |
| 189 |
</ul> |
| 190 |
</div> |
| 191 |
</div> |
| 192 |
</div> |
| 193 |
<?php } ?> |
| 194 |
</div> |
| 195 |
</div> |
| 196 |
</section> |
| 197 |
<!--/End of Team Section--> |
| 198 |
<?php } }?> |