Tabby Responsive Tabs - Version 1.3.3

Version Description

  • Added option to change the tab title element
Download this release

Release Info

Developer numeeja
Plugin Icon 128x128 Tabby Responsive Tabs
Version 1.3.3
Comparing to
See all releases

Code changes from version 1.3.0 to 1.3.3

Files changed (6) hide show
  1. css/admin.css +38 -6
  2. includes/admin.php +36 -11
  3. js/tabby.js +1 -1
  4. readme.txt +19 -6
  5. tabby-responsive-tabs.php +9 -8
  6. uninstall.php +16 -0
css/admin.css CHANGED
@@ -27,7 +27,10 @@
27
  }
28
 
29
  .tabbyoptions .card {
 
 
30
  background-color: #fcfcfc;
 
31
  width: auto;
32
  max-width: 100%;
33
  display: block;
@@ -49,7 +52,7 @@
49
  background-color: #fff;
50
  padding: 2em 7.5%;
51
  margin: 2em 2.5%;
52
- background-image: linear-gradient( 0deg, #bfd9b9 1.67%, #ffffff 1.67%, #ffffff 5%, #bfd9b9 5%, #bfd9b9 6.67%, #fff 6.67%, #fff 10%, #bfd9b9 10%, #bfd9b9 11.67%, #fff 11.67%, #fff 15%, #bfd9b9 15%, #bfd9b9 16.67%, #fff 16.67%, #fff 50%, #bfd9b9 50%, #bfd9b9 51.67%, #ffffff 51.67%, #ffffff 55%, #bfd9b9 55%, #bfd9b9 56.67%, #fff 56.67%, #fff 60%, #bfd9b9 60%, #bfd9b9 61.67%, #fff 61.67%, #fff 65%, #bfd9b9 65%, #bfd9b9 66.67%, #fff 66.67%, #fff 100%);
53
  background-size: 60px 60px;
54
  box-shadow: rgba(50, 50, 93, 0.25) 0 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
55
  border-top: 1px dashed #fff;
@@ -78,11 +81,23 @@
78
  border-left: 1px dashed #ddd;
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  .tabbycards {
82
  display: grid;
83
  grid-template-columns: repeat(auto-fill, minmax( 260px, 1fr));
84
  column-gap: 1.6rem;
85
- background: url("../images/tabby.png") 100% 98% no-repeat;
86
  margin-top: 0;
87
  }
88
 
@@ -93,6 +108,16 @@
93
  border: 0;
94
  position:relative;
95
  transition: all 1s;
 
 
 
 
 
 
 
 
 
 
96
  }
97
 
98
  .tabbycards .card h2 {
@@ -125,10 +150,17 @@
125
  padding-top: 2em;
126
  }
127
 
128
- .tabbycards .card {
129
- background-color: #4e426c;
 
 
 
 
130
  }
131
 
132
- .tabbycards .card:hover {
133
- background-color: #bf461d
 
 
 
134
  }
27
  }
28
 
29
  .tabbyoptions .card {
30
+ display: flex;
31
+ flex-direction: column;
32
  background-color: #fcfcfc;
33
+ display: flex;
34
  width: auto;
35
  max-width: 100%;
36
  display: block;
52
  background-color: #fff;
53
  padding: 2em 7.5%;
54
  margin: 2em 2.5%;
55
+ background-image: linear-gradient( 0deg, #dfecdc 1.67%, #ffffff 1.67%, #ffffff 5%, #dfecdc 5%, #dfecdc 6.67%, #fff 6.67%, #fff 10%, #dfecdc 10%, #dfecdc 11.67%, #fff 11.67%, #fff 15%, #dfecdc 15%, #dfecdc 16.67%, #fff 16.67%, #fff 50%, #dfecdc 50%, #dfecdc 51.67%, #ffffff 51.67%, #ffffff 55%, #dfecdc 55%, #dfecdc 56.67%, #fff 56.67%, #fff 60%, #dfecdc 60%, #dfecdc 61.67%, #fff 61.67%, #fff 65%, #dfecdc 65%, #dfecdc 66.67%, #fff 66.67%, #fff 100%);
56
  background-size: 60px 60px;
57
  box-shadow: rgba(50, 50, 93, 0.25) 0 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
58
  border-top: 1px dashed #fff;
81
  border-left: 1px dashed #ddd;
82
  }
83
 
84
+ .after-settings {
85
+ margin-bottom: 12em;
86
+ }
87
+
88
+ .tabbyoptions .contribute {
89
+ position: absolute;
90
+ background-color: #ffd566;
91
+ padding: 2em;
92
+ bottom: 2em;
93
+ left: 2em;
94
+ right: 2em;
95
+ }
96
+
97
  .tabbycards {
98
  display: grid;
99
  grid-template-columns: repeat(auto-fill, minmax( 260px, 1fr));
100
  column-gap: 1.6rem;
 
101
  margin-top: 0;
102
  }
103
 
108
  border: 0;
109
  position:relative;
110
  transition: all 1s;
111
+ background-color: #4e426c;
112
+ }
113
+
114
+ .tabbycards .card:hover {
115
+ background-color: #bf461d
116
+ }
117
+
118
+ .tabbycards .card.tabbycat,
119
+ .tabbycards .card.tabbycat:hover {
120
+ background: none;
121
  }
122
 
123
  .tabbycards .card h2 {
150
  padding-top: 2em;
151
  }
152
 
153
+ .card.tabbycat {
154
+ min-height: 220px;
155
+ justify-self: end;
156
+ padding: 0;
157
+ width: 100%;
158
+ box-shadow: none;
159
  }
160
 
161
+ .tabbycat img {
162
+ position: absolute;
163
+ bottom: 1em;
164
+ width: 100%;
165
+ height: auto;
166
  }
includes/admin.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  Package: Tabby Responsive Tabs plugin for WordPress
6
  Author: cubecolour
7
- Version: 1.3.0
8
 
9
  File: Admin Panel
10
  admin.php
@@ -48,10 +48,12 @@ function cc_tabby_menu() {
48
  function cc_register_tabby_settings() {
49
 
50
  //* Assign default values
51
- add_option( 'cc_tabby_default_styles', '1' );
 
52
 
53
  //* register the settings
54
- register_setting( 'cc-tabby-group', 'cc_tabby_default_styles' );
 
55
  }
56
 
57
  function cc_tabby_settings_page() {
@@ -72,21 +74,38 @@ function cc_tabby_settings_page() {
72
  <p><?php esc_attr_e( 'If you are using a custom set of tabby styles in your child theme or elsewhere, uncheck the checkbox below to remove the default tabby stylesheet.' ) ?></p>
73
  <form method="post" action="options.php">
74
 
75
- <?php settings_fields( 'cc-tabby-group' ); ?>
76
- <?php do_settings_sections( 'cc-tabby-group' ); ?>
77
-
78
- <label for="cc_tabby_default_styles"><?php esc_attr_e( 'Include the default tabby stylesheet:' ) ?></label>
79
- <input type="checkbox" name="cc_tabby_default_styles" value="1" <?php checked( get_option('cc_tabby_default_styles'), 1 ); ?> />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  </form>
81
- <?php submit_button( $text = "Save Change", $type = 'primary' ); ?>
82
- <p>To customise how your tabs display, either:
83
  <ul>
84
  <li>Uncheck the option above, copy the css rules from the <a href="<?php echo CC_TABBY_PLUGIN_URL . 'css/tabby.css'; ?>" target="_blank">tabby stylesheet</a> into your child theme's stylesheet or the custom css section of the WordPress customizer, and edit the css there.</li>
85
  <li>Alternatively the optional Tabby responsive tabs customiser add-on can be used to customise the tab design without any code editing.</li>
86
  </ul>
87
  <div class="contribute">
88
- If this plugin or has provided you with some value, or it has saved you some development time, please consider purchasing an add-on, or making a contribution to <a href="https://cubecolour.co.uk/wp/">Michael's beverage fund</a>.
89
  </div>
 
90
  </li>
91
  <!- - - - - - - ->
92
  <li class="card usage">
@@ -182,6 +201,12 @@ This is the content of the third tab.
182
  <a href="https://cubecolour.co.uk/contact/" class="button button-primary"><?php esc_attr_e( 'Request quote' ) ?></a>
183
  </p>
184
  </li>
 
 
 
 
 
 
185
  <!- - - - - - - ->
186
  </ul>
187
 
4
 
5
  Package: Tabby Responsive Tabs plugin for WordPress
6
  Author: cubecolour
7
+ Version: 1.3.3
8
 
9
  File: Admin Panel
10
  admin.php
48
  function cc_register_tabby_settings() {
49
 
50
  //* Assign default values
51
+ add_option( 'cc_tabby_default_styles', 1 );
52
+ add_option( 'cc_tabby_tab_title_element', 'h2' );
53
 
54
  //* register the settings
55
+ register_setting( 'tabby-settings', 'cc_tabby_default_styles', 'bool' );
56
+ register_setting( 'tabby-settings', 'cc_tabby_tab_title_element' );
57
  }
58
 
59
  function cc_tabby_settings_page() {
74
  <p><?php esc_attr_e( 'If you are using a custom set of tabby styles in your child theme or elsewhere, uncheck the checkbox below to remove the default tabby stylesheet.' ) ?></p>
75
  <form method="post" action="options.php">
76
 
77
+ <?php settings_fields( 'tabby-settings' ); ?>
78
+ <?php do_settings_sections( 'tabby-settings' ); ?>
79
+ <?php $tab_title_element = esc_html( get_option( 'cc_tabby_tab_title_element', 'h2' ) ); ?>
80
+ <p>
81
+ <label for="cc_tabby_default_styles"><?php esc_attr_e( 'Include the default tabby stylesheet:' ) ?></label>
82
+ <input type="checkbox" name="cc_tabby_default_styles" value=1 <?php checked( 1, get_option('cc_tabby_default_styles'), 1 ); ?> />
83
+ </p>
84
+ <p>
85
+ <label for="cc_tabby_tab_title_element"><?php esc_attr_e( 'Tab title element (default: H2)' ) ?></label>
86
+ <select name="cc_tabby_tab_title_element" id="cc_tabby_tab_title_element">
87
+ <option value="h1"<?php selected( $tab_title_element, 'h1' ); ?>>h1</option>
88
+ <option value="h2"<?php selected( $tab_title_element, 'h2' ); ?>>h2</option>
89
+ <option value="h3"<?php selected( $tab_title_element, 'h3' ); ?>>h3</option>
90
+ <option value="h4"<?php selected( $tab_title_element, 'h4' ); ?>>h4</option>
91
+ <option value="h5"<?php selected( $tab_title_element, 'h5' ); ?>>h5</option>
92
+ <option value="h6"<?php selected( $tab_title_element, 'h6' ); ?>>h6</option>
93
+ <option value="p"<?php selected( $tab_title_element, 'p' ); ?>>p</option>
94
+ </select>
95
+ </p>
96
+
97
+ <?php submit_button( $text="Save Changes", $type='primary' ); ?>
98
  </form>
99
+ <div class="after-settings">
100
+ <p>To customise how your tabs display, either:</p>
101
  <ul>
102
  <li>Uncheck the option above, copy the css rules from the <a href="<?php echo CC_TABBY_PLUGIN_URL . 'css/tabby.css'; ?>" target="_blank">tabby stylesheet</a> into your child theme's stylesheet or the custom css section of the WordPress customizer, and edit the css there.</li>
103
  <li>Alternatively the optional Tabby responsive tabs customiser add-on can be used to customise the tab design without any code editing.</li>
104
  </ul>
105
  <div class="contribute">
106
+ If this plugin or has provided you with some value, or it has saved you some development time, please consider purchasing an add-on, or making a contribution to <a href="https://cubecolour.co.uk/wp/">Michael's beverage fund.</a>
107
  </div>
108
+ </div>
109
  </li>
110
  <!- - - - - - - ->
111
  <li class="card usage">
201
  <a href="https://cubecolour.co.uk/contact/" class="button button-primary"><?php esc_attr_e( 'Request quote' ) ?></a>
202
  </p>
203
  </li>
204
+ <!- - - - - - - ->
205
+ <li class="card tabbycat"></li>
206
+ <!- - - - - - - ->
207
+ <li class="card tabbycat">
208
+ <img src="<?php echo CC_TABBY_PLUGIN_URL . 'images/tabby.png'; ?>">
209
+ </li>
210
  <!- - - - - - - ->
211
  </ul>
212
 
js/tabby.js CHANGED
@@ -23,7 +23,7 @@ var RESPONSIVEUI = {};
23
  var $tabs = $(this);
24
 
25
  // add tab heading and tab panel classes
26
- $tabs.children(':header').addClass('responsive-tabs__heading');
27
  $tabs.children('div').addClass('responsive-tabs__panel');
28
 
29
  // determine if markup already identifies the active tab panel for this set of tabs
23
  var $tabs = $(this);
24
 
25
  // add tab heading and tab panel classes
26
+ $tabs.children(':header, p').addClass('responsive-tabs__heading');
27
  $tabs.children('div').addClass('responsive-tabs__panel');
28
 
29
  // determine if markup already identifies the active tab panel for this set of tabs
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: numeeja
3
  Donate link: http://cubecolour.co.uk/wp
4
  Tags: tabs, tab, responsive, accordion, shortcode
5
  Tested up to: 5.9
6
- Stable tag: 1.3.0
7
  License: GPLv2
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
  License of javascript:
@@ -145,7 +145,7 @@ There are a few things you can investigate when troubleshooting any plugin which
145
  If you copied &amp; pasted in the Tabby Responsive Tabs shortcodes from a web page showing an example usage rather than directly typing them into the page, it is possible that there may be invisible or invalid characters in the shortcode text, or the shortcodes are enclosed within code tags. Correct this by deleting the shortcodes and type them directly instead.
146
 
147
  **Plugin or theme conflicts**
148
- To troubleshoot whether you have a plugin or theme conflicting with the Tabby Responsive Tabs plugin, switch to a default theme such as Twenty-Thirteen. If the plugin starts working correctly at that point, you know that the theme needs to be investigated.
149
 
150
  If changing the theme makes no difference, deactivate all plugins except Tabby Responsive Tabs. If your Tabs appear correctly at that point, discover which plugin caused the issue by reactivating the plugins one by one until Tabby Responsive Tabs stops working again.
151
 
@@ -167,7 +167,9 @@ In your your WordPress admin, go to settings -> tabby and uncheck the "Include t
167
 
168
  = Where is the plugin's admin page? =
169
 
170
- If you want to be able to customise your tabs using an admin page, the [Tabby Responsive Tabs Customiser plugin](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser plugin") is available.
 
 
171
 
172
  = Does this plugin work with responsive Themes? =
173
 
@@ -293,15 +295,23 @@ For more details please see: [Tabby Link to Tab plugin](http://cubecolour.co.uk/
293
 
294
  == Changelog ==
295
 
 
 
 
296
  = 1.3.1 =
297
  * Fixed issue with the option value saving
 
 
 
 
 
298
 
299
  = 1.3.0 =
300
  * using target url parameter overrides open shortcode parameter for which tab is to be open on page load
301
  * Shortcode parameters now used in array, not extracted
302
- * Priority of tabbytrigger changed to 30 by default to prevent breakage on pages created with the WordPress block editor. Prority can be changed by adding 'priority' shortcode parameter with an appropriate value
303
- * ico shortcode parameter added to enable custom icons to be added without adding font-awesome prefixes.
304
- * replaced tabbytrigger function - now uses wp_add_inline_script
305
 
306
  = 1.2.3 =
307
 
@@ -350,6 +360,9 @@ For more details please see: [Tabby Link to Tab plugin](http://cubecolour.co.uk/
350
 
351
  == Upgrade Notice ==
352
 
 
 
 
353
  = 1.3.1 =
354
  * Fixed issue with the option value saving
355
 
3
  Donate link: http://cubecolour.co.uk/wp
4
  Tags: tabs, tab, responsive, accordion, shortcode
5
  Tested up to: 5.9
6
+ Stable tag: 1.3.3
7
  License: GPLv2
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
  License of javascript:
145
  If you copied &amp; pasted in the Tabby Responsive Tabs shortcodes from a web page showing an example usage rather than directly typing them into the page, it is possible that there may be invisible or invalid characters in the shortcode text, or the shortcodes are enclosed within code tags. Correct this by deleting the shortcodes and type them directly instead.
146
 
147
  **Plugin or theme conflicts**
148
+ To troubleshoot whether you have a plugin or theme conflicting with the Tabby Responsive Tabs plugin, switch to a default theme such as Twenty-Twentytwo. If the plugin starts working correctly at that point, you know that the theme needs to be investigated.
149
 
150
  If changing the theme makes no difference, deactivate all plugins except Tabby Responsive Tabs. If your Tabs appear correctly at that point, discover which plugin caused the issue by reactivating the plugins one by one until Tabby Responsive Tabs stops working again.
151
 
167
 
168
  = Where is the plugin's admin page? =
169
 
170
+ The admin page is at settings => tabby.
171
+
172
+ If you want to be able to customise your tabs without editing code, the [Tabby Responsive Tabs Customiser plugin](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser plugin") is available, and provides options to customise how the tabs display.
173
 
174
  = Does this plugin work with responsive Themes? =
175
 
295
 
296
  == Changelog ==
297
 
298
+ = 1.3.3 =
299
+ * Added option to change the tab title element
300
+
301
  = 1.3.1 =
302
  * Fixed issue with the option value saving
303
+ * using target url parameter overrides open shortcode parameter for which tab is to be open on page load
304
+ * Shortcode parameters now used in array, not extracted
305
+ * Priority of tabbytrigger can be changed by adding 'priority' shortcode parameter with an appropriate value
306
+ * Priority of tabbytrigger changed to 30 by default to prevent breakage on pages created with gutenberg
307
+ * ico shortcode parameter added to enable custom icons to be added without adding font-awesome prefixes
308
 
309
  = 1.3.0 =
310
  * using target url parameter overrides open shortcode parameter for which tab is to be open on page load
311
  * Shortcode parameters now used in array, not extracted
312
+ * Priority of tabbytrigger can be changed by adding 'priority' shortcode parameter with an appropriate value
313
+ * Priority of tabbytrigger changed to 30 by default to prevent breakage on pages created with gutenberg
314
+ * ico shortcode parameter added to enable custom icons to be added without adding font-awesome prefixes
315
 
316
  = 1.2.3 =
317
 
360
 
361
  == Upgrade Notice ==
362
 
363
+ = 1.3.3 =
364
+ * Added option to change the tab title element markup
365
+
366
  = 1.3.1 =
367
  * Fixed issue with the option value saving
368
 
tabby-responsive-tabs.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Tabby Responsive Tabs
4
  Plugin URI: https://cubecolour.co.uk/tabby-responsive-tabs
5
  Description: Create responsive tabs inside your posts, pages or custom post types by adding simple shortcodes. An easy to use admin page can be added to customise the tab styles with the optional Tabby Responsive Tabs Customiser add-on plugin.
6
  Author: cubecolour
7
- Version: 1.3.0
8
  Requires at least: 5.0
9
  Requires PHP: 5.6
10
  Author URI: https://cubecolour.co.uk
@@ -63,7 +63,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
63
  */
64
  define( 'CC_TABBY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
65
  define( 'CC_TABBY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
66
- define( 'CC_TABBY_PLUGIN_VERSION', '1.3.0' );
67
 
68
  function cc_tabby_plugin_version(){
69
  return CC_TABBY_PLUGIN_VERSION;
@@ -107,7 +107,6 @@ function cc_tabby_meta_links( $links, $file ) {
107
  return $links;
108
  }
109
 
110
-
111
  /**
112
  * Add the admin page if 'tabby responsive tabs customiser' is not active
113
  *
@@ -167,6 +166,8 @@ function cc_shortcode_tabby( $atts, $content = null ) {
167
 
168
  $tabtarget = sanitize_title_with_dashes( remove_accents( wp_kses_decode_entities( $args['title'] ) ) );
169
 
 
 
170
  //* initialise urltarget
171
  $urltarget = '';
172
 
@@ -175,7 +176,7 @@ function cc_shortcode_tabby( $atts, $content = null ) {
175
  $urltarget = sanitize_title_with_dashes( $_REQUEST['target'] );
176
  }
177
 
178
- //* Set Tab Panel Class - add active class if the open attribute is set or the target url parameter matches the dashed version of the tab title
179
  $tabcontentclass = "tabcontent";
180
 
181
  if ( isset( $class ) ) {
@@ -203,12 +204,12 @@ function cc_shortcode_tabby( $atts, $content = null ) {
203
  $firsttab = FALSE;
204
 
205
  //* Build output if we are making the first tab
206
- return '<div class="responsive-tabs">' . "\n" . '<h2 class="tabtitle">' . $addtabicon . sanitize_text_field( $args['title'] ) . '</h2>' . "\n" . '<div class="' . sanitize_text_field( $tabcontentclass ) . '">' . "\n";
207
  }
208
 
209
  else {
210
- //* Build output if we are making a non-first tab
211
- return "\n" . '</div><h2 class="tabtitle">' . $addtabicon . sanitize_text_field( $args['title'] ) . '</h2>' . "\n" . '<div class="' . sanitize_text_field( $tabcontentclass ) . '">' . "\n";
212
  }
213
  }
214
  add_shortcode( 'tabby', 'cc_shortcode_tabby' );
@@ -222,7 +223,7 @@ add_shortcode( 'tabby', 'cc_shortcode_tabby' );
222
  function cc_shortcode_tabbyending( $atts, $content = null ) {
223
 
224
  //* add screen styles, but only if the customiser or a custom styles plugin is not active
225
- if ( ( !function_exists( 'cc_remove_tabby_default_css' ) ) && ( !function_exists( 'cc_remove_tabby_default_style' ) ) ) {
226
  wp_enqueue_style( 'tabby' );
227
  }
228
 
4
  Plugin URI: https://cubecolour.co.uk/tabby-responsive-tabs
5
  Description: Create responsive tabs inside your posts, pages or custom post types by adding simple shortcodes. An easy to use admin page can be added to customise the tab styles with the optional Tabby Responsive Tabs Customiser add-on plugin.
6
  Author: cubecolour
7
+ Version: 1.3.3
8
  Requires at least: 5.0
9
  Requires PHP: 5.6
10
  Author URI: https://cubecolour.co.uk
63
  */
64
  define( 'CC_TABBY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
65
  define( 'CC_TABBY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
66
+ define( 'CC_TABBY_PLUGIN_VERSION', '1.3.3' );
67
 
68
  function cc_tabby_plugin_version(){
69
  return CC_TABBY_PLUGIN_VERSION;
107
  return $links;
108
  }
109
 
 
110
  /**
111
  * Add the admin page if 'tabby responsive tabs customiser' is not active
112
  *
166
 
167
  $tabtarget = sanitize_title_with_dashes( remove_accents( wp_kses_decode_entities( $args['title'] ) ) );
168
 
169
+ $tab_title_element = esc_html( get_option( 'cc_tabby_tab_title_element', 'h2' ) );
170
+
171
  //* initialise urltarget
172
  $urltarget = '';
173
 
176
  $urltarget = sanitize_title_with_dashes( $_REQUEST['target'] );
177
  }
178
 
179
+ //* Set Tab Panel Class - add active class if the open attribute is set or the target url parameter matches the dashed version of the tab title
180
  $tabcontentclass = "tabcontent";
181
 
182
  if ( isset( $class ) ) {
204
  $firsttab = FALSE;
205
 
206
  //* Build output if we are making the first tab
207
+ return '<div class="responsive-tabs">' . "\n" . '<' . $tab_title_element . ' class="tabtitle">' . $addtabicon . sanitize_text_field( $args['title'] ) . '</' . $tab_title_element . '>' . "\n" . '<div class="' . sanitize_text_field( $tabcontentclass ) . '">' . "\n";
208
  }
209
 
210
  else {
211
+ //* Build output if we are making a non-first tab
212
+ return "\n" . '</div><' . $tab_title_element . ' class="tabtitle">' . $addtabicon . sanitize_text_field( $args['title'] ) . '</' . $tab_title_element . '>' . "\n" . '<div class="' . sanitize_text_field( $tabcontentclass ) . '">' . "\n";
213
  }
214
  }
215
  add_shortcode( 'tabby', 'cc_shortcode_tabby' );
223
  function cc_shortcode_tabbyending( $atts, $content = null ) {
224
 
225
  //* add screen styles, but only if the customiser or a custom styles plugin is not active
226
+ if ( ( !function_exists( 'cc_remove_tabby_default_css' ) ) && ( !function_exists( 'cc_remove_tabby_default_style' ) ) && ( 1 == get_option( 'cc_tabby_default_styles' ) ) ) {
227
  wp_enqueue_style( 'tabby' );
228
  }
229
 
uninstall.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit();
4
+
5
+ /**
6
+ * Remove the Option used by the plugin
7
+ *
8
+ */
9
+ if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) exit();
10
+
11
+ cc_remove_tabby_settings();
12
+
13
+ function cc_remove_tabby_settings() {
14
+ delete_option( 'cc_tabby_default_styles' );
15
+ delete_option( 'cc_tabby_tab_title_element' );
16
+ }