Custom Product Tabs for WooCommerce - Version 1.4.2

Version Description

  • February 17th, 2016 =
  • Updated the internationalization strings ( yikes-inc-woocommerce-custom-product-tabs to yikes-inc-easy-custom-woocommerce-product-tabs )
Download this release

Release Info

Developer eherman24
Plugin Icon 128x128 Custom Product Tabs for WooCommerce
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.4.1 to 1.4.2

readme.txt CHANGED
@@ -3,10 +3,10 @@ Contributors: yikesinc, eherman24, liljimmi
3
  Donate link: http://yikesinc.com
4
  Tags: woocommerce, product tabs, repeatable, duplicate, customize, custom, tabs, product, woo, commerce
5
  Requires at least: 3.8
6
- Tested up to: 4.4.1
7
  Requires WooCommerce at least: 2.0
8
- Tested WooCommerce up to: 2.4.12
9
- Stable tag: 1.4.1
10
  License: GPLv2 or later
11
 
12
  This plugin extends WooCommerce to allow site admins to add custom tabs to products.
@@ -55,7 +55,10 @@ Yes! Since v1.4 we've added the necessary hooks and filters to ensure the custom
55
 
56
  == Changelog ==
57
 
58
- = 1.4 - August 20th, 2015 =
 
 
 
59
  * Fixed conflict with other CSV export plugins for WooCommerce
60
  * Now custom product tab and row data/headers only get exported via 'Tools > Export > Products'
61
 
@@ -77,4 +80,5 @@ Yes! Since v1.4 we've added the necessary hooks and filters to ensure the custom
77
  * Initial Release
78
 
79
  == Upgrade Notice ==
80
- * Enhancement: Enabled WYSIWYG editor on tab content containers (enables shortcode and content to pass through the_content() filter)
 
3
  Donate link: http://yikesinc.com
4
  Tags: woocommerce, product tabs, repeatable, duplicate, customize, custom, tabs, product, woo, commerce
5
  Requires at least: 3.8
6
+ Tested up to: 4.4.2
7
  Requires WooCommerce at least: 2.0
8
+ Tested WooCommerce up to: 2.5.2
9
+ Stable tag: 1.4.2
10
  License: GPLv2 or later
11
 
12
  This plugin extends WooCommerce to allow site admins to add custom tabs to products.
55
 
56
  == Changelog ==
57
 
58
+ = 1.4.2 - February 17th, 2016 =
59
+ * Updated the internationalization strings ( `yikes-inc-woocommerce-custom-product-tabs` to `yikes-inc-easy-custom-woocommerce-product-tabs` )
60
+
61
+ = 1.4.1 - August 20th, 2015 =
62
  * Fixed conflict with other CSV export plugins for WooCommerce
63
  * Now custom product tab and row data/headers only get exported via 'Tools > Export > Products'
64
 
80
  * Initial Release
81
 
82
  == Upgrade Notice ==
83
+ = 1.4.2 - February 17th, 2016 =
84
+ * Updated the internationalization strings ( `yikes-inc-woocommerce-custom-product-tabs` to `yikes-inc-easy-custom-woocommerce-product-tabs` )
yikes-inc-easy-custom-woocommerce-product-tabs.php CHANGED
@@ -5,9 +5,9 @@
5
  * Description: Extend WooCommerce to add and manage custom product tabs. Create as many product tabs as needed per product.
6
  * Author: YIKES Inc
7
  * Author URI: http://www.yikesinc.com
8
- * Version: 1.4.1
9
  * Tested up to: 4.3
10
- * Text Domain: 'yikes-inc-woocommerce-custom-product-tabs'
11
  * Domain Path: /i18n/languages/
12
  *
13
  * Copyright: (c) 2014-2015 YIKES Inc.
@@ -49,8 +49,8 @@
49
  </style>
50
  <!-- display our error message -->
51
  <div class="error">
52
- <p><?php _e( 'YIKES YIKES Custom Product Tabs for WooCommerce could not be activated because WooCommerce is not installed and active.', 'yikes-inc-woocommerce-custom-product-tabs' ); ?></p>
53
- <p><?php _e( 'Please install and activate ', 'yikes-inc-woocommerce-custom-product-tabs' ); ?><a href="<?php echo admin_url( 'plugin-install.php?tab=search&type=term&s=WooCommerce+-+excelling+eCommerce' ); ?>" title="WooCommerce">WooCommerce</a><?php _e( ' before activating the plugin.', 'yikes-inc-woocommerce-custom-product-tabs' ); ?></p>
54
  </div>
55
  <?php
56
  }
@@ -66,7 +66,7 @@
66
  const VERSION = "1.3";
67
 
68
  /** plugin text domain */
69
- const TEXT_DOMAIN = 'yikes-inc-woocommerce-custom-product-tabs';
70
 
71
  /** plugin version name */
72
  const VERSION_OPTION_NAME = 'yikes_woocommerce_custom_product_tabs_db_version';
@@ -135,7 +135,7 @@
135
  */
136
  public function load_translation() {
137
  // localization
138
- load_plugin_textdomain( 'yikes-inc-woocommerce-custom-product-tabs', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/languages' );
139
  }
140
 
141
 
@@ -196,7 +196,7 @@
196
  $i = 25; // setup priorty to loop over, andrender tabs in proper order
197
  foreach ( $this->tab_data as $tab ) {
198
  $tabs[ $tab['id'] ] = array(
199
- 'title' => __( $tab['title'], 'yikes-inc-woocommerce-custom-product-tabs' ),
200
  'priority' => $i++,
201
  'callback' => array( $this, 'custom_product_tabs_panel_content' ),
202
  'content' => $tab['content'], // custom field
@@ -242,7 +242,7 @@
242
  * Adds a new tab to the Product Data postbox in the admin product interface
243
  */
244
  public function render_custom_product_tabs() {
245
- echo "<li class=\"yikes_wc_product_tabs_tab\"><a href=\"#yikes_woocommerce_custom_product_tabs\">" . __( 'Custom Tabs', 'yikes-inc-woocommerce-custom-product-tabs' ) . "</a></li>";
246
  }
247
 
248
 
@@ -274,15 +274,15 @@
274
 
275
  echo $this->review_us_container();
276
 
277
- echo '<div class="yikes-woo-tabs-hidden-how-to-info"><h3 style="padding-top:0;padding-bottom:0;">' . __( "How To" , 'yikes-inc-woocommerce-custom-product-tabs' ) . ':</h3><p style="margin:0;padding-left:13px;">' . __( "To generate tabs, click 'Add Another Tab' at the bottom of this container." , 'yikes-inc-woocommerce-custom-product-tabs' ) . ' ' . __( "To delete tabs, click 'Remove Tab' to the right of the title field." , 'yikes-inc-woocommerce-custom-product-tabs' ) . '</p> <p style="padding:0 0 0 13px;margin-top:0;margin-bottom:0;"><em>' . __( "Note : Re-save the product to initialize the WordPress content editor on newly created tab content." , 'yikes-inc-woocommerce-custom-product-tabs' ) . '</em></p></div>';
278
- echo '<div class="dashicons dashicons-editor-help yikes-tabs-how-to-toggle" title="' . __( "Help Me!" , 'yikes-inc-woocommerce-custom-product-tabs' ) . '"></div>';
279
 
280
  // set up the initial display, by looping
281
  foreach ( $tab_data as $tab ) {
282
  if ( $i != 1 ) { ?>
283
  <section class="button-holder" alt="<?php echo $i; ?>">
284
  <!-- Remove tab button, should not generate for the first tab! -->
285
- <a href="#" onclick="return false;" class="button-secondary remove_this_tab"><span class="dashicons dashicons-no-alt" style="line-height:1.3;"></span><?php echo __( 'Remove Tab' , 'yikes-inc-woocommerce-custom-product-tabs' ); ?></a>
286
  <div style="text-align:center;margin-top:.5em;">
287
  <span class="dashicons dashicons-arrow-up move-tab-data-up"></span>
288
  <span class="dashicons dashicons-arrow-down move-tab-data-down"></span>
@@ -296,11 +296,11 @@
296
  </div>
297
  </section>
298
  <?php }
299
- woocommerce_wp_text_input( array( 'id' => '_yikes_wc_custom_repeatable_product_tabs_tab_title_' . $i , 'label' => __( 'Tab Title', 'yikes-inc-woocommerce-custom-product-tabs' ), 'description' => '', 'value' => $tab['title'] , 'placeholder' => 'Custom Tab Title' , 'class' => 'yikes_woo_tabs_title_field') );
300
  $this->woocommerce_wp_wysiwyg_input( array(
301
  'id' => '_yikes_wc_custom_repeatable_product_tabs_tab_content_' . $i ,
302
- 'label' => __( 'Content', 'yikes-inc-woocommerce-custom-product-tabs' ),
303
- 'placeholder' => __( 'HTML and text to display.', 'yikes-inc-woocommerce-custom-product-tabs' ),
304
  'value' => $tab['content'],
305
  'style' => 'width:70%;height:10.5em;',
306
  'class' => 'yikes_woo_tabs_content_field',
@@ -314,11 +314,11 @@
314
 
315
  ?>
316
  <div id="duplicate_this_row">
317
- <a href="#" onclick="return false;" class="button-secondary remove_this_tab" style="float:right;margin-right:4.25em;"><span class="dashicons dashicons-no-alt" style="line-height:1.3;"></span><?php echo __( 'Remove Tab' , 'yikes-inc-woocommerce-custom-product-tabs' ); ?></a>
318
  <?php
319
  // lets add an empty row, to use for duplicating purposes
320
- woocommerce_wp_text_input( array( 'id' => 'hidden_duplicator_row_title' , 'label' => __( 'Tab Title', 'yikes-inc-woocommerce-custom-product-tabs' ), 'description' => '', 'placeholder' => 'Custom Tab Title' , 'class' => 'yikes_woo_tabs_title_field' ) );
321
- $this->woocommerce_wp_textarea_input( array( 'id' => 'hidden_duplicator_row_content' , 'label' => __( 'Content', 'yikes-inc-woocommerce-custom-product-tabs' ), 'placeholder' => __( 'HTML and text to display.', 'yikes-inc-woocommerce-custom-product-tabs' ), 'style' => 'width:70%;height:10.5em;' , 'class' => 'yikes_woo_tabs_content_field' ) );
322
  ?>
323
  <section class="button-holder" alt="<?php echo $i; ?>">
324
  <div style="text-align:center;">
@@ -330,7 +330,7 @@
330
 
331
  <p>
332
  <label style="display:block;" for="_yikes_wc_custom_repeatable_product_tabs_tab_content_<?php echo $i; ?>"></label>
333
- <a href="#" class="button-secondary" id="add_another_tab"><em class="dashicons dashicons-plus-alt" style="line-height:1.8;font-size:14px;"></em><?php echo __( 'Add Another Tab' , 'yikes-inc-woocommerce-custom-product-tabs' ); ?></a>
334
  </p>
335
 
336
  <?php
5
  * Description: Extend WooCommerce to add and manage custom product tabs. Create as many product tabs as needed per product.
6
  * Author: YIKES Inc
7
  * Author URI: http://www.yikesinc.com
8
+ * Version: 1.4.2
9
  * Tested up to: 4.3
10
+ * Text Domain: yikes-inc-easy-custom-woocommerce-product-tabs
11
  * Domain Path: /i18n/languages/
12
  *
13
  * Copyright: (c) 2014-2015 YIKES Inc.
49
  </style>
50
  <!-- display our error message -->
51
  <div class="error">
52
+ <p><?php _e( 'YIKES YIKES Custom Product Tabs for WooCommerce could not be activated because WooCommerce is not installed and active.', 'yikes-inc-easy-custom-woocommerce-product-tabs' ); ?></p>
53
+ <p><?php _e( 'Please install and activate ', 'yikes-inc-easy-custom-woocommerce-product-tabs' ); ?><a href="<?php echo admin_url( 'plugin-install.php?tab=search&type=term&s=WooCommerce+-+excelling+eCommerce' ); ?>" title="WooCommerce">WooCommerce</a><?php _e( ' before activating the plugin.', 'yikes-inc-easy-custom-woocommerce-product-tabs' ); ?></p>
54
  </div>
55
  <?php
56
  }
66
  const VERSION = "1.3";
67
 
68
  /** plugin text domain */
69
+ const TEXT_DOMAIN = 'yikes-inc-easy-custom-woocommerce-product-tabs';
70
 
71
  /** plugin version name */
72
  const VERSION_OPTION_NAME = 'yikes_woocommerce_custom_product_tabs_db_version';
135
  */
136
  public function load_translation() {
137
  // localization
138
+ load_plugin_textdomain( 'yikes-inc-easy-custom-woocommerce-product-tabs', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/languages' );
139
  }
140
 
141
 
196
  $i = 25; // setup priorty to loop over, andrender tabs in proper order
197
  foreach ( $this->tab_data as $tab ) {
198
  $tabs[ $tab['id'] ] = array(
199
+ 'title' => __( $tab['title'], 'yikes-inc-easy-custom-woocommerce-product-tabs' ),
200
  'priority' => $i++,
201
  'callback' => array( $this, 'custom_product_tabs_panel_content' ),
202
  'content' => $tab['content'], // custom field
242
  * Adds a new tab to the Product Data postbox in the admin product interface
243
  */
244
  public function render_custom_product_tabs() {
245
+ echo "<li class=\"yikes_wc_product_tabs_tab\"><a href=\"#yikes_woocommerce_custom_product_tabs\">" . __( 'Custom Tabs', 'yikes-inc-easy-custom-woocommerce-product-tabs' ) . "</a></li>";
246
  }
247
 
248
 
274
 
275
  echo $this->review_us_container();
276
 
277
+ echo '<div class="yikes-woo-tabs-hidden-how-to-info"><h3 style="padding-top:0;padding-bottom:0;">' . __( "How To" , 'yikes-inc-easy-custom-woocommerce-product-tabs' ) . ':</h3><p style="margin:0;padding-left:13px;">' . __( "To generate tabs, click 'Add Another Tab' at the bottom of this container." , 'yikes-inc-easy-custom-woocommerce-product-tabs' ) . ' ' . __( "To delete tabs, click 'Remove Tab' to the right of the title field." , 'yikes-inc-easy-custom-woocommerce-product-tabs' ) . '</p> <p style="padding:0 0 0 13px;margin-top:0;margin-bottom:0;"><em>' . __( "Note : Re-save the product to initialize the WordPress content editor on newly created tab content." , 'yikes-inc-easy-custom-woocommerce-product-tabs' ) . '</em></p></div>';
278
+ echo '<div class="dashicons dashicons-editor-help yikes-tabs-how-to-toggle" title="' . __( "Help Me!" , 'yikes-inc-easy-custom-woocommerce-product-tabs' ) . '"></div>';
279
 
280
  // set up the initial display, by looping
281
  foreach ( $tab_data as $tab ) {
282
  if ( $i != 1 ) { ?>
283
  <section class="button-holder" alt="<?php echo $i; ?>">
284
  <!-- Remove tab button, should not generate for the first tab! -->
285
+ <a href="#" onclick="return false;" class="button-secondary remove_this_tab"><span class="dashicons dashicons-no-alt" style="line-height:1.3;"></span><?php echo __( 'Remove Tab' , 'yikes-inc-easy-custom-woocommerce-product-tabs' ); ?></a>
286
  <div style="text-align:center;margin-top:.5em;">
287
  <span class="dashicons dashicons-arrow-up move-tab-data-up"></span>
288
  <span class="dashicons dashicons-arrow-down move-tab-data-down"></span>
296
  </div>
297
  </section>
298
  <?php }
299
+ woocommerce_wp_text_input( array( 'id' => '_yikes_wc_custom_repeatable_product_tabs_tab_title_' . $i , 'label' => __( 'Tab Title', 'yikes-inc-easy-custom-woocommerce-product-tabs' ), 'description' => '', 'value' => $tab['title'] , 'placeholder' => 'Custom Tab Title' , 'class' => 'yikes_woo_tabs_title_field') );
300
  $this->woocommerce_wp_wysiwyg_input( array(
301
  'id' => '_yikes_wc_custom_repeatable_product_tabs_tab_content_' . $i ,
302
+ 'label' => __( 'Content', 'yikes-inc-easy-custom-woocommerce-product-tabs' ),
303
+ 'placeholder' => __( 'HTML and text to display.', 'yikes-inc-easy-custom-woocommerce-product-tabs' ),
304
  'value' => $tab['content'],
305
  'style' => 'width:70%;height:10.5em;',
306
  'class' => 'yikes_woo_tabs_content_field',
314
 
315
  ?>
316
  <div id="duplicate_this_row">
317
+ <a href="#" onclick="return false;" class="button-secondary remove_this_tab" style="float:right;margin-right:4.25em;"><span class="dashicons dashicons-no-alt" style="line-height:1.3;"></span><?php echo __( 'Remove Tab' , 'yikes-inc-easy-custom-woocommerce-product-tabs' ); ?></a>
318
  <?php
319
  // lets add an empty row, to use for duplicating purposes
320
+ woocommerce_wp_text_input( array( 'id' => 'hidden_duplicator_row_title' , 'label' => __( 'Tab Title', 'yikes-inc-easy-custom-woocommerce-product-tabs' ), 'description' => '', 'placeholder' => 'Custom Tab Title' , 'class' => 'yikes_woo_tabs_title_field' ) );
321
+ $this->woocommerce_wp_textarea_input( array( 'id' => 'hidden_duplicator_row_content' , 'label' => __( 'Content', 'yikes-inc-easy-custom-woocommerce-product-tabs' ), 'placeholder' => __( 'HTML and text to display.', 'yikes-inc-easy-custom-woocommerce-product-tabs' ), 'style' => 'width:70%;height:10.5em;' , 'class' => 'yikes_woo_tabs_content_field' ) );
322
  ?>
323
  <section class="button-holder" alt="<?php echo $i; ?>">
324
  <div style="text-align:center;">
330
 
331
  <p>
332
  <label style="display:block;" for="_yikes_wc_custom_repeatable_product_tabs_tab_content_<?php echo $i; ?>"></label>
333
+ <a href="#" class="button-secondary" id="add_another_tab"><em class="dashicons dashicons-plus-alt" style="line-height:1.8;font-size:14px;"></em><?php echo __( 'Add Another Tab' , 'yikes-inc-easy-custom-woocommerce-product-tabs' ); ?></a>
334
  </p>
335
 
336
  <?php