94 lines
5.5 KiB
PHP
94 lines
5.5 KiB
PHP
<?php
|
|
/**
|
|
* Theme footer.
|
|
*
|
|
* @package MING
|
|
*/
|
|
|
|
$ming_base = is_front_page() ? '' : esc_url( home_url( '/' ) );
|
|
$ming_company = get_theme_mod( 'ming_company', '明序有限公司' );
|
|
$ming_email = get_theme_mod( 'ming_email', '' );
|
|
$ming_phone = get_theme_mod( 'ming_phone', '' );
|
|
$ming_address = get_theme_mod( 'ming_address', '' );
|
|
$ming_taxid = get_theme_mod( 'ming_taxid', '' );
|
|
$ming_facebook = get_theme_mod( 'ming_facebook', '' );
|
|
$ming_ig = get_theme_mod( 'ming_instagram', '' );
|
|
$ming_line = get_theme_mod( 'ming_line', '' );
|
|
$ming_has_social = ( $ming_facebook || $ming_ig || $ming_line );
|
|
$ming_mailto = $ming_email ? $ming_email : 'hello@ming.example';
|
|
?>
|
|
|
|
<footer class="footer">
|
|
<div class="wrap footer-grid">
|
|
<div>
|
|
<div class="flogo">
|
|
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/img/logo-light.png' ); ?>" alt="MING 明命" width="847" height="811">
|
|
</div>
|
|
<p class="fdesc">以時間為序,以土地為根,以光明為引。MING 專注於陶瓷內膽飲具,讓喝水這件日常小事,成為人與自然之間溫柔的連結。</p>
|
|
<?php if ( $ming_has_social ) : ?>
|
|
<div class="social">
|
|
<?php if ( $ming_facebook ) : ?>
|
|
<a href="<?php echo esc_url( $ming_facebook ); ?>" target="_blank" rel="noopener" aria-label="Facebook" title="Facebook">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/></svg>
|
|
</a>
|
|
<?php endif; ?>
|
|
<?php if ( $ming_ig ) : ?>
|
|
<a href="<?php echo esc_url( $ming_ig ); ?>" target="_blank" rel="noopener" aria-label="Instagram" title="Instagram">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="4.5"/><circle cx="12" cy="12" r="3.8"/><circle cx="16.8" cy="7.2" r=".9" fill="currentColor" stroke="none"/></svg>
|
|
</a>
|
|
<?php endif; ?>
|
|
<?php if ( $ming_line ) : ?>
|
|
<a href="<?php echo esc_url( $ming_line ); ?>" target="_blank" rel="noopener" aria-label="LINE" title="LINE">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="font-family:var(--sans)"><path d="M12 4C7 4 3 6.9 3 10.6c0 3.3 2.9 6 6.8 6.6.3.1.7.2.1.6 0 .9l-.4 1.3c0 .2-.1.6.5.4.6-.3 3.3-2 4.5-2.7 2.9-1.3 4.8-3.6 4.8-7C21 6.9 17 4 12 4z"/><text x="12" y="13" text-anchor="middle" font-size="5.2" font-weight="600" fill="currentColor" stroke="none" letter-spacing=".5">LINE</text></svg>
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div>
|
|
<h4>顧客服務</h4>
|
|
<ul>
|
|
<?php if ( has_nav_menu( 'footer_service' ) ) : ?>
|
|
<?php wp_nav_menu( array( 'theme_location' => 'footer_service', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 1 ) ); ?>
|
|
<?php else : ?>
|
|
<li><a href="<?php echo esc_url( home_url( '/contact-us/' ) ); ?>">聯絡我們</a></li>
|
|
<li><a href="<?php echo esc_url( home_url( '/faq/' ) ); ?>">常見問題 FAQ</a></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
<h4>購物指南</h4>
|
|
<ul>
|
|
<?php if ( has_nav_menu( 'footer_guide' ) ) : ?>
|
|
<?php wp_nav_menu( array( 'theme_location' => 'footer_guide', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 1 ) ); ?>
|
|
<?php else : ?>
|
|
<li><a href="<?php echo esc_url( home_url( '/ordering-guide/' ) ); ?>">訂購須知</a></li>
|
|
<li><a href="<?php echo esc_url( home_url( '/return-policy/' ) ); ?>">退換貨政策</a></li>
|
|
<li><a href="<?php echo esc_url( home_url( '/privacy-policy/' ) ); ?>">隱私權政策</a></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
<h4>品牌探索</h4>
|
|
<ul>
|
|
<?php if ( has_nav_menu( 'footer_brand' ) ) : ?>
|
|
<?php wp_nav_menu( array( 'theme_location' => 'footer_brand', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 1 ) ); ?>
|
|
<?php else : ?>
|
|
<li><a href="<?php echo esc_attr( ming_page_url_by_template( 'template-brand.php', $ming_base . '#philosophy' ) ); ?>">關於我們</a></li>
|
|
<li><a href="<?php echo esc_attr( ming_page_url_by_template( 'template-ceramic.php', $ming_base . '#core' ) ); ?>">陶瓷內膽</a></li>
|
|
<li><a href="<?php echo esc_attr( ming_page_url_by_template( 'template-vote.php', $ming_base ) ); ?>">新品許願</a></li>
|
|
<li><a href="<?php echo esc_attr( ming_shop_url() ); ?>">線上商店</a></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="footer-bottom">
|
|
<span>© <?php echo esc_html( gmdate( 'Y' ) ); ?> <?php echo esc_html( $ming_company ? $ming_company : 'MING 明命' ); ?><?php if ( $ming_taxid ) : ?> · 統一編號 <?php echo esc_html( $ming_taxid ); ?><?php endif; ?><?php if ( $ming_phone ) : ?> · <a href="tel:<?php echo esc_attr( preg_replace( '/[^0-9+\-]/', '', $ming_phone ) ); ?>"><?php echo esc_html( $ming_phone ); ?></a><?php endif; ?><?php if ( $ming_email ) : ?> · <a href="mailto:<?php echo esc_attr( $ming_email ); ?>"><?php echo esc_html( $ming_email ); ?></a><?php endif; ?><?php if ( $ming_address ) : ?> · <?php echo esc_html( $ming_address ); ?><?php endif; ?></span>
|
|
<span>明亮生命 自然連結</span>
|
|
</div>
|
|
</footer>
|
|
|
|
<?php wp_footer(); ?>
|
|
</body>
|
|
</html>
|