2011-12-09 20:16:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2012-08-14 18:05:45 +00:00
|
|
|
* Single Product tabs
|
|
|
|
*
|
|
|
|
* @author WooThemes
|
|
|
|
* @package WooCommerce/Templates
|
2013-02-10 17:33:13 +00:00
|
|
|
* @version 2.0.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' ) ) {
|
|
|
|
exit; // Exit if accessed directly
|
|
|
|
}
|
2012-10-15 10:57:58 +00:00
|
|
|
|
2013-02-10 17:33:13 +00:00
|
|
|
/**
|
|
|
|
* Filter tabs and allow third parties to add their own
|
|
|
|
*
|
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
|
|
|
|
2013-01-03 11:40:10 +00:00
|
|
|
<div class="woocommerce-tabs">
|
2012-04-03 09:34:02 +00:00
|
|
|
<ul class="tabs">
|
2013-02-10 17:33:13 +00:00
|
|
|
<?php foreach ( $tabs as $key => $tab ) : ?>
|
|
|
|
|
|
|
|
<li class="<?php echo $key ?>_tab">
|
|
|
|
<a href="#tab-<?php echo $key ?>"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', $tab['title'], $key ) ?></a>
|
|
|
|
</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 ) : ?>
|
|
|
|
|
|
|
|
<div class="panel entry-content" id="tab-<?php echo $key ?>">
|
|
|
|
<?php call_user_func( $tab['callback'], $key, $tab ) ?>
|
|
|
|
</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; ?>
|