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
|
|
|
*
|
2016-02-12 11:28:41 +00:00
|
|
|
* @see http://docs.woothemes.com/document/template-structure/
|
2015-06-26 16:21:26 +00:00
|
|
|
* @author WooThemes
|
|
|
|
* @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.
|
2013-11-25 14:16:26 +00:00
|
|
|
* @see woocommerce_default_product_tabs()
|
2013-02-10 17:33:13 +00:00
|
|
|
*/
|
|
|
|
$tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
2012-04-03 09:34:02 +00:00
|
|
|
|
|
|
|
if ( ! empty( $tabs ) ) : ?>
|
2013-02-10 17:33:13 +00:00
|
|
|
|
2015-04-23 11:24:15 +00:00
|
|
|
<div class="woocommerce-tabs wc-tabs-wrapper">
|
|
|
|
<ul class="tabs wc-tabs">
|
2013-02-10 17:33:13 +00:00
|
|
|
<?php foreach ( $tabs as $key => $tab ) : ?>
|
2015-06-26 16:21:26 +00:00
|
|
|
<li class="<?php echo esc_attr( $key ); ?>_tab">
|
|
|
|
<a href="#tab-<?php echo esc_attr( $key ); ?>"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', esc_html( $tab['title'] ), $key ); ?></a>
|
2013-02-10 17:33:13 +00:00
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
2012-04-03 09:34:02 +00:00
|
|
|
</ul>
|
2013-02-10 17:33:13 +00:00
|
|
|
<?php foreach ( $tabs as $key => $tab ) : ?>
|
2016-04-22 20:24:54 +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 ); ?>">
|
2015-06-26 16:21:26 +00:00
|
|
|
<?php call_user_func( $tab['callback'], $key, $tab ); ?>
|
2013-02-10 17:33:13 +00:00
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
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; ?>
|