Version Description
Download this release
Release Info
Developer | eherman24 |
Plugin | Custom Product Tabs for WooCommerce |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.4.1
- css/repeatable-custom-tabs.css +1 -1
- css/repeatable-custom-tabs.min.css +1 -1
- i18n/languages/yikes-inc-woocommerce-repeatable-custom-product-tabs.mo +0 -0
- i18n/languages/yikes-inc-woocommerce-repeatable-custom-product-tabs.pot +54 -34
- js/repeatable-custom-tabs.js +1 -1
- js/repeatable-custom-tabs.min.js +1 -1
- readme.txt +28 -8
- yikes-inc-easy-custom-woocommerce-product-tabs.php +104 -27
css/repeatable-custom-tabs.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.yikes_woo_tabs_title_field {
|
1 |
+
.yikes_woo_tabs_title_field {
|
css/repeatable-custom-tabs.min.css
CHANGED
@@ -5,4 +5,4 @@
|
|
5 |
* @ http://www.YIKESinc.com
|
6 |
*
|
7 |
*/
|
8 |
-
.yikes_woo_tabs_title_field{width:70%!important}#duplicate_this_row{display:none}a[href="#yikes_woocommerce_custom_product_tabs"]:before{font-family:yikes-woo-font!important;content:"\e600"!important;font-size:15px!important;display:block;float:left;margin-top:2px}#add_another_tab{float:right;margin-right:2em;background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-deconartion:none!important}#yikes_woocommerce_custom_product_tabs hr{margin:1.5em 2em 1.5em 1em}.yikes-woo-custom-tab-divider{display:block;width:92%;height:2px;margin:1.5em 0 1.5em 1em;border-bottom:1px solid rgba(182,182,182,.35)}#yikes_woocommerce_custom_product_tabs div.yikes-woo-custom-tab-divider:last-child{display:none!important}.yikes-logo{position:absolute;top:0;right:0;margin-top:.75em;margin-right:.75em;opacity:.85}#yikes-woo-tabs-review-us{float:right}.yikes-woo-tabs-hidden-how-to-info{display:none;margin-top:.75em;padding-top:.5em;font-family:"Open Sans",sans-serif!important}.yikes-tabs-how-to-toggle{font-size:20px;padding:0 .5em;margin-top:.5em}.yikes-tabs-how-to-toggle:hover{cursor:pointer}.move-tab-data-down,.move-tab-data-up{font-size:25px;transition:color .2s}.move-tab-data-down:hover,.move-tab-data-up:hover{cursor:pointer;color:#4c9cce}.button-holder{float:right;margin-right:4.25em;width:117px;margin-top:.5em}@font-face{font-family:yikes-woo-font;src:url(./font/yikes-woo-font.eot?-394dt5);src:url(./font/yikes-woo-font.eot?#iefix-394dt5) format('embedded-opentype'),url(./font/yikes-woo-font.woff?-394dt5) format('woff'),url(./font/yikes-woo-font.ttf?-394dt5) format('truetype'),url(./font/yikes-woo-font.svg?-394dt5#yikes-woo-font) format('svg');font-weight:400;font-style:normal}[class*=" yikes-woo-"],[class^=yikes-woo-]{font-family:yikes-woo-font;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.yikes-woo-uniE600:before{content:"\e600"}
|
5 |
* @ http://www.YIKESinc.com
|
6 |
*
|
7 |
*/
|
8 |
+
.yikes_woo_tabs_title_field{width:70%!important}#duplicate_this_row{display:none}a[href="#yikes_woocommerce_custom_product_tabs"]:before{font-family:yikes-woo-font!important;content:"\e600"!important;font-size:15px!important;display:block;float:left;margin-top:2px}#add_another_tab{float:right;margin-right:2em;background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-deconartion:none!important}#yikes_woocommerce_custom_product_tabs hr{margin:1.5em 2em 1.5em 1em}.yikes-woo-custom-tab-divider{display:block;width:92%;height:2px;margin:1.5em 0 1.5em 1em;border-bottom:1px solid rgba(182,182,182,.35)}#yikes_woocommerce_custom_product_tabs div.yikes-woo-custom-tab-divider:last-child{display:none!important}#yikes_woocommerce_custom_product_tabs .wp-editor-wrap{padding:5px 60px 5px 162px!important}.yikes-custom-wysiwyg-label{margin-left:1em!important;line-height:3;}.yikes-logo{position:absolute;top:0;right:0;margin-top:.75em;margin-right:.75em;opacity:.85}#yikes-woo-tabs-review-us{float:right}.yikes-woo-tabs-hidden-how-to-info{display:none;margin-top:.75em;padding-top:.5em;font-family:"Open Sans",sans-serif!important}.yikes-tabs-how-to-toggle{font-size:20px;padding:0 .5em;margin-top:.5em}.yikes-tabs-how-to-toggle:hover{cursor:pointer}.move-tab-data-down,.move-tab-data-up{font-size:25px;transition:color .2s}.move-tab-data-down:hover,.move-tab-data-up:hover{cursor:pointer;color:#4c9cce}.button-holder{float:right;margin-right:4.25em;width:117px;margin-top:.5em}@font-face{font-family:yikes-woo-font;src:url(./font/yikes-woo-font.eot?-394dt5);src:url(./font/yikes-woo-font.eot?#iefix-394dt5) format('embedded-opentype'),url(./font/yikes-woo-font.woff?-394dt5) format('woff'),url(./font/yikes-woo-font.ttf?-394dt5) format('truetype'),url(./font/yikes-woo-font.svg?-394dt5#yikes-woo-font) format('svg');font-weight:400;font-style:normal}[class*=" yikes-woo-"],[class^=yikes-woo-]{font-family:yikes-woo-font;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.yikes-woo-uniE600:before{content:"\e600"}
|
i18n/languages/yikes-inc-woocommerce-repeatable-custom-product-tabs.mo
ADDED
Binary file
|
i18n/languages/yikes-inc-woocommerce-repeatable-custom-product-tabs.pot
CHANGED
@@ -6,62 +6,82 @@ msgstr ""
|
|
6 |
"Lite 1.0\n"
|
7 |
"Report-Msgid-Bugs-To: https://www.yikesinc.comPOT-Creation-Date: 2014-09-05 "
|
8 |
"04:31:12+00:00\n"
|
|
|
|
|
|
|
|
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"PO-Revision-Date: 2014-10-17 13:55-0500\n"
|
13 |
-
"Last-Translator: Evan <Evan@yikesinc.com>\n"
|
14 |
-
"Language-Team: YIKES Inc. <tech@yikesinc.com>\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
-
"
|
17 |
-
"X-
|
18 |
-
"X-Poedit-
|
19 |
-
"
|
20 |
-
"
|
21 |
|
22 |
-
#:
|
23 |
-
|
24 |
-
|
|
|
25 |
msgstr ""
|
26 |
|
27 |
-
#:
|
28 |
-
|
29 |
-
msgid "Tab Title"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#:
|
33 |
-
|
34 |
-
msgid "Required for tab to be visible"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#:
|
38 |
-
|
39 |
-
msgid "Content"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#:
|
43 |
-
|
44 |
-
msgid "HTML and text to display."
|
45 |
msgstr ""
|
46 |
|
47 |
-
|
48 |
-
msgid "
|
|
|
49 |
msgstr ""
|
50 |
|
51 |
-
|
52 |
-
msgid "
|
53 |
msgstr ""
|
54 |
|
55 |
-
|
56 |
msgid ""
|
57 |
-
"
|
58 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
msgstr ""
|
60 |
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
msgstr ""
|
64 |
|
65 |
-
|
66 |
-
msgid "
|
67 |
msgstr ""
|
6 |
"Lite 1.0\n"
|
7 |
"Report-Msgid-Bugs-To: https://www.yikesinc.comPOT-Creation-Date: 2014-09-05 "
|
8 |
"04:31:12+00:00\n"
|
9 |
+
"POT-Creation-Date: 2015-07-21 01:19-0500\n"
|
10 |
+
"PO-Revision-Date: 2015-07-21 01:19-0500\n"
|
11 |
+
"Last-Translator: Evan Herman <evan.m.herman@gmail.com>\n"
|
12 |
+
"Language-Team: YIKES Inc. <tech@yikesinc.com>\n"
|
13 |
+
"Language: en\n"
|
14 |
"MIME-Version: 1.0\n"
|
15 |
"Content-Type: text/plain; charset=UTF-8\n"
|
16 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
+
"X-Generator: Poedit 1.6.10\n"
|
19 |
+
"X-Poedit-Basepath: .\n"
|
20 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
21 |
+
"X-Poedit-SearchPath-0: D:\\xampp\\htdocs\\wp-svg-2\\wp-content\\plugins"
|
22 |
+
"\\yikes-inc-easy-custom-woocommerce-product-tabs\n"
|
23 |
|
24 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:52
|
25 |
+
msgid ""
|
26 |
+
"YIKES Custom Product Tabs for WooCommerce could not be activated because "
|
27 |
+
"WooCommerce is not installed and active."
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:53
|
31 |
+
msgid "Please install and activate "
|
|
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:53
|
35 |
+
msgid " before activating the plugin."
|
|
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:201
|
39 |
+
msgid "Custom Tabs"
|
|
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:233
|
43 |
+
msgid "How To"
|
|
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:233
|
47 |
+
msgid ""
|
48 |
+
"To generate tabs, click 'Add Another Tab' at the bottom of this container."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:233
|
52 |
+
msgid "To delete tabs, click 'Remove Tab' to the right of the title field."
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:233
|
56 |
msgid ""
|
57 |
+
"Note : Re-save the product to initialize the WordPress content editor on "
|
58 |
+
"newly created tab content."
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:234
|
62 |
+
msgid "Help Me!"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:241
|
66 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:273
|
67 |
+
msgid "Remove Tab"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:255
|
71 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:276
|
72 |
+
msgid "Tab Title"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:258
|
76 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:277
|
77 |
+
msgid "Content"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:259
|
81 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:277
|
82 |
+
msgid "HTML and text to display."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: D:\xampp\htdocs\wp-svg-2\wp-content\plugins\yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php:289
|
86 |
+
msgid "Add Another Tab"
|
87 |
msgstr ""
|
js/repeatable-custom-tabs.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
/*
|
1 |
+
/*
|
js/repeatable-custom-tabs.min.js
CHANGED
@@ -5,4 +5,4 @@
|
|
5 |
* @ http://www.YIKESinc.com
|
6 |
*
|
7 |
*/
|
8 |
-
jQuery(document).ready(function(){jQuery("#add_another_tab").on("click",function(
|
5 |
* @ http://www.YIKESinc.com
|
6 |
*
|
7 |
*/
|
8 |
+
jQuery(document).ready(function(){jQuery(".yikes-custom-wysiwyg-label").each(function(){jQuery(this).insertBefore(jQuery(this).prev())}),jQuery("#add_another_tab").on("click",function(t){var e=jQuery("#duplicate_this_row"),_=(jQuery("#number_of_tabs").val(),parseInt(jQuery("#number_of_tabs").val())+parseInt(1)),a=jQuery("#duplicate_this_row .remove_this_tab"),r=jQuery("#duplicate_this_row .button-holder");e.children("p").each(function(){jQuery(this).clone().insertBefore("#duplicate_this_row").removeClass("hidden_duplicator_row_title_field").removeClass("hidden_duplicator_row_content_field").addClass("new_duplicate_row")}).promise().done(function(){jQuery(".new_duplicate_row").find("input").each(function(){jQuery(this).is('input[name="hidden_duplicator_row_title"]')&&jQuery(this).attr("name","_yikes_wc_custom_repeatable_product_tabs_tab_title_"+_).attr("id","_yikes_wc_custom_repeatable_product_tabs_tab_title_"+_).parents("p").addClass("_yikes_wc_custom_repeatable_product_tabs_tab_title_"+_+"_field").removeClass("hidden_duplicator_row_title_field").find("label").removeAttr("for").attr("for","_yikes_wc_custom_repeatable_product_tabs_tab_title_"+_+"_field")}),jQuery(".new_duplicate_row").find("textarea").each(function(){jQuery(this).is('textarea[name="hidden_duplicator_row_content"]')&&jQuery(this).attr("name","_yikes_wc_custom_repeatable_product_tabs_tab_content_"+_).attr("id","_yikes_wc_custom_repeatable_product_tabs_tab_content_"+_).parents("p").addClass("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+_+"_field").removeClass("hidden_duplicator_row_content_field").find("label").removeAttr("for").attr("for","_yikes_wc_custom_repeatable_product_tabs_tab_content_"+_+"_field")}),jQuery("#number_of_tabs").val(_),jQuery(".new_duplicate_row").first().before('<div class="yikes-woo-custom-tab-divider"></div>')}),r.clone().insertAfter(jQuery(".yikes-woo-custom-tab-divider").last()).addClass("last-button-holder"),a.clone().prependTo(".last-button-holder").removeAttr("style"),jQuery(".last-button-holder").removeAttr("alt").attr("alt",_),setTimeout(function(){jQuery(".last-button-holder").removeClass("last-button-holder"),jQuery(".new_duplicate_row").removeClass("new_duplicate_row")},100),t.preventDefault()}),jQuery("body").on("click",".remove_this_tab",function(t){var e=jQuery(this),_=jQuery(this).parents(".button-holder").next();jQuery(".yikes-custom-wysiwyg-label").remove();var a=jQuery(this).parents(".button-holder").next().next(),r=jQuery(this).parents(".button-holder").prev(),o=(jQuery("#number_of_tabs").val(),parseInt(jQuery("#number_of_tabs").val())-parseInt(1));_.remove(),a.remove(),r.remove(),e.parents(".button-holder").remove(),setTimeout(function(){jQuery(".last-button-holder").removeClass("last-button-holder"),jQuery(".new_duplicate_row").removeClass("new_duplicate_row")},100);var s=1;jQuery(".yikes_woo_tabs_title_field").each(function(){jQuery(this).removeAttr("name").attr("name","_yikes_wc_custom_repeatable_product_tabs_tab_title_"+s).removeAttr("id").attr("id","_yikes_wc_custom_repeatable_product_tabs_tab_title_"+s),jQuery(this).prev().removeAttr("for").attr("for","_yikes_wc_custom_repeatable_product_tabs_tab_title_"+s),jQuery(this).parent("p").removeAttr("for").attr("for","form-field _yikes_wc_custom_repeatable_product_tabs_tab_title_"+s+"_field"),jQuery(this).parent("p").removeAttr("class").attr("class","form-field _yikes_wc_custom_repeatable_product_tabs_tab_title_"+s+"_field"),s++});var u=1;jQuery("#yikes_woocommerce_custom_product_tabs").find("textarea.wp-editor-area").each(function(){jQuery(this).attr("name","_yikes_wc_custom_repeatable_product_tabs_tab_content_"+u),jQuery(this).attr("id","_yikes_wc_custom_repeatable_product_tabs_tab_content_"+u),u++});var n=1;jQuery(".button-holder").each(function(){jQuery(this).removeAttr("alt").attr("alt",n),n++}),jQuery("#number_of_tabs").val(o),t.preventDefault()}),jQuery(".yikes-tabs-how-to-toggle").on("click",function(){jQuery(".yikes-woo-tabs-hidden-how-to-info").slideToggle("fast")}),jQuery("body").on("click",".move-tab-data-up",function(){var t=jQuery(this),e=t.parents(".button-holder").attr("alt"),_=jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+e+'"]').val(),a=tinymce.get("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+e).getContent();if(1==e)return!1;var r=parseInt(e)-parseInt(1),o=jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+r+'"]').val(),s=tinymce.get("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+r).getContent();jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+e+'"]').val(o),jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+r+'"]').val(_),tinymce.get("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+e).setContent(s),tinymce.get("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+r).setContent(a)}),jQuery("body").on("click",".move-tab-data-down",function(){var t=jQuery("#number_of_tabs").val(),e=jQuery(this),_=e.parents(".button-holder").attr("alt"),a=jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+_+'"]').val(),r=tinymce.get("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+_).getContent();if(_==t)return!1;var o=parseInt(_)+parseInt(1),s=jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+o+'"]').val(),u=jQuery('textarea[name="_yikes_wc_custom_repeatable_product_tabs_tab_content_'+o+'"]').val();jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+_+'"]').val(s),jQuery('input[name="_yikes_wc_custom_repeatable_product_tabs_tab_title_'+o+'"]').val(a),tinymce.get("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+_).setContent(u),tinymce.get("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+o).setContent(r)})});
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
===
|
2 |
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.
|
7 |
Requires WooCommerce at least: 2.0
|
8 |
-
Tested WooCommerce up to: 2.
|
9 |
-
Stable tag: 1.
|
10 |
License: GPLv2 or later
|
11 |
|
12 |
This plugin extends WooCommerce to allow site admins to add custom tabs to products.
|
@@ -17,10 +17,12 @@ This plugin extends the [WooCommerce](www.woothemes.com/woocommerce/) eCommerce
|
|
17 |
|
18 |
Tabs are managed on the Edit Product screen and can be added on a per product basis. Tabs can be easily added, deleted and rearranged.
|
19 |
|
20 |
-
Tab content areas may contain text, html or shortcodes.
|
21 |
|
22 |
If you experience any problems, please submit a New Issue on our [Github Issue Tracker](https://github.com/yikesinc/yikes-inc-easy-custom-woocommerce-product-tabs/issues) and we'll look in to it as soon as possible.
|
23 |
|
|
|
|
|
24 |
== Installation ==
|
25 |
|
26 |
1. Upload the entire 'yikes-inc-custom-repeatable-woo-product-tabs' folder to the '/wp-content/plugins/' directory
|
@@ -29,8 +31,9 @@ If you experience any problems, please submit a New Issue on our [Github Issue T
|
|
29 |
|
30 |
== Screenshots ==
|
31 |
|
32 |
-
1. Custom Tabs manager on the Edit Product screen
|
33 |
-
2.
|
|
|
34 |
|
35 |
== Frequently Asked Questions ==
|
36 |
|
@@ -46,11 +49,25 @@ Make sure you hit the Product's main Update button to save all the edits you mad
|
|
46 |
= How do I change the order of the tabs? =
|
47 |
To change the order of the custom tabs use the up and down arrows to the right of the Tab Title.
|
48 |
|
|
|
|
|
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
= 1.2 - March 18th, 2015 =
|
53 |
-
* Enhancement:
|
54 |
* Enhancement: When user doesn't have WooCommerce installed, they are now redirected to the plugin install search page, with WooCommerce at the top.
|
55 |
|
56 |
= 1.1 =
|
@@ -58,3 +75,6 @@ To change the order of the custom tabs use the up and down arrows to the right o
|
|
58 |
|
59 |
= 1.0.0 =
|
60 |
* Initial Release
|
|
|
|
|
|
1 |
+
=== YIKES Custom Product Tabs for WooCommerce ===
|
2 |
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.
|
17 |
|
18 |
Tabs are managed on the Edit Product screen and can be added on a per product basis. Tabs can be easily added, deleted and rearranged.
|
19 |
|
20 |
+
Tab content areas use the standard WYSIWYG WordPress editor, and may contain text, html or shortcodes.
|
21 |
|
22 |
If you experience any problems, please submit a New Issue on our [Github Issue Tracker](https://github.com/yikesinc/yikes-inc-easy-custom-woocommerce-product-tabs/issues) and we'll look in to it as soon as possible.
|
23 |
|
24 |
+
<i>Originally a fork of <a href="https://wordpress.org/plugins/woocommerce-custom-product-tabs-lite/" target="_blank">SkyVerge WooCommerce Custom Product Tabs Lite</a>, and customized for a <a href="http://www.yikesinc.com" target="_blank">YIKES</a> client site.</i>
|
25 |
+
|
26 |
== Installation ==
|
27 |
|
28 |
1. Upload the entire 'yikes-inc-custom-repeatable-woo-product-tabs' folder to the '/wp-content/plugins/' directory
|
31 |
|
32 |
== Screenshots ==
|
33 |
|
34 |
+
1. Custom Tabs manager on the 'Edit Product' screen
|
35 |
+
2. Custom product tab content displayed on the front end
|
36 |
+
3. Contact Form 7 shortcode rendered in custom product tab
|
37 |
|
38 |
== Frequently Asked Questions ==
|
39 |
|
49 |
= How do I change the order of the tabs? =
|
50 |
To change the order of the custom tabs use the up and down arrows to the right of the Tab Title.
|
51 |
|
52 |
+
= Does the custom tab data get exported with the standard WooCommerce product data? =
|
53 |
+
Yes! Since v1.4 we've added the necessary hooks and filters to ensure the custom tab data is exported with all of the other standard WooCommerce data. This ensures a smooth transition of products between sites.
|
54 |
+
|
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 |
+
|
62 |
+
= 1.4 - July 29th, 2015 =
|
63 |
+
* Enhancement: Added the 'YIKES Custom Product Tabs for WooCommerce ' data to the standard WooCommerce export file, so custom tab data can be transferred between sites smoothly.
|
64 |
+
|
65 |
+
= 1.3 - July 21st, 2015 =
|
66 |
+
* Enhancement: Enabled WYSIWYG editor on tab content containers (enables shortcode and content to pass through the_content() filter)
|
67 |
+
* Updated repo screenshots and descriptions
|
68 |
+
|
69 |
= 1.2 - March 18th, 2015 =
|
70 |
+
* Enhancement: Fixed issue where non utf8 characters in tab titles caused front end not to generate the tabs
|
71 |
* Enhancement: When user doesn't have WooCommerce installed, they are now redirected to the plugin install search page, with WooCommerce at the top.
|
72 |
|
73 |
= 1.1 =
|
75 |
|
76 |
= 1.0.0 =
|
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)
|
yikes-inc-easy-custom-woocommerce-product-tabs.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name:
|
4 |
* Plugin URI: http://www.yikesinc.com
|
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.
|
9 |
-
* Tested up to: 4.
|
10 |
-
* Text Domain: yikes-inc-woocommerce-custom-product-tabs
|
11 |
* Domain Path: /i18n/languages/
|
12 |
*
|
13 |
* Copyright: (c) 2014-2015 YIKES Inc.
|
@@ -49,7 +49,7 @@
|
|
49 |
</style>
|
50 |
<!-- display our error message -->
|
51 |
<div class="error">
|
52 |
-
<p><?php _e( '
|
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
|
@@ -63,7 +63,7 @@
|
|
63 |
private $tab_data = false;
|
64 |
|
65 |
/** plugin version number */
|
66 |
-
const VERSION = "1.
|
67 |
|
68 |
/** plugin text domain */
|
69 |
const TEXT_DOMAIN = 'yikes-inc-woocommerce-custom-product-tabs';
|
@@ -79,10 +79,54 @@
|
|
79 |
// Installation
|
80 |
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) $this->install();
|
81 |
|
82 |
-
add_action( 'init',
|
83 |
add_action( 'woocommerce_init', array( $this, 'init' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
-
|
86 |
|
87 |
/**
|
88 |
* Init WooCommerce PDF Product Vouchers when WordPress initializes
|
@@ -111,11 +155,9 @@
|
|
111 |
add_filter( 'yikes_woocommerce_custom_repeatable_product_tabs_content', 'do_shortcode' );
|
112 |
|
113 |
// enqueue our custom js file, for repeatable tabs
|
114 |
-
add_action( 'admin_enqueue_scripts' , array(
|
115 |
-
|
116 |
}
|
117 |
-
|
118 |
-
|
119 |
/** Frontend methods ******************************************************/
|
120 |
public function enqueue_repeatable_tab_script( $hook ) {
|
121 |
global $post;
|
@@ -127,9 +169,6 @@
|
|
127 |
// styles + font
|
128 |
wp_register_style( 'repeatable-custom-tabs-styles' , plugin_dir_url(__FILE__) . 'css/repeatable-custom-tabs.min.css' , '' , 'all' );
|
129 |
wp_enqueue_style( 'repeatable-custom-tabs-styles' );
|
130 |
-
// font
|
131 |
-
// wp_register_style( 'yikes-woo-tabs-font' , plugin_dir_url(__FILE__) . 'css/yikes-woo-tabs-font.css' , '' , 'all' );
|
132 |
-
// wp_enqueue_style( 'yikes-woo-tabs-font' );
|
133 |
}
|
134 |
}
|
135 |
}
|
@@ -157,7 +196,7 @@
|
|
157 |
$i = 25; // setup priorty to loop over, andrender tabs in proper order
|
158 |
foreach ( $this->tab_data as $tab ) {
|
159 |
$tabs[ $tab['id'] ] = array(
|
160 |
-
'title' => __( $tab['title'],
|
161 |
'priority' => $i++,
|
162 |
'callback' => array( $this, 'custom_product_tabs_panel_content' ),
|
163 |
'content' => $tab['content'], // custom field
|
@@ -203,7 +242,7 @@
|
|
203 |
* Adds a new tab to the Product Data postbox in the admin product interface
|
204 |
*/
|
205 |
public function render_custom_product_tabs() {
|
206 |
-
echo "<li class=\"yikes_wc_product_tabs_tab\"><a href=\"#yikes_woocommerce_custom_product_tabs\">" . __( 'Custom Tabs',
|
207 |
}
|
208 |
|
209 |
|
@@ -235,15 +274,15 @@
|
|
235 |
|
236 |
echo $this->review_us_container();
|
237 |
|
238 |
-
echo '<div class="yikes-woo-tabs-hidden-how-to-info"><h3 style="padding-top:0;padding-bottom:0;">' . __( "How To" ,
|
239 |
-
echo '<div class="dashicons dashicons-editor-help yikes-tabs-how-to-toggle" title="' . __( "Help Me!" ,
|
240 |
|
241 |
// set up the initial display, by looping
|
242 |
foreach ( $tab_data as $tab ) {
|
243 |
if ( $i != 1 ) { ?>
|
244 |
<section class="button-holder" alt="<?php echo $i; ?>">
|
245 |
<!-- Remove tab button, should not generate for the first tab! -->
|
246 |
-
<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' ,
|
247 |
<div style="text-align:center;margin-top:.5em;">
|
248 |
<span class="dashicons dashicons-arrow-up move-tab-data-up"></span>
|
249 |
<span class="dashicons dashicons-arrow-down move-tab-data-down"></span>
|
@@ -257,8 +296,16 @@
|
|
257 |
</div>
|
258 |
</section>
|
259 |
<?php }
|
260 |
-
woocommerce_wp_text_input( array( 'id' => '_yikes_wc_custom_repeatable_product_tabs_tab_title_' . $i , 'label' => __( 'Tab Title',
|
261 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
if ( $i != count( $tab_data ) ) {
|
263 |
echo '<div class="yikes-woo-custom-tab-divider"></div>';
|
264 |
}
|
@@ -267,11 +314,11 @@
|
|
267 |
|
268 |
?>
|
269 |
<div id="duplicate_this_row">
|
270 |
-
<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' ,
|
271 |
<?php
|
272 |
// lets add an empty row, to use for duplicating purposes
|
273 |
-
woocommerce_wp_text_input( array( 'id' => 'hidden_duplicator_row_title' , 'label' => __( 'Tab Title',
|
274 |
-
$this->woocommerce_wp_textarea_input( array( 'id' => 'hidden_duplicator_row_content' , 'label' => __( 'Content',
|
275 |
?>
|
276 |
<section class="button-holder" alt="<?php echo $i; ?>">
|
277 |
<div style="text-align:center;">
|
@@ -283,7 +330,7 @@
|
|
283 |
|
284 |
<p>
|
285 |
<label style="display:block;" for="_yikes_wc_custom_repeatable_product_tabs_tab_content_<?php echo $i; ?>"></label>
|
286 |
-
<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' ,
|
287 |
</p>
|
288 |
|
289 |
<?php
|
@@ -370,7 +417,7 @@
|
|
370 |
if ( ! isset( $field['class'] ) ) $field['class'] = 'short';
|
371 |
if ( ! isset( $field['value'] ) ) $field['value'] = get_post_meta( $thepostid, $field['id'], true );
|
372 |
|
373 |
-
echo '<p class="form-field ' . $field['id'] . '_field"><label style="display:block;" for="' . $field['id'] . '">' . $field['label'] . '</label><textarea class="' . $field['class'] . '" name="' . $field['id'] . '" id="' . $field['id'] . '" placeholder="' . $field['placeholder'] . '" rows="2" cols="20"' . (isset( $field['style'] ) ? ' style="' . $field['style'] . '"' : '') . '>' .
|
374 |
|
375 |
if ( isset( $field['description'] ) && $field['description'] ) {
|
376 |
echo '<span class="description">' . $field['description'] . '</span>';
|
@@ -378,6 +425,36 @@
|
|
378 |
|
379 |
echo '</p>';
|
380 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
|
382 |
|
383 |
/** Helper methods ******************************************************/
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: YIKES Custom Product Tabs for WooCommerce
|
4 |
* Plugin URI: http://www.yikesinc.com
|
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 |
</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
|
63 |
private $tab_data = false;
|
64 |
|
65 |
/** plugin version number */
|
66 |
+
const VERSION = "1.3";
|
67 |
|
68 |
/** plugin text domain */
|
69 |
const TEXT_DOMAIN = 'yikes-inc-woocommerce-custom-product-tabs';
|
79 |
// Installation
|
80 |
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) $this->install();
|
81 |
|
82 |
+
add_action( 'init', array( $this, 'load_translation' ) );
|
83 |
add_action( 'woocommerce_init', array( $this, 'init' ) );
|
84 |
+
global $typenow;
|
85 |
+
add_action( 'init', array( $this, 'load_custom_export_filters' ) );
|
86 |
+
}
|
87 |
+
|
88 |
+
public function load_custom_export_filters() {
|
89 |
+
global $pagenow;
|
90 |
+
if( 'export.php' == $pagenow ) {
|
91 |
+
// add our data to the woocommerce export
|
92 |
+
add_filter( 'wc_customer_order_csv_export_order_headers', array( $this, 'yikes_wootabs_wc_csv_export_modify_column_headers' ) );
|
93 |
+
add_filter( 'wc_customer_order_csv_export_order_row', array( $this, 'yikes_wootabs_wc_csv_export_modify_row_data' ), 10, 3 );
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Add our data to the standard WooCommerce Export Functionality
|
99 |
+
* @since 1.4
|
100 |
+
**/
|
101 |
+
function yikes_wootabs_wc_csv_export_modify_column_headers( $column_headers ) {
|
102 |
+
|
103 |
+
$new_headers = array(
|
104 |
+
'yikes_woo_products_tabs' => 'Yikes Inc. Custom WooCommerce Tabs',
|
105 |
+
);
|
106 |
+
|
107 |
+
return array_merge( $column_headers, $new_headers );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Append our yikes woo product tab data
|
112 |
+
* @since 1.4
|
113 |
+
**/
|
114 |
+
function yikes_wootabs_wc_csv_export_modify_row_data( $order_data, $order, $csv_generator ) {
|
115 |
+
|
116 |
+
$custom_data = array(
|
117 |
+
'yikes_woo_products_tabs' => get_post_meta( $order->id, 'yikes_woo_products_tabs', true ),
|
118 |
+
);
|
119 |
+
|
120 |
+
$new_order_data = array();
|
121 |
+
if ( isset( $csv_generator->order_format ) && ( 'default_one_row_per_item' == $csv_generator->order_format || 'legacy_one_row_per_item' == $csv_generator->order_format ) ) {
|
122 |
+
foreach ( $order_data as $data ) {
|
123 |
+
$new_order_data[] = array_merge( (array) $data, $custom_data );
|
124 |
+
}
|
125 |
+
} else {
|
126 |
+
$new_order_data = array_merge( $order_data, $custom_data );
|
127 |
+
}
|
128 |
+
return $new_order_data;
|
129 |
}
|
|
|
130 |
|
131 |
/**
|
132 |
* Init WooCommerce PDF Product Vouchers when WordPress initializes
|
155 |
add_filter( 'yikes_woocommerce_custom_repeatable_product_tabs_content', 'do_shortcode' );
|
156 |
|
157 |
// enqueue our custom js file, for repeatable tabs
|
158 |
+
add_action( 'admin_enqueue_scripts' , array( $this , 'enqueue_repeatable_tab_script' ) );
|
|
|
159 |
}
|
160 |
+
|
|
|
161 |
/** Frontend methods ******************************************************/
|
162 |
public function enqueue_repeatable_tab_script( $hook ) {
|
163 |
global $post;
|
169 |
// styles + font
|
170 |
wp_register_style( 'repeatable-custom-tabs-styles' , plugin_dir_url(__FILE__) . 'css/repeatable-custom-tabs.min.css' , '' , 'all' );
|
171 |
wp_enqueue_style( 'repeatable-custom-tabs-styles' );
|
|
|
|
|
|
|
172 |
}
|
173 |
}
|
174 |
}
|
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 |
* 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 |
|
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 |
</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',
|
307 |
+
'number' => $i
|
308 |
+
) );
|
309 |
if ( $i != count( $tab_data ) ) {
|
310 |
echo '<div class="yikes-woo-custom-tab-divider"></div>';
|
311 |
}
|
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 |
|
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
|
417 |
if ( ! isset( $field['class'] ) ) $field['class'] = 'short';
|
418 |
if ( ! isset( $field['value'] ) ) $field['value'] = get_post_meta( $thepostid, $field['id'], true );
|
419 |
|
420 |
+
echo '<p class="form-field ' . $field['id'] . '_field"><label style="display:block;" for="' . $field['id'] . '">' . $field['label'] . '</label><textarea class="' . $field['class'] . '" name="' . $field['id'] . '" id="' . $field['id'] . '" placeholder="' . $field['placeholder'] . '" rows="2" cols="20"' . (isset( $field['style'] ) ? ' style="' . $field['style'] . '"' : '') . '>' . $field['value'] . '</textarea> ';
|
421 |
|
422 |
if ( isset( $field['description'] ) && $field['description'] ) {
|
423 |
echo '<span class="description">' . $field['description'] . '</span>';
|
425 |
|
426 |
echo '</p>';
|
427 |
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Generates our woo commerce
|
431 |
+
* custom product tab textarea fields
|
432 |
+
*
|
433 |
+
* @param field
|
434 |
+
*/
|
435 |
+
private function woocommerce_wp_wysiwyg_input( $field ) {
|
436 |
+
global $thepostid, $post;
|
437 |
+
|
438 |
+
if ( ! $thepostid ) $thepostid = $post->ID;
|
439 |
+
if ( ! isset( $field['placeholder'] ) ) $field['placeholder'] = '';
|
440 |
+
if ( ! isset( $field['class'] ) ) $field['class'] = 'short';
|
441 |
+
if ( ! isset( $field['value'] ) ) $field['value'] = get_post_meta( $thepostid, $field['id'], true );
|
442 |
+
|
443 |
+
// esc_textarea( $field['value'] )
|
444 |
+
// $editor_id = $field['id']
|
445 |
+
$editor_settings = array(
|
446 |
+
'textarea_name' => $field['id']
|
447 |
+
);
|
448 |
+
|
449 |
+
echo '<label class="yikes-custom-wysiwyg-label" style="display:block;" for="' . $field['id'] . '">' . $field['label'] . '</label>'.
|
450 |
+
|
451 |
+
wp_editor( $field['value'], $field['id'], $editor_settings );
|
452 |
+
|
453 |
+
if ( isset( $field['description'] ) && $field['description'] ) {
|
454 |
+
echo '<span class="description">' . $field['description'] . '</span>';
|
455 |
+
}
|
456 |
+
|
457 |
+
}
|
458 |
|
459 |
|
460 |
/** Helper methods ******************************************************/
|