Accordion - Version 2.1.2

Version Description

  • 10/10/2018 - fix - Icon not saved issue fixed.
Download this release

Release Info

Developer pickplugins
Plugin Icon 128x128 Accordion
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.1.0 to 2.1.2

accordions.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accordions
4
  Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
5
  Description: Fully responsive and mobile ready accordion grid for wordpress.
6
- Version: 2.1.0
7
  WC requires at least: 3.0.0
8
  WC tested up to: 3.4
9
  Author: PickPlugins
3
  Plugin Name: Accordions
4
  Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
5
  Description: Fully responsive and mobile ready accordion grid for wordpress.
6
+ Version: 2.1.2
7
  WC requires at least: 3.0.0
8
  WC tested up to: 3.4
9
  Author: PickPlugins
assets/admin/js/scripts.js CHANGED
@@ -41,29 +41,6 @@ jQuery(document).ready(function($)
41
  })
42
 
43
 
44
- $(document).on('change', '#accordions_metabox #accordions_header_bg_opacity_hndl', function()
45
- {
46
-
47
- var val = $(this).val();
48
-
49
- $('#accordions_header_bg_opacity').val(val);
50
-
51
-
52
-
53
- })
54
-
55
-
56
-
57
- $(document).on('change', '#accordions_metabox #accordions_items_content_bg_opacity_hndl', function()
58
- {
59
-
60
- var val = $(this).val();
61
-
62
- $('#accordions_items_content_bg_opacity').val(val);
63
-
64
-
65
-
66
- })
67
 
68
  $(document).on('click', '#accordions_metabox .expand-collapse', function() {
69
 
41
  })
42
 
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  $(document).on('click', '#accordions_metabox .expand-collapse', function() {
46
 
assets/admin/js/scripts.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){a(document).on("click",".accordions-import-json",function(){json_file=a(".json_file").val();if(json_file){a.ajax({type:"POST",context:this,url:accordions_ajax.accordions_ajaxurl,data:{action:"accordions_ajax_import_json",json_file:json_file},success:function(b){var c=JSON.parse(b);json_file=c.json_file;a(this).html("Import done");a(".json_file").val("")}})}else{alert("Please put file url")}});a(document).on("change","#accordions_metabox #accordions_header_bg_opacity_hndl",function(){var b=a(this).val();a("#accordions_header_bg_opacity").val(b)});a(document).on("change","#accordions_metabox #accordions_items_content_bg_opacity_hndl",function(){var b=a(this).val();a("#accordions_items_content_bg_opacity").val(b)});a(document).on("click","#accordions_metabox .expand-collapse",function(){if(a(this).attr("expand")){a(this).removeAttr("expand");a(this).text("Expand all");a("#accordions-content .items").removeClass("active");a(this).attr("collapse","yes")}else{a(this).removeAttr("collapse");a(this).text("Collapse all");a(this).attr("expand","yes");a("#accordions-content .items").addClass("active")}});a(document).on("click","#accordions_metabox .reset-active",function(){a('input[name="accordions_active_accordion"]').prop("checked",false)});a(document).on("keyup","#accordions_metabox .section-panel .accordions_content_title",function(){var b=a(this).val();if(b==""){a(this).parent().parent().children(".section-header").children(".accordions-title-preview").html("start typing")}else{a(this).parent().parent().children(".section-header").children(".accordions-title-preview").html(b)}});a(document).on("click","#accordions_metabox .section-header .expand-compress",function(){if(a(this).parent().parent().hasClass("active")){a(this).parent().parent().removeClass("active")}else{a(this).parent().parent().addClass("active")}});a(document).on("keyup",".accordions_icons_custom_plus_input",function(){icon_id=a(this).val();a(".accordions_icons_custom_plus i").removeAttr("class");a(".accordions_icons_custom_plus i").addClass("fa "+icon_id);console.log(icon_id)});a(document).on("keyup",".accordions_icons_custom_minus_input",function(){icon_id=a(this).val();a(".accordions_icons_custom_minus i").removeAttr("class");a(".accordions_icons_custom_minus i").addClass("fa "+icon_id);console.log(icon_id)});a(document).on("click","#accordions_metabox .removeaccordions",function(){var b=a(this).attr("confirm");if(b=="yes"){a(this).parent().parent().remove()}else{a(this).html(L10n_accordions.confirm_text);a(this).attr("confirm","yes")}})});
1
+ jQuery(document).ready(function(a){a(document).on("click",".accordions-import-json",function(){json_file=a(".json_file").val();if(json_file){a.ajax({type:"POST",context:this,url:accordions_ajax.accordions_ajaxurl,data:{action:"accordions_ajax_import_json",json_file:json_file},success:function(b){var c=JSON.parse(b);json_file=c.json_file;a(this).html("Import done");a(".json_file").val("")}})}else{alert("Please put file url")}});a(document).on("click","#accordions_metabox .expand-collapse",function(){if(a(this).attr("expand")){a(this).removeAttr("expand");a(this).text("Expand all");a("#accordions-content .items").removeClass("active");a(this).attr("collapse","yes")}else{a(this).removeAttr("collapse");a(this).text("Collapse all");a(this).attr("expand","yes");a("#accordions-content .items").addClass("active")}});a(document).on("click","#accordions_metabox .reset-active",function(){a('input[name="accordions_active_accordion"]').prop("checked",false)});a(document).on("keyup","#accordions_metabox .section-panel .accordions_content_title",function(){var b=a(this).val();if(b==""){a(this).parent().parent().children(".section-header").children(".accordions-title-preview").html("start typing")}else{a(this).parent().parent().children(".section-header").children(".accordions-title-preview").html(b)}});a(document).on("click","#accordions_metabox .section-header .expand-compress",function(){if(a(this).parent().parent().hasClass("active")){a(this).parent().parent().removeClass("active")}else{a(this).parent().parent().addClass("active")}});a(document).on("keyup",".accordions_icons_custom_plus_input",function(){icon_id=a(this).val();a(".accordions_icons_custom_plus i").removeAttr("class");a(".accordions_icons_custom_plus i").addClass("fa "+icon_id);console.log(icon_id)});a(document).on("keyup",".accordions_icons_custom_minus_input",function(){icon_id=a(this).val();a(".accordions_icons_custom_minus i").removeAttr("class");a(".accordions_icons_custom_minus i").addClass("fa "+icon_id);console.log(icon_id)});a(document).on("click","#accordions_metabox .removeaccordions",function(){var b=a(this).attr("confirm");if(b=="yes"){a(this).parent().parent().remove()}else{a(this).html(L10n_accordions.confirm_text);a(this).attr("confirm","yes")}})});
includes/functions.php CHANGED
@@ -9,35 +9,6 @@ if ( ! defined('ABSPATH')) exit; // if direct access
9
 
10
 
11
 
12
-
13
-
14
- function accordions_ajax_track_header(){
15
-
16
-
17
- $post_id = isset($_POST['post_id']) ? $_POST['post_id'] : '';
18
- $header_id = isset($_POST['header_id']) ? $_POST['header_id'] : '';
19
-
20
-
21
- $track_header = get_post_meta($post_id, 'track_header', true);
22
-
23
- if(empty($track_header)):
24
-
25
- $track_header[$header_id] = 1;
26
- update_post_meta($post_id, 'track_header', $track_header);
27
- else:
28
- $track_header[$header_id] += 1;
29
- update_post_meta($post_id, 'track_header', $track_header);
30
- endif;
31
-
32
- die();
33
- }
34
- add_action('wp_ajax_accordions_ajax_track_header', 'accordions_ajax_track_header');
35
- add_action('wp_ajax_nopriv_accordions_ajax_track_header', 'accordions_ajax_track_header');
36
-
37
-
38
-
39
-
40
-
41
  function accordions_ajax_import_json(){
42
 
43
  $response = array();
9
 
10
 
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  function accordions_ajax_import_json(){
13
 
14
  $response = array();
includes/settings-tabs.php CHANGED
@@ -129,7 +129,7 @@ class settings_tabs_field{
129
  $details = isset( $option['details'] ) ? $option['details'] : "";
130
 
131
 
132
- $option_value = empty($option_value) ? $default_value : $value;
133
 
134
 
135
  ?>
129
  $details = isset( $option['details'] ) ? $option['details'] : "";
130
 
131
 
132
+ $option_value = empty($value) ? $default_value : $value;
133
 
134
 
135
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@
4
  Tags: accordion, accordions, Responsive accordions, accordions plugin, jQuery accordions, accordions short-code, accordions Widget, accordions plugin wordpress, accordions plugin jquery, tabs, jquery tabs, tab, responsive tabs
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
- Stable tag: 2.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -92,6 +92,12 @@ then paste this shortcode anywhere in your page to display accordions<br />
92
 
93
  == Changelog ==
94
 
 
 
 
 
 
 
95
  = 2.1.0 =
96
  * 08/10/2018 - update - font-awesome 5 added.
97
  * 08/10/2018 - update - admin settings updated.
4
  Tags: accordion, accordions, Responsive accordions, accordions plugin, jQuery accordions, accordions short-code, accordions Widget, accordions plugin wordpress, accordions plugin jquery, tabs, jquery tabs, tab, responsive tabs
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
92
 
93
  == Changelog ==
94
 
95
+ = 2.1.2 =
96
+ * 10/10/2018 - fix - Icon not saved issue fixed.
97
+
98
+ = 2.1.1 =
99
+ * 10/10/2018 - fix - Minor js issue fixed.
100
+
101
  = 2.1.0 =
102
  * 08/10/2018 - update - font-awesome 5 added.
103
  * 08/10/2018 - update - admin settings updated.
templates/accordion/scripts.php CHANGED
@@ -41,9 +41,6 @@ else{
41
 
42
  ?>
43
  <script>
44
- accordions_header_toggle = "<?php echo $accordions_header_toggle;?>";
45
- accordions_click_track = "<?php echo $accordions_click_track;?>";
46
-
47
  jQuery(document).ready(function($){
48
  wizard_accordion = $("#accordions-<?php echo $post_id; ?>.accordions .items").accordion({
49
  event: "<?php echo $accordions_active_event;?>",
@@ -52,7 +49,6 @@ else{
52
  animate: ("<?php echo $accordions_animate_style; ?>", <?php echo $accordions_animate_delay; ?>),
53
  navigation: true,
54
  active: <?php echo $accordions_active_accordion; ?>,
55
-
56
  <?php
57
  if($accordions_expaned_other == 'yes'){
58
  ?>
@@ -69,94 +65,14 @@ else{
69
  currHeader.children(".ui-icon").toggleClass("ui-icon-triangle-1-e",isPanelSelected).toggleClass("ui-icon-triangle-1-s",!isPanelSelected);
70
  currContent.toggleClass("accordion-content-active",!isPanelSelected)
71
  if (isPanelSelected) { currContent.slideUp(); } else { currContent.slideDown(); }
72
-
73
  return false;
74
  },
75
  <?php
76
  }
77
 
78
- if($accordions_click_scroll_top == 'yes'){
79
- ?>
80
- activate: function( event, ui ) {
81
- if(!$.isEmptyObject(ui.newHeader.offset())) {
82
- $("html:not(:animated), body:not(:animated)").animate({ scrollTop: ui.newHeader.offset().top + <?php echo $accordions_click_scroll_top_offset;?> }, "slow");
83
- }
84
- },
85
- <?php
86
- }
87
  ?>
88
- changestart: function(event, ui) {
89
- child.accordion("activate", false);
90
- }
91
- });
92
-
93
- var child = $(".child-accordion .items").accordion({
94
- active:<?php echo $accordions_active_child_accordion; ?>,
95
- <?php if($accordions_expaned_other == 'yes'){ ?>
96
- beforeActivate: function(event, ui) {
97
- // The accordion believes a panel is being opened
98
- if (ui.newHeader[0]) {
99
- var currHeader = ui.newHeader;
100
- var currContent = currHeader.next(".ui-accordion-content");
101
- // The accordion believes a panel is being closed
102
- } else {
103
- var currHeader = ui.oldHeader;
104
- var currContent = currHeader.next(".ui-accordion-content");
105
- }
106
- // Since weve changed the default behavior, this detects the actual status
107
- var isPanelSelected = currHeader.attr("aria-selected") == "true";
108
- // Toggle the panels header
109
- currHeader.toggleClass("ui-corner-all",isPanelSelected).toggleClass("accordion-header-active ui-state-active ui-corner-top",!isPanelSelected).attr("aria-selected",((!isPanelSelected).toString()));
110
- // Toggle the panels icon
111
- currHeader.children(".ui-icon").toggleClass("ui-icon-triangle-1-e",isPanelSelected).toggleClass("ui-icon-triangle-1-s",!isPanelSelected);
112
- // Toggle the panels content
113
- currContent.toggleClass("accordion-content-active",!isPanelSelected)
114
- if (isPanelSelected) { currContent.slideUp(); } else { currContent.slideDown(); }
115
-
116
- return false; // Cancels the default action
117
- },
118
- <?php
119
- }
120
-
121
- if($accordions_click_scroll_top == 'yes'){ ?>
122
- activate: function( event, ui ) {
123
- if(!$.isEmptyObject(ui.newHeader.offset())) {
124
- $("html:not(:animated), body:not(:animated)").animate({ scrollTop: ui.newHeader.offset().top + <?php echo $accordions_click_scroll_top_offset; ?> }, "slow");
125
- }
126
- },
127
- <?php
128
- }
129
- ?>
130
- heightStyle: "content",
131
- collapsible: true,
132
- animated: "swing",
133
- });
134
-
135
- $(".previous, .next").click(function () {
136
-
137
- var index = 0;
138
- console.log("gCurrentIndex:"+gCurrentIndex);
139
- console.log("index:"+index);
140
-
141
- if ($(this).hasClass("next")) {
142
- index = gCurrentIndex + 1;
143
- if (index > ACCORDION_PANEL_COUNT ) {
144
- index = ACCORDION_PANEL_COUNT;
145
- }
146
- }
147
- else {
148
- index = gCurrentIndex - 1;
149
- if (index < 0) {
150
- index = 0;
151
- }
152
- }
153
-
154
- wizard_accordion.accordion("option", "active", index);
155
-
156
-
157
- });
158
- })
159
- </script>
160
  <?php
161
  }
162
 
41
 
42
  ?>
43
  <script>
 
 
 
44
  jQuery(document).ready(function($){
45
  wizard_accordion = $("#accordions-<?php echo $post_id; ?>.accordions .items").accordion({
46
  event: "<?php echo $accordions_active_event;?>",
49
  animate: ("<?php echo $accordions_animate_style; ?>", <?php echo $accordions_animate_delay; ?>),
50
  navigation: true,
51
  active: <?php echo $accordions_active_accordion; ?>,
 
52
  <?php
53
  if($accordions_expaned_other == 'yes'){
54
  ?>
65
  currHeader.children(".ui-icon").toggleClass("ui-icon-triangle-1-e",isPanelSelected).toggleClass("ui-icon-triangle-1-s",!isPanelSelected);
66
  currContent.toggleClass("accordion-content-active",!isPanelSelected)
67
  if (isPanelSelected) { currContent.slideUp(); } else { currContent.slideDown(); }
 
68
  return false;
69
  },
70
  <?php
71
  }
72
 
 
 
 
 
 
 
 
 
 
73
  ?>
74
+ });
75
+ })</script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  <?php
77
  }
78