File: /www/wwwroot/www.sceybwg.com/wp-content/themes/Modular/template/module-page/theme-features.php
<?php
/**
* Template: 特点介绍
* @Author: 大胡子
* @Email: dahuzi@xintheme.com
* @Link: www.xintheme.com
* @Date: 2023-08-01 07:27:28
* @Last Modified by: dahuzi
* @Last Modified time: 2024-04-20 20:22:51
*/
if(is_array($module_content)){?>
<div class="section"<?php if( !empty($module_setting['module_bg']) ){ echo ' style="background:url('.$module_setting['module_bg'].') no-repeat center 0 / cover;"';}?>>
<div class="container">
<?php
if( !empty($module_setting['title_display']) ){?>
<div class="section-title <?php echo $wow_style;?><?php if( !empty($module_setting['module_bg']) ){ echo ' text-colour-white';}?>">
<?php
if( !empty($module_title) ){
echo '<strong>'.$module_title.'</strong>';
}
if( !empty($module_desc) ){
echo '<p>'.$module_desc.'</p>';
}
?>
</div>
<?php }?>
<div class="md-features <?php echo $module_setting['features_style'];?> <?php if( !empty($module_setting['features_border']) ){ echo 'features-border'; }?>">
<div class="<?php echo $module_setting['features_module'];?>">
<?php
foreach ($module_content as $value) {
$item_img = $value['item_img'];
$item_title = $value['item_title'];
$item_desc = $value['item_desc'];
$item_url = $value['item_url'];
if( !empty($item_url) ){
echo '<div class="features-item '.$wow_style.' item-url">';
}else{
echo '<div class="features-item '.$wow_style.'">';
}
if( !empty($item_img) ){
echo '<div class="item-icon">';
echo '<img loading="lazy" src="'.$item_img.'" alt="'.dahuzi_get_image_alt($item_img).'" />';
echo '</div>';
}
if( !empty($item_title) || !empty($item_desc) ){
echo '<div class="item-text">';
if( !empty($item_title) ){
echo '<h3>'.$item_title.'</h3>';
}
if( !empty($item_desc) ){
echo wpautop($item_desc);
}
echo '</div>';
}
if( !empty($item_url) ){
// 生成 aria-label(如果标题存在)
$aria_label = '';
if ( ! empty( $item_title ) ) {
$aria_label = ' aria-label="' . esc_attr( $item_title ) . '"';
}
echo '<a href="' . esc_url( $item_url ) . '" target="_blank"' . $aria_label . '></a>';
}
echo '</div>';
}?>
</div>
</div>
</div>
</div>
<?php }?>
<?php
//echo wpjam_print_r( $module_setting );
//echo wpjam_print_r( $module_content );
//echo wpjam_print_r( $module_style );