Changeset 734599
- Timestamp:
- 07/01/2013 11:38:32 AM (13 years ago)
- Location:
- woocommerce-cart-tab
- Files:
-
- 17 added
- 2 edited
-
tags/0.2 (added)
-
tags/0.2/README.md (added)
-
tags/0.2/assets (added)
-
tags/0.2/assets/css (added)
-
tags/0.2/assets/css/mixins.less (added)
-
tags/0.2/assets/css/style.css (added)
-
tags/0.2/assets/css/style.less (added)
-
tags/0.2/cart-tab.php (added)
-
tags/0.2/languages (added)
-
tags/0.2/languages/index.html (added)
-
tags/0.2/languages/woocommerce-cart-tab-de_DE.mo (added)
-
tags/0.2/languages/woocommerce-cart-tab-de_DE.po (added)
-
tags/0.2/languages/woocommerce-cart-tab.po (added)
-
tags/0.2/readme.txt (added)
-
tags/0.2/screenshot-1.png (added)
-
tags/0.2/screenshot-2.png (added)
-
tags/0.2/screenshot-3.png (added)
-
trunk/cart-tab.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-cart-tab/trunk/cart-tab.php
r720420 r734599 3 3 Plugin Name: WooCommerce Cart Tab 4 4 Plugin URI: http://jameskoster.co.uk/tag/cart-tab/ 5 Version: 0. 1.15 Version: 0.2 6 6 Description: Displays a sitewide link to the cart which reveals the cart contents on hover. 7 7 Author: jameskoster … … 47 47 array( 48 48 'name' => __( 'Cart Widget', 'woocommerce-cart-tab' ), 49 'desc' => __( 'Display the cart widget on hover', 'woocommerce-cart-tab' ),49 'desc' => __( 'Display the cart widget on hover', 'woocommerce-cart-tab' ), 50 50 'id' => 'wc_ct_cart_widget', 51 51 'type' => 'checkbox' 52 ), 53 array( 54 'name' => __( 'Hide Empty Cart', 'woocommerce-cart-tab' ), 55 'desc' => __( 'Hide the cart tab if the cart is empty', 'woocommerce-cart-tab' ), 56 'id' => 'wc_ct_hide_empty_cart', 57 'type' => 'checkbox' 52 58 ), 53 59 array( … … 75 81 // Default options 76 82 add_option( 'wc_ct_cart_widget', 'yes' ); 83 add_option( 'wc_ct_hide_empty_cart', 'no' ); 77 84 add_option( 'wc_ct_skin', 'light' ); 78 85 add_option( 'wc_ct_horizontal_position', 'right' ); … … 126 133 function woocommerce_cart_tab() { 127 134 global $woocommerce; 128 $skin = get_option( 'wc_ct_skin' ); 129 $position = get_option( 'wc_ct_horizontal_position' ); 130 $widget = get_option( 'wc_ct_cart_widget' ); 131 if ( ! is_cart() && ! is_checkout() ) { 132 if ( $widget == 'yes' ) { 133 echo '<div class="' . $position . ' cart-tab ' . $skin . '">'; 134 } else { 135 echo '<div class="' . $position . ' cart-tab no-animation ' . $skin . '">'; 135 $skin = get_option( 'wc_ct_skin' ); 136 $position = get_option( 'wc_ct_horizontal_position' ); 137 $widget = get_option( 'wc_ct_cart_widget' ); 138 $hide_widget = get_option( 'wc_ct_hide_empty_cart' ); 139 140 if ( sizeof( $woocommerce->cart->cart_contents ) == 0 && $hide_widget == 'yes' ) { 141 // hide empty cart 142 } else { 143 if ( ! is_cart() && ! is_checkout() ) { 144 if ( $widget == 'yes' ) { 145 echo '<div class="' . $position . ' cart-tab ' . $skin . '">'; 146 } else { 147 echo '<div class="' . $position . ' cart-tab no-animation ' . $skin . '">'; 148 } 149 wcct_cart_button(); 150 // Display the widget if specified 151 if ( $widget == 'yes' ) { 152 // Check for WooCommerce 2.0 and display the cart widget 153 if ( version_compare( WOOCOMMERCE_VERSION, "2.0.0" ) >= 0 ) { 154 the_widget( 'WC_Widget_Cart', 'title=' ); 155 } else { 156 the_widget( 'WooCommerce_Widget_Cart', 'title=' ); 157 } 158 } 159 echo '</div>'; 136 160 } 137 wcct_cart_button();138 // Display the widget if specified139 if ( $widget == 'yes' ) {140 // Check for WooCommerce 2.0 and display the cart widget141 if ( version_compare( WOOCOMMERCE_VERSION, "2.0.0" ) >= 0 ) {142 the_widget( 'WC_Widget_Cart', 'title=' );143 } else {144 the_widget( 'WooCommerce_Widget_Cart', 'title=' );145 }146 }147 echo '</div>';148 161 } 149 162 } -
woocommerce-cart-tab/trunk/readme.txt
r720420 r734599 4 4 Requires at least: 3.5 5 5 Tested up to: 3.6 6 Stable tag: 0. 1.16 Stable tag: 0.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 47 47 == Changelog == 48 48 49 = 0.2 - 01/07/2013 = 50 * Added option to hide cart tab if the cart is empty. Kudos azhkuro. 51 49 52 = 0.1.1 - 30/05/2013 = 50 53 * Improved i18n
Note: See TracChangeset
for help on using the changeset viewer.