Accordion Shortcodes - Version 2.4.2

Version Description

  • FIXED: Each accordion group now respects its own settings when using multiple accordions on a single page
Download this release

Release Info

Developer philbuchanan
Plugin Icon 128x128 Accordion Shortcodes
Version 2.4.2
Comparing to
See all releases

Code changes from version 2.4.1 to 2.4.2

Files changed (4) hide show
  1. accordion-shortcodes.php +2 -2
  2. accordion.js +1 -1
  3. accordion.min.js +1 -1
  4. readme.txt +7 -1
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.4.1
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.4.1';
21
 
22
 
23
 
2
  /**
3
  * Plugin Name: Accordion Shortcodes
4
  * Description: Shortcodes for creating responsive accordion drop-downs.
5
+ * Version: 2.4.2
6
  * Author: Phil Buchanan
7
  * Author URI: http://philbuchanan.com
8
  */
17
  /**
18
  * Current plugin version number
19
  */
20
+ private $plugin_version = '2.4.2';
21
 
22
 
23
 
accordion.js CHANGED
@@ -13,7 +13,7 @@
13
  $.fn.accordionShortcodes = function(options) {
14
 
15
  var items = [];
16
- var allControllers = $('.js-accordion-controller');
17
  var selectedId = window.location.hash;
18
  var duration = 250;
19
  var settings = $.extend({
13
  $.fn.accordionShortcodes = function(options) {
14
 
15
  var items = [];
16
+ var allControllers = $('#' + options.id + ' .js-accordion-controller');
17
  var selectedId = window.location.hash;
18
  var duration = 250;
19
  var settings = $.extend({
accordion.min.js CHANGED
@@ -1 +1 @@
1
- !function(d){"use strict";var t;d.fn.accordionShortcodes=function(o){var r=[],t=d(".js-accordion-controller"),s=window.location.hash,n=250,a=d.extend({autoClose:!0,openFirst:!1,openAll:!1,clickToClose:!1,scroll:!1,usebuttons:!1},o);function i(o,t){o.content.clearQueue().stop().slideDown(n,function(){t&&a.scroll&&d("html, body").animate({scrollTop:o.controller.offset().top-a.scrollOffset},n)}),o.controller.addClass("open read"),o.controller.attr("aria-expanded","true"),o.content.attr("aria-hidden","false"),o.isOpen=!0}function l(o){o.content.slideUp(n),o.controller.removeClass("open"),o.controller.attr("aria-expanded","false"),o.content.attr("aria-hidden","true"),o.isOpen=!1}return d(".accordion").removeClass("no-js"),a.scrollOffset=0|Math.floor(parseInt(a.scroll)),t.each(function(o){var t=!1;switch(0==o&&a.openFirst&&(t=!0),a.openAll&&(t=!0),d(this).data("initialstate")){case"open":t=!0;break;case"closed":t=!1}s.length&&s=="#"+d(this).attr("id")&&(t=!0);var n,e,c=(n=d(this),e=t,{id:n.attr("id"),controller:n,controls:n.attr("aria-controls"),content:d("#"+n.attr("aria-controls")),isOpen:e||!1});r.push(c),d(this).click(function(o){var t;(t=c).isOpen?a.clickToClose&&l(t):(a.autoClose&&d.each(r,function(o,t){l(t)}),i(t,!0))}),d(this).keyup(function(o){var t=o.which;a.usebuttons||13!==t&&32!==t||d(this).click(),27===t&&a.clickToClose&&l(c)}),c.isOpen?i(c):l(c)}),d(window).on("hashchange",function(){(s=d(window.location.hash)).length&&s.hasClass("js-accordion-controller")&&s.click()}),this},d(window).on("load",function(){for(var o=0;o<accordionShortcodesSettings.length;o+=1)t=accordionShortcodesSettings[o],d("#"+t.id).accordionShortcodes(t)})}(jQuery);
1
+ !function(d){"use strict";var t;d.fn.accordionShortcodes=function(o){var r=[],t=d("#"+o.id+" .js-accordion-controller"),s=window.location.hash,n=250,a=d.extend({autoClose:!0,openFirst:!1,openAll:!1,clickToClose:!1,scroll:!1,usebuttons:!1},o);function i(o,t){o.content.clearQueue().stop().slideDown(n,function(){t&&a.scroll&&d("html, body").animate({scrollTop:o.controller.offset().top-a.scrollOffset},n)}),o.controller.addClass("open read"),o.controller.attr("aria-expanded","true"),o.content.attr("aria-hidden","false"),o.isOpen=!0}function l(o){o.content.slideUp(n),o.controller.removeClass("open"),o.controller.attr("aria-expanded","false"),o.content.attr("aria-hidden","true"),o.isOpen=!1}return d(".accordion").removeClass("no-js"),a.scrollOffset=0|Math.floor(parseInt(a.scroll)),t.each(function(o){var t=!1;switch(0==o&&a.openFirst&&(t=!0),a.openAll&&(t=!0),d(this).data("initialstate")){case"open":t=!0;break;case"closed":t=!1}s.length&&s=="#"+d(this).attr("id")&&(t=!0);var n,e,c=(n=d(this),e=t,{id:n.attr("id"),controller:n,controls:n.attr("aria-controls"),content:d("#"+n.attr("aria-controls")),isOpen:e||!1});r.push(c),d(this).click(function(o){var t;(t=c).isOpen?a.clickToClose&&l(t):(a.autoClose&&d.each(r,function(o,t){l(t)}),i(t,!0))}),d(this).keyup(function(o){var t=o.which;a.usebuttons||13!==t&&32!==t||d(this).click(),27===t&&a.clickToClose&&l(c)}),c.isOpen?i(c):l(c)}),d(window).on("hashchange",function(){(s=d(window.location.hash)).length&&s.hasClass("js-accordion-controller")&&s.click()}),this},d(window).on("load",function(){for(var o=0;o<accordionShortcodesSettings.length;o+=1)t=accordionShortcodesSettings[o],d("#"+t.id).accordionShortcodes(t)})}(jQuery);
readme.txt CHANGED
@@ -5,7 +5,7 @@ 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: 5.1
8
- Stable tag: 2.4.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -265,6 +265,9 @@ For bug reports or feature requests or if you'd like to contribute to the plugin
265
  3. The Accordion Item shortcode insertion dialog box
266
 
267
  == Changelog ==
 
 
 
268
  = 2.4.1 =
269
  * FIXED: Accordions now open onkeyup instead of onkeydown to better comply with WCAG 2.1 accessibility guidelines
270
 
@@ -334,6 +337,9 @@ FIXED: A bug where setting both scroll and openfirst would scroll the window wit
334
  * FIXED: A few incredibly small bugs/annoyances
335
 
336
  == Upgrade Notice ==
 
 
 
337
  = 2.4.1 =
338
  Accordions now open onkeyup instead of onkeydown to better comply with WCAG 2.1 accessibility guidelines.
339
 
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: 5.1
8
+ Stable tag: 2.4.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
265
  3. The Accordion Item shortcode insertion dialog box
266
 
267
  == Changelog ==
268
+ = 2.4.2 =
269
+ * FIXED: Each accordion group now respects its own settings when using multiple accordions on a single page
270
+
271
  = 2.4.1 =
272
  * FIXED: Accordions now open onkeyup instead of onkeydown to better comply with WCAG 2.1 accessibility guidelines
273
 
337
  * FIXED: A few incredibly small bugs/annoyances
338
 
339
  == Upgrade Notice ==
340
+ = 2.4.2 =
341
+ Fixed an issue where only the last accordion group's settings were used for all accordion groups when using multiple accordions to a single page.
342
+
343
  = 2.4.1 =
344
  Accordions now open onkeyup instead of onkeydown to better comply with WCAG 2.1 accessibility guidelines.
345