Custom Product Tabs for WooCommerce - Version 1.5.1

Version Description

  • December 22nd, 2016 =
  • Fixed bug that caused content to be copied incorrectly when moving tabs up / down
  • Only on the product page will the editor defaul to 'Visual' (instead of every page)
Download this release

Release Info

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

Code changes from version 1.5 to 1.5.1

images/yikes_logo.png DELETED
Binary file
readme.txt CHANGED
@@ -6,7 +6,7 @@ Requires at least: 3.8
6
  Tested up to: 4.7
7
  Requires WooCommerce at least: 2.0
8
  Tested WooCommerce up to: 2.6.9
9
- Stable tag: 1.5
10
  License: GPLv2 or later
11
 
12
  Add custom tabs with content to products in WooCommerce.
@@ -74,6 +74,10 @@ Yes! Since v1.4 we've added the necessary code to ensure the custom tab data is
74
 
75
  == Changelog ==
76
 
 
 
 
 
77
  = 1.5 - December 20th, 2016 =
78
  * Version 1.5 includes a brand new feature - saved tabs - as well as a number of bug fixes, style tweaks, code clean-up, and comments
79
  * UI: Complete overhaul of the custom tab interface for an easier, responsive tab creating experience.
6
  Tested up to: 4.7
7
  Requires WooCommerce at least: 2.0
8
  Tested WooCommerce up to: 2.6.9
9
+ Stable tag: 1.5.1
10
  License: GPLv2 or later
11
 
12
  Add custom tabs with content to products in WooCommerce.
74
 
75
  == Changelog ==
76
 
77
+ = 1.5.1 - December 22nd, 2016 =
78
+ * Fixed bug that caused content to be copied incorrectly when moving tabs up / down
79
+ * Only on the product page will the editor defaul to 'Visual' (instead of every page)
80
+
81
  = 1.5 - December 20th, 2016 =
82
  * Version 1.5 includes a brand new feature - saved tabs - as well as a number of bug fixes, style tweaks, code clean-up, and comments
83
  * UI: Complete overhaul of the custom tab interface for an easier, responsive tab creating experience.
yikes-inc-easy-custom-woocommerce-product-tabs.php CHANGED
@@ -5,7 +5,7 @@
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.5
9
  * Text Domain: yikes-inc-easy-custom-woocommerce-product-tabs
10
  * Domain Path: languages/
11
  *
@@ -170,7 +170,7 @@
170
  add_action( 'admin_menu', array( $this, 'yikes_woo_register_settings_page' ) );
171
 
172
  // Default WYSIWYG to 'visual'
173
- add_filter( 'wp_default_editor', array( $this, 'yikes_woo_set_editor_to_visual' ) );
174
 
175
  // i18n
176
  add_action( 'plugins_loaded', array( $this, 'yikes_woo_load_plugin_textdomain' ) );
@@ -1130,9 +1130,17 @@
1130
  *
1131
  * @since 1.5
1132
  *
1133
- * @return string 'tinymce'
 
1134
  */
1135
- public function yikes_woo_set_editor_to_visual() {
 
 
 
 
 
 
 
1136
  $default_editor_tab = apply_filters( 'yikes_woocommerce_default_editor_mode', 'tinymce' );
1137
  return $default_editor_tab;
1138
  }
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.5.1
9
  * Text Domain: yikes-inc-easy-custom-woocommerce-product-tabs
10
  * Domain Path: languages/
11
  *
170
  add_action( 'admin_menu', array( $this, 'yikes_woo_register_settings_page' ) );
171
 
172
  // Default WYSIWYG to 'visual'
173
+ add_filter( 'wp_default_editor', array( $this, 'yikes_woo_set_editor_to_visual' ), 10, 1 );
174
 
175
  // i18n
176
  add_action( 'plugins_loaded', array( $this, 'yikes_woo_load_plugin_textdomain' ) );
1130
  *
1131
  * @since 1.5
1132
  *
1133
+ * @param string | $mode | The current mode of the editor
1134
+ * @return string 'tinymce' || nothing
1135
  */
1136
+ public function yikes_woo_set_editor_to_visual( $mode ) {
1137
+ global $post;
1138
+
1139
+ // Only default the editor on the products page
1140
+ if ( isset( $post ) && isset( $post->post_type ) && $post->post_type !== 'product' ) {
1141
+ return $mode;
1142
+ }
1143
+
1144
  $default_editor_tab = apply_filters( 'yikes_woocommerce_default_editor_mode', 'tinymce' );
1145
  return $default_editor_tab;
1146
  }