File: /www/wwwroot/www.sceybwg.com/wp-content/themes/Modular/template/module-page/theme-service.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-06-17 16:25:26
*/
if(is_array($module_content)){?>
<div class="section"<?php if(!empty($module_setting['radius'])){ echo ' style="--border-radius:'.$module_setting['radius'].'px;"';}?>>
<div class="container">
<?php
if( !empty($module_setting['title_display']) ){?>
<div class="section-title<?php if( !empty($module_setting['module_bg']) ){ echo ' text-colour-white';}?> <?php echo $wow_style;?>">
<?php
if( !empty($module_title) ){
echo '<strong>'.$module_title.'</strong>';
}
if( !empty($module_desc) ){
echo '<p>'.$module_desc.'</p>';
}
?>
</div>
<?php }?>
<div class="service-list list-item-<?php echo count($module_content);?> <?php echo $wow_style;?>">
<ul>
<?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'];
$item_target = isset($value['item_target']) && $value['item_target'] == '_blank' ? 'target="_blank"' : '';
?>
<li<?php if( !empty($item_img) ){ echo ' style="background-image:url('.$item_img.')"';}?>>
<div class="service-item-head">
<?php
if( !empty($item_title) ){
echo '<h3>'.$item_title.'</h3>';
}
?>
<?php if( !empty($item_url) ){ echo '<p>'.__( '查看更多', 'modular_theme' ).' <i class="ri-arrow-right-line"></i></p>';}?>
</div>
<div class="service-item-info">
<?php
if( !empty($item_title) ){
echo '<h3>'.$item_title.'</h3>';
}
?>
<div class="service-item-info_s">
<?php
if( !empty($item_desc) ){
echo wpautop($item_desc);
}
if( !empty($item_url) ){
echo '<span>'.__( '查看更多', 'modular_theme' ).' <i class="ri-arrow-right-line"></i></span>';
}
?>
</div>
</div>
<?php
if( !empty($item_url) ){
// 生成 aria-label(如果标题存在)
$aria_label = '';
if ( ! empty( $item_title ) ) {
$aria_label = ' aria-label="' . esc_attr( $item_title ) . '"';
}
echo '<a href="'.$item_url.'" '.$item_target.' class="service-item-url"' . $aria_label . '></a>';
}
?>
</li>
<?php }?>
</ul>
</div>
</div>
</div>
<?php }?>
<?php
//echo wpjam_print_r( $module_setting );
//echo wpjam_print_r( $module_content );
//echo wpjam_print_r( $module_style );