Version Description
- Now compatible up to WordPress 4.8
- FIXED: aria-mutliselectable is now on the accordion group instead of each accordion item title
Download this release
Release Info
Developer | philbuchanan |
Plugin | Accordion Shortcodes |
Version | 2.3.3 |
Comparing to | |
See all releases |
Code changes from version 2.3.2 to 2.3.3
- accordion-shortcodes.php +4 -4
- accordion.min.js +1 -1
- readme.txt +19 -10
accordion-shortcodes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Accordion Shortcodes
|
4 |
* Description: Shortcodes for creating responsive accordion drop-downs.
|
5 |
-
* Version: 2.3.
|
6 |
* Author: Phil Buchanan
|
7 |
* Author URI: http://philbuchanan.com
|
8 |
*/
|
@@ -17,7 +17,7 @@ class Accordion_Shortcodes {
|
|
17 |
/**
|
18 |
* Current plugin version number
|
19 |
*/
|
20 |
-
private $plugin_version = '2.3.
|
21 |
|
22 |
|
23 |
|
@@ -265,7 +265,7 @@ class Accordion_Shortcodes {
|
|
265 |
// Add this shortcodes settings instance to the global script data array
|
266 |
$this->script_data[] = $script_data;
|
267 |
|
268 |
-
return sprintf('<%2$s id="%3$s" class="accordion no-js%4$s" role="tablist">%1$s</%2$s>',
|
269 |
do_shortcode($content),
|
270 |
$this->wrapper_tag,
|
271 |
"accordion-$this->group_count",
|
@@ -292,7 +292,7 @@ class Accordion_Shortcodes {
|
|
292 |
|
293 |
$ids = $this->get_accordion_id($id);
|
294 |
|
295 |
-
$accordion_title = sprintf('<%1$s id="%3$s" class="accordion-title%5$s" role="tab" aria-controls="%4$s" aria-selected="false" aria-expanded="false"
|
296 |
$tag ? $this->check_html_tag($tag) : $this->title_tag,
|
297 |
$title ? $title : '<span style="color:red;">' . __('Please enter a title attribute', 'accordion_shortcodes') . '</span>',
|
298 |
$ids['title'],
|
2 |
/**
|
3 |
* Plugin Name: Accordion Shortcodes
|
4 |
* Description: Shortcodes for creating responsive accordion drop-downs.
|
5 |
+
* Version: 2.3.3
|
6 |
* Author: Phil Buchanan
|
7 |
* Author URI: http://philbuchanan.com
|
8 |
*/
|
17 |
/**
|
18 |
* Current plugin version number
|
19 |
*/
|
20 |
+
private $plugin_version = '2.3.3';
|
21 |
|
22 |
|
23 |
|
265 |
// Add this shortcodes settings instance to the global script data array
|
266 |
$this->script_data[] = $script_data;
|
267 |
|
268 |
+
return sprintf('<%2$s id="%3$s" class="accordion no-js%4$s" role="tablist" aria-multiselectable="true">%1$s</%2$s>',
|
269 |
do_shortcode($content),
|
270 |
$this->wrapper_tag,
|
271 |
"accordion-$this->group_count",
|
292 |
|
293 |
$ids = $this->get_accordion_id($id);
|
294 |
|
295 |
+
$accordion_title = sprintf('<%1$s id="%3$s" class="accordion-title%5$s" role="tab" aria-controls="%4$s" aria-selected="false" aria-expanded="false" tabindex="0" %6$s>%2$s</%1$s>',
|
296 |
$tag ? $this->check_html_tag($tag) : $this->title_tag,
|
297 |
$title ? $title : '<span style="color:red;">' . __('Please enter a title attribute', 'accordion_shortcodes') . '</span>',
|
298 |
$ids['title'],
|
accordion.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){"use strict";var o;t.fn.accordionShortcodes=function(o){function e(){return t(this).hasClass("open")?h.clickToClose&&n(t(this)):(h.autoClose&&a.each(function(){n(t(this))}),i(t(this),!0)),!1}function i(o,e){o.next().clearQueue().stop().slideDown(l,function(){e&&h.scroll&&t("html, body").animate({scrollTop:t(this).prev().offset().top-h.scrollOffset},l)}),o.addClass("open read").attr({"aria-selected":"true","aria-expanded":"true"}).next().attr({"aria-hidden":"false"})}function n(t){t.next().slideUp(l),t.removeClass("open"),t.attr({"aria-selected":"false","aria-expanded":"false"}).next().attr({"aria-hidden":"true"})}var a=this.children(".accordion-title"),s=this.children(".accordion-content").hide(),c=a.first(),r=(s.first(),t(window.location.hash)),l=250,h=t.extend({autoClose:!0,openFirst:!1,openAll:!1,clickToClose:!1,scroll:!1},o);return t(".accordion").removeClass("no-js"),h.scrollOffset=0|Math.floor(parseInt(h.scroll)),r.length&&r.hasClass("accordion-title")?i(r,!0):h.openAll?a.each(function(){i(t(this),!1)}):h.openFirst&&i(c,!1),t('[data-initialstate!=""]').each(function(){switch(t(this).data("initialstate")){case"open":i(t(this),!1);break;case"closed":t(this).attr("id")!==r.attr("id")&&n(t(this))}}),a.click(e),a.keydown(function(o){var e=o.which;(13===e||32===e)&&t(this).click()}),t(window).on("hashchange",function(){r=t(window.location.hash),r.length&&r.hasClass("accordion-title")&&(h.autoClose&&a.each(function(){n(t(this))}),i(r,!0))}),this},t(window).load
|
1 |
+
!function(t){"use strict";var o;t.fn.accordionShortcodes=function(o){function e(){return t(this).hasClass("open")?h.clickToClose&&n(t(this)):(h.autoClose&&a.each(function(){n(t(this))}),i(t(this),!0)),!1}function i(o,e){o.next().clearQueue().stop().slideDown(l,function(){e&&h.scroll&&t("html, body").animate({scrollTop:t(this).prev().offset().top-h.scrollOffset},l)}),o.addClass("open read").attr({"aria-selected":"true","aria-expanded":"true"}).next().attr({"aria-hidden":"false"})}function n(t){t.next().slideUp(l),t.removeClass("open"),t.attr({"aria-selected":"false","aria-expanded":"false"}).next().attr({"aria-hidden":"true"})}var a=this.children(".accordion-title"),s=this.children(".accordion-content").hide(),c=a.first(),r=(s.first(),t(window.location.hash)),l=250,h=t.extend({autoClose:!0,openFirst:!1,openAll:!1,clickToClose:!1,scroll:!1},o);return t(".accordion").removeClass("no-js"),h.scrollOffset=0|Math.floor(parseInt(h.scroll)),r.length&&r.hasClass("accordion-title")?i(r,!0):h.openAll?a.each(function(){i(t(this),!1)}):h.openFirst&&i(c,!1),t('[data-initialstate!=""]').each(function(){switch(t(this).data("initialstate")){case"open":i(t(this),!1);break;case"closed":t(this).attr("id")!==r.attr("id")&&n(t(this))}}),a.click(e),a.keydown(function(o){var e=o.which;(13===e||32===e)&&t(this).click()}),t(window).on("hashchange",function(){r=t(window.location.hash),r.length&&r.hasClass("accordion-title")&&(h.autoClose&&a.each(function(){n(t(this))}),i(r,!0))}),this},t(window).on("load",function(){for(var e=0;e<accordionShortcodesSettings.length;e+=1)o=accordionShortcodesSettings[e],t("#"+o.id).accordionShortcodes(o)})}(jQuery);
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Author URI: http://philbuchanan.com/
|
|
4 |
Donate Link: http://philbuchanan.com/
|
5 |
Tags: accordion, accordions, shortcodes, responsive accordions, accordions plugin, jquery accordions, accordions short-code, accordions plugin wordpress, accordions plugin jquery
|
6 |
Requires at least: 3.3
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag: 2.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -15,7 +15,7 @@ Shortcodes for creating responsive accordion drop-downs.
|
|
15 |
|
16 |
Accordion Shortcodes is a simple plugin that adds a few shortcodes for adding accordion drop-downs to your pages.
|
17 |
|
18 |
-
The accordions should blend seamlessly with your theme. However, you may want to
|
19 |
|
20 |
= Features =
|
21 |
|
@@ -68,15 +68,10 @@ This will output the following HTML:
|
|
68 |
</div>
|
69 |
</div>
|
70 |
|
71 |
-
= Advanced Settings =
|
72 |
-
|
73 |
-
There are a few [advances settings](http://wordpress.org/plugins/accordion-shortcodes/other_notes/) for the plugin.
|
74 |
-
|
75 |
== Installation ==
|
76 |
1. Upload the 'accordion-shortcodes' folder to the '/wp-content/plugins/' directory.
|
77 |
2. Activate the plugin through the Plugins menu in WordPress.
|
78 |
3. Add the shortcodes to your content.
|
79 |
-
4. Add some [CSS](http://wordpress.org/plugins/accordion-shortcodes/other_notes/#Other-Notes) to your theme's stylesheet to make the accordion look the way you want.
|
80 |
|
81 |
== Frequently Asked Questions ==
|
82 |
|
@@ -88,7 +83,17 @@ This is most likely caused by a poorly coded theme. This plugin makes use of the
|
|
88 |
|
89 |
No CSS is added by default to the accordion. The accordion should look fine with every theme.
|
90 |
|
91 |
-
That said, you can change the looking of the accordion as long as you are comfortable with editing your theme's stylesheet. If you are familiar with that process, you can add some
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
= Can I use other shortcodes inside each accordion item? =
|
94 |
|
@@ -239,6 +244,10 @@ For bug reports or feature requests or if you'd like to contribute to the plugin
|
|
239 |
3. The Accordion Item shortcode insertion dialog box
|
240 |
|
241 |
== Changelog ==
|
|
|
|
|
|
|
|
|
242 |
= 2.3.2 =
|
243 |
* Now compatible up to WordPress 4.7
|
244 |
* FIXED: Accordion titles now truly accessible via keyboard control
|
@@ -333,4 +342,4 @@ This update brings the much request support for multiple accordions on a single
|
|
333 |
WordPress 4.0 compatibility.
|
334 |
|
335 |
= 2.0 =
|
336 |
-
Big changes for version 2.0!
|
4 |
Donate Link: http://philbuchanan.com/
|
5 |
Tags: accordion, accordions, shortcodes, responsive accordions, accordions plugin, jquery accordions, accordions short-code, accordions plugin wordpress, accordions plugin jquery
|
6 |
Requires at least: 3.3
|
7 |
+
Tested up to: 4.8
|
8 |
+
Stable tag: 2.3.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
15 |
|
16 |
Accordion Shortcodes is a simple plugin that adds a few shortcodes for adding accordion drop-downs to your pages.
|
17 |
|
18 |
+
The accordions should blend seamlessly with your theme. However, you may want to edit your theme's main stylesheet in order to add some custom styling (see below for sample CSS).
|
19 |
|
20 |
= Features =
|
21 |
|
68 |
</div>
|
69 |
</div>
|
70 |
|
|
|
|
|
|
|
|
|
71 |
== Installation ==
|
72 |
1. Upload the 'accordion-shortcodes' folder to the '/wp-content/plugins/' directory.
|
73 |
2. Activate the plugin through the Plugins menu in WordPress.
|
74 |
3. Add the shortcodes to your content.
|
|
|
75 |
|
76 |
== Frequently Asked Questions ==
|
77 |
|
83 |
|
84 |
No CSS is added by default to the accordion. The accordion should look fine with every theme.
|
85 |
|
86 |
+
That said, you can change the looking of the accordion as long as you are comfortable with editing your theme's stylesheet. If you are familiar with that process, you can add some CSS to make the accordion look the way you want.
|
87 |
+
|
88 |
+
= How can I make all accordion content disply when printing the page? =
|
89 |
+
|
90 |
+
Add this CSS to your theme's CSS stylesheet:
|
91 |
+
|
92 |
+
`@media print {
|
93 |
+
.accordion-content {
|
94 |
+
display: block !important;
|
95 |
+
}
|
96 |
+
}`
|
97 |
|
98 |
= Can I use other shortcodes inside each accordion item? =
|
99 |
|
244 |
3. The Accordion Item shortcode insertion dialog box
|
245 |
|
246 |
== Changelog ==
|
247 |
+
= 2.3.3 =
|
248 |
+
* Now compatible up to WordPress 4.8
|
249 |
+
* FIXED: aria-mutliselectable is now on the accordion group instead of each accordion item title
|
250 |
+
|
251 |
= 2.3.2 =
|
252 |
* Now compatible up to WordPress 4.7
|
253 |
* FIXED: Accordion titles now truly accessible via keyboard control
|
342 |
WordPress 4.0 compatibility.
|
343 |
|
344 |
= 2.0 =
|
345 |
+
Big changes for version 2.0!
|