Version Description
- Added index.php to prevent the content of plugin directories being viewed if the site has not had directory browsing disallowed.
Download this release
Release Info
Developer | numeeja |
Plugin | Tabby Responsive Tabs |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
- css/index.php +1 -0
- index.php +1 -0
- js/index.php +1 -0
- readme.txt +81 -22
- tabby-responsive-tabs.php +35 -36
css/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence will fall
|
index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence will fall
|
js/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence will fall
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Tabby Responsive Tabs ===
|
2 |
Contributors: numeeja
|
3 |
Donate link: http://cubecolour.co.uk/wp
|
4 |
-
Tags:
|
5 |
Requires at least: 3.7
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 / MIT
|
9 |
|
10 |
Create responsive tabs inside your posts, pages or custom post content by adding simple shortcodes inside the post editor.
|
@@ -20,7 +20,10 @@ Create responsive tabs inside your posts, pages or custom post content by adding
|
|
20 |
|
21 |
The Tabby Responsive Tabs plugin is designed to be an easy and lightweight way to add responsive tabs to your content. There is no admin panel and experienced developers should be able to easily customise how the tabs display on their site by replacing the built-in CSS rules with a customised version (see note below for more details of this).
|
22 |
|
23 |
-
|
|
|
|
|
|
|
24 |
|
25 |
= Usage: =
|
26 |
|
@@ -35,7 +38,12 @@ Add the tab content after the shortcode.
|
|
35 |
Add a `[tabbyending]` shortcode after the content of the last tab in a tabgroup.
|
36 |
|
37 |
= Example =
|
|
|
|
|
38 |
`
|
|
|
|
|
|
|
39 |
[tabby title="First Tab"]
|
40 |
|
41 |
Tabby ipsum dolor sit amet, kitty sunbathe dolor, feed me.
|
@@ -47,15 +55,24 @@ Lay down in your way catnip stuck in a tree, sunbathe kittens.
|
|
47 |
[tabby title="Third Tab"]
|
48 |
|
49 |
sleep in the sink climb the curtains attack, give me fish.
|
|
|
50 |
[tabbyending]
|
|
|
|
|
|
|
51 |
`
|
|
|
|
|
|
|
52 |
You can see the tabs on the [demo page](http://cubecolour.co.uk/tabby-responsive-tabs/ "Tabby Responsive Tabs demo").
|
53 |
|
54 |
If you want to change how the tabs and accordion display on your site, you have two options:
|
55 |
|
56 |
1. Use the [Tabby Responsive Tabs Customiser](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser") plugin which provides a very easy way to customise the display of your tabs without needing to edit any code.
|
57 |
|
58 |
-
2. Copy the contents of the plugin's stylesheet into your child theme or custom styles plugin and make the changes to the copy as required. If you do this you will also need to prevent the built-in styles from loading by adding the following line to your child theme's functions.php or a custom functionality plugin:
|
|
|
|
|
59 |
|
60 |
= Additional Shortcode attributes =
|
61 |
|
@@ -69,25 +86,29 @@ If you want a specific tab other than the first tab to be open by default when t
|
|
69 |
[tabby title="My Tab" open="yes"]
|
70 |
`
|
71 |
|
72 |
-
If you use the 'open' shortcode parameter in one of your tab shortcodes ensure that you only add it to single tab as having more than one tab open
|
73 |
|
74 |
**Icon**
|
75 |
|
76 |
The markup required to show an icon alongside a tab title can be added by using the **'icon'** attribute. Tabby responsive tabs does not add the icons files, you will also need to use a theme or plugin (such as the tabby responsive tabs customiser add-on) to add the icon files:
|
77 |
`
|
|
|
78 |
[tabby title="My Tab" icon="cog"]
|
|
|
79 |
`
|
80 |
This adds a pseudo element before the tab table with the classes "fa" and "fa-cog". Other icon font sets can be used if you ensure the CSS rules target the classes added by the plugin.
|
81 |
|
82 |
-
The [Tabby Responsive Tabs Customiser](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser") plugin can be used to add the
|
83 |
|
84 |
|
85 |
= Controlling which tab is open when linking to the page =
|
86 |
-
You can use a 'target' URL parameter to set which tab will be open. The value of this parameter is based on tab title specified in the tabby shortcode with punctuation & special characters removed and with
|
87 |
|
88 |
If you want to link to a 'contacts' page with a tab titled 'Phone Numbers' open, the url you use to link to this page would look like:
|
89 |
`
|
|
|
90 |
yoursite.com/contact/?target=phone-numbers
|
|
|
91 |
`
|
92 |
If you want a tab with the title 'email addresses' to be open, the url would look like:
|
93 |
`
|
@@ -96,31 +117,36 @@ yoursite.com/contact/?target=email-addresses
|
|
96 |
|
97 |
== Installation ==
|
98 |
|
99 |
-
1. Upload the plugin folder to your '/wp-content/plugins/' directory
|
100 |
-
|
101 |
|
102 |
== Frequently Asked Questions ==
|
103 |
|
104 |
= Why isn't it working for me? =
|
105 |
|
106 |
-
There are a few things you can investigate when troubleshooting
|
107 |
|
108 |
**Incorrectly formed shortcodes**
|
109 |
-
If you copied & pasted in the shortcodes from a web page rather than directly typing them into the page, it is possible that there may be invisible characters in the shortcode text. Correct this by deleting the shortcodes and type them directly instead.
|
110 |
|
111 |
**Plugin or theme conflicts**
|
112 |
-
To troubleshoot whether you have a plugin or theme conflicting with
|
|
|
|
|
|
|
|
|
113 |
|
114 |
-
|
|
|
115 |
|
116 |
-
|
117 |
|
118 |
= How can I get rid of extra paragraph tags at the beginning or end of the tab content? =
|
119 |
These can be added by the wpautop function. It is recommended to leave a blank line before and after each tabby shortcode to prevent these from appearing.
|
120 |
|
121 |
|
122 |
-
= Pasted-in shortcodes aren't working =
|
123 |
-
If you are copying & pasting the example shortcodes into the visual editor and the shortcodes don't seem to be working,
|
124 |
|
125 |
= Where is the plugin's admin page? =
|
126 |
|
@@ -155,14 +181,32 @@ This value can also be set using the Tabby Responsive Tabs Customiser plugin's a
|
|
155 |
|
156 |
Some carousel/slider/gallery plugins render their content with zero height & width if the tab containing the content is not visible on page load. If you need to place a slider in a tab, I would suggest trying Meteor Slides as it seems to work reliably in my tests. Native WordPress galleries also work with no problems.
|
157 |
|
|
|
|
|
|
|
|
|
158 |
= Why Doesn't my Google Map work in any tab except the first one? =
|
159 |
|
160 |
-
Some google maps plugins render their content with zero height & width if the tab containing the content is not visible on page load. I
|
161 |
|
162 |
= Can I display multiple tab groups on a single page? =
|
163 |
|
164 |
Yes you can have as many sets of tabs as you like.
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
= Can I specify which tab is open when the page initially loads? =
|
167 |
|
168 |
Yes, see the documentation for the 'open' shortcode parameter for details.
|
@@ -192,9 +236,13 @@ eg:
|
|
192 |
yoursite.com/?page_id=1&target=phone-numbers
|
193 |
`
|
194 |
|
|
|
|
|
|
|
|
|
195 |
= How will the tabs print? =
|
196 |
|
197 |
-
|
198 |
|
199 |
= Are there any other free cubecolour plugins? =
|
200 |
|
@@ -202,7 +250,7 @@ If you like Tabby Responsive Tabs, you may like some of my other plugins in the
|
|
202 |
|
203 |
= Who or what is cubecolour? =
|
204 |
|
205 |
-
My name is Michael Atkins. Cubecolour is the name of my web design and development business in South London where I work with businesses, organisations and individuals to build and support their websites using WordPress. I
|
206 |
|
207 |
= Why do you spell the word 'color' incorrectly? =
|
208 |
|
@@ -222,9 +270,16 @@ No, Tabby Responsive Tabs works great on its own and customising how the tabs di
|
|
222 |
|
223 |
The free Tabby Responsive Tabs plugin was designed as a lightweight plugin for WordPress developers to add responsive tabs to their WordPress site. The functionality provided by the optional add-on customiser plugin was never intended to be included as part of Tabby Responsive Tabs and is designed to be particularly useful for non-coders.
|
224 |
|
225 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
|
227 |
-
The [Tabby Responsive Tabs Customiser plugin](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser plugin") costs 15GBP.
|
228 |
|
229 |
== Other Notes ==
|
230 |
|
@@ -238,6 +293,10 @@ The plugin is licenced under [GNU GPLv2](http://opensource.org/licenses/GPL-2.0
|
|
238 |
|
239 |
== Changelog ==
|
240 |
|
|
|
|
|
|
|
|
|
241 |
= 1.2.0 =
|
242 |
|
243 |
* Added basic print styles to default stylesheet
|
1 |
=== Tabby Responsive Tabs ===
|
2 |
Contributors: numeeja
|
3 |
Donate link: http://cubecolour.co.uk/wp
|
4 |
+
Tags: tab, tabs, jquery, responsive, shortcode
|
5 |
Requires at least: 3.7
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 1.2.1
|
8 |
License: GPLv2 / MIT
|
9 |
|
10 |
Create responsive tabs inside your posts, pages or custom post content by adding simple shortcodes inside the post editor.
|
20 |
|
21 |
The Tabby Responsive Tabs plugin is designed to be an easy and lightweight way to add responsive tabs to your content. There is no admin panel and experienced developers should be able to easily customise how the tabs display on their site by replacing the built-in CSS rules with a customised version (see note below for more details of this).
|
22 |
|
23 |
+
= Optional Add-ons =
|
24 |
+
> The [Tabby Responsive Tabs Customiser](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser") add-on adds a settings panel with several parameters for customising your tabs. to provide the easiest way to customise the display of your tabs without editing any code. You can use the default tabby styles or one of the included one-click presets as a starting point for customisation. It also enables you to easily add icons to your tab titles.
|
25 |
+
|
26 |
+
> The [Tabby Link to Tab](http://cubecolour.co.uk/downloads/tabby-link-to-tab/ "Tabby Link to Tab") add-on provides a simple shortcode to create links to specific tabs which can appear anywhere on the same page as the tabgroup without the page needing to reload.
|
27 |
|
28 |
= Usage: =
|
29 |
|
38 |
Add a `[tabbyending]` shortcode after the content of the last tab in a tabgroup.
|
39 |
|
40 |
= Example =
|
41 |
+
*If you copy & paste this example into your own page instead of typing them, ensure that any stray <code> or <pre> tags are deleted.*
|
42 |
+
|
43 |
`
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
[tabby title="First Tab"]
|
48 |
|
49 |
Tabby ipsum dolor sit amet, kitty sunbathe dolor, feed me.
|
55 |
[tabby title="Third Tab"]
|
56 |
|
57 |
sleep in the sink climb the curtains attack, give me fish.
|
58 |
+
|
59 |
[tabbyending]
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
`
|
64 |
+
|
65 |
+
*note: To prevent stray paragraph tags being introduced by WordPress's wpautop filter, ensure that you leave a blank line above and below each tabby shortcode and the tabbyending.*
|
66 |
+
|
67 |
You can see the tabs on the [demo page](http://cubecolour.co.uk/tabby-responsive-tabs/ "Tabby Responsive Tabs demo").
|
68 |
|
69 |
If you want to change how the tabs and accordion display on your site, you have two options:
|
70 |
|
71 |
1. Use the [Tabby Responsive Tabs Customiser](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser") plugin which provides a very easy way to customise the display of your tabs without needing to edit any code.
|
72 |
|
73 |
+
2. Copy the contents of the plugin's stylesheet into your child theme or custom styles plugin and make the changes to the copy as required. If you do this you will also need to prevent the built-in styles from loading by adding the following line to your child theme's functions.php or a custom functionality plugin:
|
74 |
+
|
75 |
+
`<?php remove_action('wp_print_styles', 'cc_tabby_css', 30); ?>`
|
76 |
|
77 |
= Additional Shortcode attributes =
|
78 |
|
86 |
[tabby title="My Tab" open="yes"]
|
87 |
`
|
88 |
|
89 |
+
If you use the 'open' shortcode parameter in one of your tab shortcodes, ensure that you only add it to single tab as having more than one tab open within a tab group is not supported.
|
90 |
|
91 |
**Icon**
|
92 |
|
93 |
The markup required to show an icon alongside a tab title can be added by using the **'icon'** attribute. Tabby responsive tabs does not add the icons files, you will also need to use a theme or plugin (such as the tabby responsive tabs customiser add-on) to add the icon files:
|
94 |
`
|
95 |
+
|
96 |
[tabby title="My Tab" icon="cog"]
|
97 |
+
|
98 |
`
|
99 |
This adds a pseudo element before the tab table with the classes "fa" and "fa-cog". Other icon font sets can be used if you ensure the CSS rules target the classes added by the plugin.
|
100 |
|
101 |
+
The [Tabby Responsive Tabs Customiser](http://cubecolour.co.uk/tabby-responsive-tabs-customiser/ "Tabby Responsive Tabs Customiser") plugin can be used to add the Font Awesome files required to display the icons in the tab titles.
|
102 |
|
103 |
|
104 |
= Controlling which tab is open when linking to the page =
|
105 |
+
You can use a 'target' URL parameter to set which tab will be open when the page initially loads. The value of this parameter is based on the tab title specified in the tabby shortcode, but formatted with punctuation & special characters removed and with dashes replacing the spaces.
|
106 |
|
107 |
If you want to link to a 'contacts' page with a tab titled 'Phone Numbers' open, the url you use to link to this page would look like:
|
108 |
`
|
109 |
+
|
110 |
yoursite.com/contact/?target=phone-numbers
|
111 |
+
|
112 |
`
|
113 |
If you want a tab with the title 'email addresses' to be open, the url would look like:
|
114 |
`
|
117 |
|
118 |
== Installation ==
|
119 |
|
120 |
+
1. Upload the Tabby Responsive Tabs plugin folder to your '/wp-content/plugins/' directory
|
121 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
122 |
|
123 |
== Frequently Asked Questions ==
|
124 |
|
125 |
= Why isn't it working for me? =
|
126 |
|
127 |
+
There are a few things you can investigate when troubleshooting any plugin which is not working as expected:
|
128 |
|
129 |
**Incorrectly formed shortcodes**
|
130 |
+
If you copied & 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.
|
131 |
|
132 |
**Plugin or theme conflicts**
|
133 |
+
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.
|
134 |
+
|
135 |
+
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.
|
136 |
+
|
137 |
+
*If the plugin isn't working for you*, please read the documentation carefully to check whether your issue is covered. Then review the topics in the [plugin support forum](http://wordpress.org/support/plugin/tabby-responsive-tabs/ "Tabby Responsive Tabs plugin support forum"). You may find an appropriate solution outlined in a resolved topic if someone had the same or a similar issue. If you do not find an answer that enables you to solve your issue, please post a new topic on the forum so we have an opportunity to get it working before you consider leaving a review.
|
138 |
|
139 |
+
= What levels of support are available? =
|
140 |
+
You can receive free support for the plugin if you have problems getting it working. To access this please open a new topic on the [plugin support forum](http://wordpress.org/support/plugin/tabby-responsive-tabs/ "Tabby Responsive Tabs plugin support forum") all communication must take place on the forum for free support
|
141 |
|
142 |
+
If you require a greater level of support than can be provided on the plugin support forum on WordPress.org - eg you prefer not to post the url or you require CSS support to fit specific requirements for your site, you can request non-free support via the [paid email support form for cubecolour plugins](http://cubecolour.co.uk/premium-support/ "paid email support form for cubecolour plugins") form.
|
143 |
|
144 |
= How can I get rid of extra paragraph tags at the beginning or end of the tab content? =
|
145 |
These can be added by the wpautop function. It is recommended to leave a blank line before and after each tabby shortcode to prevent these from appearing.
|
146 |
|
147 |
|
148 |
+
= Pasted-in shortcodes aren't working or the tabs have a 'stepped' appearance =
|
149 |
+
If you are copying & pasting the example shortcodes into the visual editor and the shortcodes don't seem to be working or the tabs appear in a stepped configuration, look at the page in the text editor to be sure that you aren't adding in any extra markup that isn't visible in the visual editor. Delete any opening and closing <pre> and/or <code> tags pairs surrounding the tab shortcodes. (this would apply to any plugin using shortcodes).
|
150 |
|
151 |
= Where is the plugin's admin page? =
|
152 |
|
181 |
|
182 |
Some carousel/slider/gallery plugins render their content with zero height & width if the tab containing the content is not visible on page load. If you need to place a slider in a tab, I would suggest trying Meteor Slides as it seems to work reliably in my tests. Native WordPress galleries also work with no problems.
|
183 |
|
184 |
+
= How can I get rid of unmatched opening or closing paragraph tags in the tabs making my markup invalid? =
|
185 |
+
|
186 |
+
This is caused by WordPress's wpautop filter which is applied to your post/page content. To prevent stray paragraph tags appearing, ensure that you leave a blank line before and after each shortcode.
|
187 |
+
|
188 |
= Why Doesn't my Google Map work in any tab except the first one? =
|
189 |
|
190 |
+
Some google maps plugins render their content with zero height & width if the tab containing the content is not visible on page load. I have been able to show maps within tabs using the [WP Flexible Map](https://wordpress.org/plugins/wp-flexible-map/ "WP Flexible Map") plugin.
|
191 |
|
192 |
= Can I display multiple tab groups on a single page? =
|
193 |
|
194 |
Yes you can have as many sets of tabs as you like.
|
195 |
|
196 |
+
= Can I include tabs in my sidebar? =
|
197 |
+
|
198 |
+
It is possible to include tabs within a text widget if you have added shortcode support to text widgets by adding the filter below to your child theme's functions.php or a custom functionality plugin.
|
199 |
+
|
200 |
+
`
|
201 |
+
add_filter('widget_text', 'do_shortcode');
|
202 |
+
`
|
203 |
+
This filter will enable you to use any shortcodes within text widgets.
|
204 |
+
|
205 |
+
|
206 |
+
= Can I nest a Tag Group within an existing tab? =
|
207 |
+
|
208 |
+
No, this is not supported.
|
209 |
+
|
210 |
= Can I specify which tab is open when the page initially loads? =
|
211 |
|
212 |
Yes, see the documentation for the 'open' shortcode parameter for details.
|
236 |
yoursite.com/?page_id=1&target=phone-numbers
|
237 |
`
|
238 |
|
239 |
+
= How can I use the Target Parameter on a link on the same page as the tabgroup without the page reloading? =
|
240 |
+
|
241 |
+
This is not possible with the target parameter, however this can be achieved by using the optional [Tabby Link to Tab plugin](http://cubecolour.co.uk/downloads/tabby-link-to-tab/ "Tabby Link to Tab plugin")
|
242 |
+
|
243 |
= How will the tabs print? =
|
244 |
|
245 |
+
Basic print styles are included in a print media query at the end of the plugin stylesheet (from version 1.2). This is designed to print the tab titles and content in series. If you are using custom styles for your tabs, you can copy these print styles to the end of your custom styles and customise them.
|
246 |
|
247 |
= Are there any other free cubecolour plugins? =
|
248 |
|
250 |
|
251 |
= Who or what is cubecolour? =
|
252 |
|
253 |
+
My name is Michael Atkins. Cubecolour is the name of my web design and development business in South London where I work with businesses, organisations and individuals to build and support their websites using WordPress. I enjoy attending local WordCamps and WordPress meetups. I have used WordPress since 2007 and I am a moderator on the WordPress.org forums. When I'm not sitting in front of my MacBook I can usually be found playing bass or ukulele.
|
254 |
|
255 |
= Why do you spell the word 'color' incorrectly? =
|
256 |
|
270 |
|
271 |
The free Tabby Responsive Tabs plugin was designed as a lightweight plugin for WordPress developers to add responsive tabs to their WordPress site. The functionality provided by the optional add-on customiser plugin was never intended to be included as part of Tabby Responsive Tabs and is designed to be particularly useful for non-coders.
|
272 |
|
273 |
+
= What is the Tabby Link to Tab plugin? =
|
274 |
+
|
275 |
+
Tabby Link to tab is an optional add-on for Tabby Responsive Tabs which provides a simple shortcode to create links to specific tabs which can appear anywhere on the same page as the tabgroup. When this is used, the tab becomes active without the page reloading. This add-on is not required in most cases but can be useful if you want to include links to specific tabs within the tab content or in a different area of the page.
|
276 |
+
|
277 |
+
For more details please see: [Tabby Link to Tab plugin](http://cubecolour.co.uk/downloads/tabby-link-to-tab/ "Tabby Link to Tab plugin"). This add-on was developed after several users requested the functionality.
|
278 |
+
|
279 |
+
= How much do the Tabby Responsive Tabs Customiser & Tabby Link to Tab add-ons cost? =
|
280 |
+
|
281 |
+
These cost 19GBP each for use on a single site. A developer option for each is also available or 99GBP which can be used on all the sites you own or control.
|
282 |
|
|
|
283 |
|
284 |
== Other Notes ==
|
285 |
|
293 |
|
294 |
== Changelog ==
|
295 |
|
296 |
+
= 1.2.1 =
|
297 |
+
|
298 |
+
* Added index.php to prevent the content of plugin directories being viewed if the site has not had directory browsing disallowed.
|
299 |
+
|
300 |
= 1.2.0 =
|
301 |
|
302 |
* Added basic print styles to default stylesheet
|
tabby-responsive-tabs.php
CHANGED
@@ -4,13 +4,13 @@ Plugin Name: Tabby Responsive Tabs
|
|
4 |
Plugin URI: http://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.2.
|
8 |
Author URI: http://cubecolour.co.uk
|
9 |
|
10 |
-
Tabby Responsive Tabs WordPress plugin Copyright 2013-
|
11 |
-
|
12 |
Licenced under the GNU GPL:
|
13 |
-
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
16 |
the Free Software Foundation; either version 2 of the License, or
|
@@ -24,31 +24,30 @@ Author URI: http://cubecolour.co.uk
|
|
24 |
You should have received a copy of the GNU General Public License
|
25 |
along with this program; if not, write to the Free Software
|
26 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
27 |
-
|
28 |
-
|
29 |
Original version of Responsive Tabs jQuery script by Pete Love:
|
30 |
http://www.petelove.co.uk/responsiveTabs/
|
31 |
http://codepen.io/petelove666/pen/zbLna
|
32 |
MIT license: http://blog.codepen.io/legal/licensing/
|
33 |
|
34 |
-
Permission is hereby granted, free of charge, to any person
|
35 |
-
obtaining a copy of this software and associated documentation
|
36 |
files (the "Software"), to deal in the Software without restriction,
|
37 |
-
including without limitation the rights to use, copy, modify,
|
38 |
-
merge, publish, distribute, sublicense, and/or sell copies of
|
39 |
-
the Software, and to permit persons to whom the Software is
|
40 |
furnished to do so, subject to the following conditions:
|
41 |
|
42 |
-
The above copyright notice and this permission notice shall
|
43 |
be included in all copies or substantial portions of the Software.
|
44 |
|
45 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
46 |
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
47 |
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
48 |
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
49 |
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
50 |
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
51 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
52 |
DEALINGS IN THE SOFTWARE.
|
53 |
|
54 |
*/
|
@@ -74,12 +73,12 @@ function cc_tabby_plugin_version() {
|
|
74 |
// ==============================================
|
75 |
// Add Links in Plugins Table
|
76 |
// ==============================================
|
77 |
-
|
78 |
add_filter( 'plugin_row_meta', 'cc_tabby_meta_links', 10, 2 );
|
79 |
function cc_tabby_meta_links( $links, $file ) {
|
80 |
|
81 |
$plugin = plugin_basename(__FILE__);
|
82 |
-
|
83 |
// create the links
|
84 |
if ( $file == $plugin ) {
|
85 |
|
@@ -89,11 +88,11 @@ function cc_tabby_meta_links( $links, $file ) {
|
|
89 |
$twitterlink = 'http://twitter.com/cubecolour';
|
90 |
$customiselink = 'http://cubecolour.co.uk/tabby-responsive-tabs-customiser';
|
91 |
$iconstyle = 'style="-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;"';
|
92 |
-
|
93 |
if ( is_plugin_active( 'tabby-responsive-tabs-customiser/tabby-customiser.php' ) ) {
|
94 |
$customiselink = admin_url( 'options-general.php?page=tabby-settings' );
|
95 |
}
|
96 |
-
|
97 |
return array_merge( $links, array(
|
98 |
'<a href="' . $supportlink . '"> <span class="dashicons dashicons-lightbulb" ' . $iconstyle . 'title="Tabby Responsive Tabs Support"></span></a>',
|
99 |
'<a href="' . $twitterlink . '"><span class="dashicons dashicons-twitter" ' . $iconstyle . 'title="Cubecolour on Twitter"></span></a>',
|
@@ -102,7 +101,7 @@ function cc_tabby_meta_links( $links, $file ) {
|
|
102 |
'<a href="' . $customiselink . '"><span class="dashicons dashicons-admin-appearance" ' . $iconstyle . 'title="Tabby Responsive Tabs Customizer"></span></a>'
|
103 |
) );
|
104 |
}
|
105 |
-
|
106 |
return $links;
|
107 |
}
|
108 |
|
@@ -122,7 +121,7 @@ function cc_tabby_meta_links( $links, $file ) {
|
|
122 |
// ==============================================
|
123 |
|
124 |
function cc_tabby_css() {
|
125 |
-
wp_enqueue_style('tabby.css', plugin_dir_url(__FILE__).'css/tabby.css' , false, cc_tabby_plugin_version() );
|
126 |
}
|
127 |
|
128 |
add_action('wp_print_styles', 'cc_tabby_css', 30);
|
@@ -137,7 +136,7 @@ function cc_tabbytrigger() {
|
|
137 |
|
138 |
if ($tabbytriggered == FALSE) {
|
139 |
echo "\n" . "<script>jQuery(document).ready(function($) { RESPONSIVEUI.responsiveTabs(); })</script>" . "\n";
|
140 |
-
|
141 |
$tabbytriggered = TRUE;
|
142 |
}
|
143 |
}
|
@@ -167,15 +166,15 @@ if ($GLOBALS["reset_firsttab_flag"] === TRUE) {
|
|
167 |
), $atts, 'tabbytab'));
|
168 |
|
169 |
$tabtarget = sanitize_title_with_dashes( $title );
|
170 |
-
|
171 |
//initialise urltarget
|
172 |
$urltarget = '';
|
173 |
-
|
174 |
//grab the value of the 'target' url parameter if there is one
|
175 |
if ( isset ( $_REQUEST['target'] ) ) {
|
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 |
|
@@ -184,17 +183,17 @@ if ($GLOBALS["reset_firsttab_flag"] === TRUE) {
|
|
184 |
}
|
185 |
|
186 |
$addtabicon = '';
|
187 |
-
|
188 |
if ( $icon ) {
|
189 |
$addtabicon = '<span class="fa fa-' . $icon . '"></span>';
|
190 |
}
|
191 |
-
|
192 |
// test whether this is the first tab in the group
|
193 |
if ( $firsttab ) {
|
194 |
-
|
195 |
// Set flag so we know subsequent tabs are not the first in the tab group
|
196 |
$firsttab = FALSE;
|
197 |
-
|
198 |
// Build output if we are making the first tab
|
199 |
return '<div class="responsive-tabs">' . "\n" . '<h2 class="tabtitle">' . $addtabicon . $title . '</h2>' . "\n" . '<div class="' . $tabcontentclass . '">' . "\n";
|
200 |
}
|
@@ -206,7 +205,7 @@ if ($GLOBALS["reset_firsttab_flag"] === TRUE) {
|
|
206 |
}
|
207 |
|
208 |
add_shortcode('tabby', 'cc_shortcode_tabby');
|
209 |
-
|
210 |
// ==============================================
|
211 |
// SHORTCODE TO BE USED AFTER FINAL TABBY TAB
|
212 |
// use [tabbyending]
|
@@ -217,9 +216,9 @@ function cc_shortcode_tabbyending( $atts, $content = null ) {
|
|
217 |
wp_enqueue_script('tabby', plugins_url('js/tabby.js', __FILE__), array('jquery'), cc_tabby_plugin_version(), true);
|
218 |
|
219 |
add_action('wp_footer', 'cc_tabbytrigger', 20);
|
220 |
-
|
221 |
$GLOBALS["reset_firsttab_flag"] = TRUE;
|
222 |
-
|
223 |
global $cc_add_tabby_css;
|
224 |
$cc_add_tabby_css = true;
|
225 |
|
4 |
Plugin URI: http://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.2.1
|
8 |
Author URI: http://cubecolour.co.uk
|
9 |
|
10 |
+
Tabby Responsive Tabs WordPress plugin Copyright 2013-2015 Michael Atkins
|
11 |
+
|
12 |
Licenced under the GNU GPL:
|
13 |
+
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
16 |
the Free Software Foundation; either version 2 of the License, or
|
24 |
You should have received a copy of the GNU General Public License
|
25 |
along with this program; if not, write to the Free Software
|
26 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
27 |
+
|
|
|
28 |
Original version of Responsive Tabs jQuery script by Pete Love:
|
29 |
http://www.petelove.co.uk/responsiveTabs/
|
30 |
http://codepen.io/petelove666/pen/zbLna
|
31 |
MIT license: http://blog.codepen.io/legal/licensing/
|
32 |
|
33 |
+
Permission is hereby granted, free of charge, to any person
|
34 |
+
obtaining a copy of this software and associated documentation
|
35 |
files (the "Software"), to deal in the Software without restriction,
|
36 |
+
including without limitation the rights to use, copy, modify,
|
37 |
+
merge, publish, distribute, sublicense, and/or sell copies of
|
38 |
+
the Software, and to permit persons to whom the Software is
|
39 |
furnished to do so, subject to the following conditions:
|
40 |
|
41 |
+
The above copyright notice and this permission notice shall
|
42 |
be included in all copies or substantial portions of the Software.
|
43 |
|
44 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
45 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
46 |
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
47 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
48 |
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
49 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
50 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
51 |
DEALINGS IN THE SOFTWARE.
|
52 |
|
53 |
*/
|
73 |
// ==============================================
|
74 |
// Add Links in Plugins Table
|
75 |
// ==============================================
|
76 |
+
|
77 |
add_filter( 'plugin_row_meta', 'cc_tabby_meta_links', 10, 2 );
|
78 |
function cc_tabby_meta_links( $links, $file ) {
|
79 |
|
80 |
$plugin = plugin_basename(__FILE__);
|
81 |
+
|
82 |
// create the links
|
83 |
if ( $file == $plugin ) {
|
84 |
|
88 |
$twitterlink = 'http://twitter.com/cubecolour';
|
89 |
$customiselink = 'http://cubecolour.co.uk/tabby-responsive-tabs-customiser';
|
90 |
$iconstyle = 'style="-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;"';
|
91 |
+
|
92 |
if ( is_plugin_active( 'tabby-responsive-tabs-customiser/tabby-customiser.php' ) ) {
|
93 |
$customiselink = admin_url( 'options-general.php?page=tabby-settings' );
|
94 |
}
|
95 |
+
|
96 |
return array_merge( $links, array(
|
97 |
'<a href="' . $supportlink . '"> <span class="dashicons dashicons-lightbulb" ' . $iconstyle . 'title="Tabby Responsive Tabs Support"></span></a>',
|
98 |
'<a href="' . $twitterlink . '"><span class="dashicons dashicons-twitter" ' . $iconstyle . 'title="Cubecolour on Twitter"></span></a>',
|
101 |
'<a href="' . $customiselink . '"><span class="dashicons dashicons-admin-appearance" ' . $iconstyle . 'title="Tabby Responsive Tabs Customizer"></span></a>'
|
102 |
) );
|
103 |
}
|
104 |
+
|
105 |
return $links;
|
106 |
}
|
107 |
|
121 |
// ==============================================
|
122 |
|
123 |
function cc_tabby_css() {
|
124 |
+
wp_enqueue_style('tabby.css', plugin_dir_url(__FILE__).'css/tabby.css' , false, cc_tabby_plugin_version() );
|
125 |
}
|
126 |
|
127 |
add_action('wp_print_styles', 'cc_tabby_css', 30);
|
136 |
|
137 |
if ($tabbytriggered == FALSE) {
|
138 |
echo "\n" . "<script>jQuery(document).ready(function($) { RESPONSIVEUI.responsiveTabs(); })</script>" . "\n";
|
139 |
+
|
140 |
$tabbytriggered = TRUE;
|
141 |
}
|
142 |
}
|
166 |
), $atts, 'tabbytab'));
|
167 |
|
168 |
$tabtarget = sanitize_title_with_dashes( $title );
|
169 |
+
|
170 |
//initialise urltarget
|
171 |
$urltarget = '';
|
172 |
+
|
173 |
//grab the value of the 'target' url parameter if there is one
|
174 |
if ( isset ( $_REQUEST['target'] ) ) {
|
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 |
|
183 |
}
|
184 |
|
185 |
$addtabicon = '';
|
186 |
+
|
187 |
if ( $icon ) {
|
188 |
$addtabicon = '<span class="fa fa-' . $icon . '"></span>';
|
189 |
}
|
190 |
+
|
191 |
// test whether this is the first tab in the group
|
192 |
if ( $firsttab ) {
|
193 |
+
|
194 |
// Set flag so we know subsequent tabs are not the first in the tab group
|
195 |
$firsttab = FALSE;
|
196 |
+
|
197 |
// Build output if we are making the first tab
|
198 |
return '<div class="responsive-tabs">' . "\n" . '<h2 class="tabtitle">' . $addtabicon . $title . '</h2>' . "\n" . '<div class="' . $tabcontentclass . '">' . "\n";
|
199 |
}
|
205 |
}
|
206 |
|
207 |
add_shortcode('tabby', 'cc_shortcode_tabby');
|
208 |
+
|
209 |
// ==============================================
|
210 |
// SHORTCODE TO BE USED AFTER FINAL TABBY TAB
|
211 |
// use [tabbyending]
|
216 |
wp_enqueue_script('tabby', plugins_url('js/tabby.js', __FILE__), array('jquery'), cc_tabby_plugin_version(), true);
|
217 |
|
218 |
add_action('wp_footer', 'cc_tabbytrigger', 20);
|
219 |
+
|
220 |
$GLOBALS["reset_firsttab_flag"] = TRUE;
|
221 |
+
|
222 |
global $cc_add_tabby_css;
|
223 |
$cc_add_tabby_css = true;
|
224 |
|