2011-12-09 20:16:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2015-11-03 13:53:50 +00:00
|
|
|
* Single Product tabs
|
2012-08-14 18:05:45 +00:00
|
|
|
*
|
2015-11-03 13:31:20 +00:00
|
|
|
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/tabs/tabs.php.
|
2015-10-01 14:07:20 +00:00
|
|
|
*
|
2016-02-12 11:28:41 +00:00
|
|
|
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
|
|
|
* (the theme developer) will need to copy the new files to your theme to
|
|
|
|
* maintain compatibility. We try to do this as little as possible, but it does
|
|
|
|
* happen. When this occurs the version of the template file will be bumped and
|
|
|
|
* the readme will list any important changes.
|
2015-10-01 14:07:20 +00:00
|
|
|
*
|
2019-09-26 17:18:56 +00:00
|
|
|
* @see https://docs.woocommerce.com/document/template-structure/
|
2015-06-26 16:21:26 +00:00
|
|
|
* @package WooCommerce/Templates
|
|
|
|
* @version 2.4.0
|
2011-12-09 20:16:34 +00:00
|
|
|
*/
|
2012-04-03 09:34:02 +00:00
|
|
|
|
2014-09-22 16:37:57 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
2015-04-23 11:24:15 +00:00
|
|
|
exit;
|
2014-09-22 16:37:57 +00:00
|
|
|
}
|
2012-10-15 10:57:58 +00:00
|
|
|
|
2013-02-10 17:33:13 +00:00
|
|
|
/**
|
2015-11-03 13:31:20 +00:00
|
|
|
* Filter tabs and allow third parties to add their own.
|
2013-02-10 17:33:13 +00:00
|
|
|
*
|
2013-02-10 18:49:22 +00:00
|
|
|
* Each tab is an array containing title, callback and priority.
|
2019-09-26 17:18:56 +00:00
|
|
|
*
|
2013-11-25 14:16:26 +00:00
|
|
|
* @see woocommerce_default_product_tabs()
|
2013-02-10 17:33:13 +00:00
|
|
|
*/
|
2019-09-26 17:18:56 +00:00
|
|
|
$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
2012-04-03 09:34:02 +00:00
|
|
|
|
2019-09-26 17:18:56 +00:00
|
|
|
if ( ! empty( $product_tabs ) ) : ?>
|
2013-02-10 17:33:13 +00:00
|
|
|
|
2015-04-23 11:24:15 +00:00
|
|
|
<div class="woocommerce-tabs wc-tabs-wrapper">
|
2016-11-04 22:44:55 +00:00
|
|
|
<ul class="tabs wc-tabs" role="tablist">
|
2019-09-26 17:18:56 +00:00
|
|
|
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
2016-11-04 23:56:14 +00:00
|
|
|
<li class="<?php echo esc_attr( $key ); ?>_tab" id="tab-title-<?php echo esc_attr( $key ); ?>" role="tab" aria-controls="tab-<?php echo esc_attr( $key ); ?>">
|
2019-09-26 17:18:56 +00:00
|
|
|
<a href="#tab-<?php echo esc_attr( $key ); ?>">
|
|
|
|
<?php echo wp_kses_post( apply_filters( 'woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key ) ); ?>
|
|
|
|
</a>
|
2013-02-10 17:33:13 +00:00
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
2012-04-03 09:34:02 +00:00
|
|
|
</ul>
|
2019-09-26 17:18:56 +00:00
|
|
|
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
2016-11-04 23:56:14 +00:00
|
|
|
<div class="woocommerce-Tabs-panel woocommerce-Tabs-panel--<?php echo esc_attr( $key ); ?> panel entry-content wc-tab" id="tab-<?php echo esc_attr( $key ); ?>" role="tabpanel" aria-labelledby="tab-title-<?php echo esc_attr( $key ); ?>">
|
2019-09-26 17:18:56 +00:00
|
|
|
<?php
|
|
|
|
if ( isset( $product_tab['callback'] ) ) {
|
|
|
|
call_user_func( $product_tab['callback'], $key, $product_tab );
|
|
|
|
}
|
|
|
|
?>
|
2013-02-10 17:33:13 +00:00
|
|
|
</div>
|
2019-09-26 17:18:56 +00:00
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
<?php do_action( 'woocommerce_after_tabs' ); ?>
|
2012-04-03 09:34:02 +00:00
|
|
|
</div>
|
2013-02-10 17:33:13 +00:00
|
|
|
|
2014-09-22 16:37:57 +00:00
|
|
|
<?php endif; ?>
|