Accordion FAQ - Version 1.1

Version Description

  • All Data are sanitized
  • (New) Add expand/collapse hide settings on page load
  • (New) Add accordion styles option
Download this release

Release Info

Developer wpshopmart
Plugin Icon 128x128 Accordion FAQ
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

front/ac-content.php CHANGED
@@ -2,188 +2,161 @@
2
 
3
  $ac_post_type = "responsive_accordion";
4
 
5
- $AllAccordion = array( 'p' => $Id['id'], 'post_type' => $ac_post_type, 'orderby' => 'ASC');
6
  $loop = new WP_Query( $AllAccordion );
7
 
8
  while ( $loop->have_posts() ) : $loop->the_post();
9
  //get the post id
10
  $post_id = get_the_ID();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  $accordion_data = unserialize(get_post_meta( get_the_ID(), 'wpsm_accordion_data', true));
12
  $TotalCount = get_post_meta( get_the_ID(), 'wpsm_accordion_count', true );
13
  if($TotalCount>0)
14
  {
15
  ?>
16
  <?php if($acc_sec_title == 'yes' ) { ?>
17
- <h3 style="margin-bottom:20px;display:block;width:100%;margin-top:10px"><?php echo get_the_title( $post_id ); ?> </h3>
18
  <?php } ?>
19
  <style>
20
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-heading{
21
- padding:0px !important;
22
- }
23
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title {
24
- margin:0px !important;
25
- text-transform:none !important;
26
- line-height: 1 !important;
27
- }
28
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title a{
29
- text-decoration:none;
30
- overflow:hidden;
31
- display:block;
32
- padding:0px;
33
- font-size: <?php echo $title_size; ?>px !important;
34
- font-family: <?php echo $font_family; ?> !important;
35
- border-bottom:0px !important;
36
-
37
- }
38
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title a:hover, #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title a:focus {
39
- color:<?php echo $acc_title_icon_clr; ?> !important;
40
- }
41
- #wpsm_accordion_<?php echo $post_id; ?> .acc-a{
42
- color: <?php echo $acc_title_icon_clr; ?> !important;
43
- background-color:<?php echo $acc_title_bg_clr; ?> !important;
44
- border-color: #ddd;
45
- }
46
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-default > .wpsm_panel-heading{
47
- color: <?php echo $acc_title_icon_clr; ?> !important;
48
- background-color: <?php echo $acc_title_bg_clr; ?> !important;
49
- border-color: <?php echo $acc_title_bg_clr; ?> !important;
50
- border-top-left-radius: 0px;
51
- border-top-right-radius: 0px;
52
- }
53
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-default {
54
- <?php if($acc_margin == 'yes' ) { ?>
55
-
56
- border:1px solid transparent !important;
57
-
58
- <?php } else { ?>
59
- border:0px solid transparent !important;
60
- <?php } ?>
61
- }
62
- #wpsm_accordion_<?php echo $post_id; ?> {
63
- margin-bottom: 20px;
64
- overflow: hidden;
65
- float: left;
66
- width: 100%;
67
- display: block;
68
- }
69
- #wpsm_accordion_<?php echo $post_id; ?> .ac_title_class{
70
- display: block;
71
- padding-top: 12px;
72
- padding-bottom: 12px;
73
- padding-left: 15px;
74
- padding-right: 15px;
75
- }
76
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel {
77
- overflow:hidden;
78
- -webkit-box-shadow: 0 0px 0px rgba(0, 0, 0, .05);
79
- box-shadow: 0 0px 0px rgba(0, 0, 0, .05);
80
- <?php if($acc_radius == 'yes' ) { ?>
81
- border-radius: 4px;
82
- <?php }
83
- else {
84
- ?>
85
- border-radius: 0px;
86
- <?php
87
- }
88
- ?>
89
- }
90
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel + .wpsm_panel {
91
- <?php if($acc_margin == 'yes' ) { ?>
92
- margin-top: 5px;
93
- <?php }
94
- else {
95
- ?>
96
- margin-top: 0px;
97
- <?php
98
  }
99
- ?>
100
- }
101
- #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-body{
102
- background-color:<?php echo $acc_desc_bg_clr; ?> !important;
103
- color:<?php echo $acc_desc_font_clr; ?> !important;
104
- border-top-color: <?php echo $acc_title_bg_clr; ?> !important;
105
- font-size:<?php echo $des_size; ?>px !important;
106
- font-family: <?php echo $font_family; ?> !important;
107
- overflow: hidden;
108
- <?php if($enable_ac_border=="yes")
109
- { ?>
110
- border: 2px solid <?php echo $acc_title_bg_clr; ?> !important;
111
- <?php }
112
- else {
113
- ?>
114
- border: 2px solid transparent !important;
115
- <?php } ?>
116
- }
117
-
118
- <?php echo $custom_css; ?>
119
-
120
  </style>
121
  <div class="wpsm_panel-group" id="wpsm_accordion_<?php echo $post_id; ?>" >
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
- <?php
124
- $i=1;
125
- foreach($accordion_data as $accordion_single_data)
126
- {
127
- $accordion_title = $accordion_single_data['accordion_title'];
128
- $accordion_title_icon = $accordion_single_data['accordion_title_icon'];
129
- $enable_single_icon = $accordion_single_data['enable_single_icon'];
130
- $accordion_desc = $accordion_single_data['accordion_desc'];
131
- $i;
132
- ?>
133
-
134
- <!-- Inner panel Start -->
135
- <div class="wpsm_panel wpsm_panel-default">
136
- <div class="wpsm_panel-heading" role="tab" >
137
- <h4 class="wpsm_panel-title">
138
- <a class="<?php if($i!=1){ echo "collapsed"; } ?>" data-toggle="collapse" data-parent="<?php if($enable_toggle=="no") { ?>#wpsm_accordion_<?php echo $post_id; ?> <?php } ?>" href="#ac_<?php echo $post_id; ?>_collapse<?php echo $i; ?>" >
139
- <?php if($op_cl_icon == 'yes' )
140
- { ?>
141
- <span style="
142
- background-color:<?php echo $acc_title_bg_clr; ?>;
143
- color: <?php echo $acc_title_icon_clr; ?>;
144
- float:<?php echo $acc_op_cl_align; ?>;
145
- padding-top: 12px;
146
- padding-bottom: 12px;
147
- line-height: 1.1;
148
- padding-left: 15px;
149
- padding-right: 15px;
150
- display: inline-block;" class="fa fa-<?php if($i==1){ echo "minus"; } else { echo "plus"; } ?>"></span>
151
-
152
- <?php
153
- } ?>
154
- <span class="ac_title_class">
155
- <?php if($acc_title_icon == 'yes' )
156
- {
157
- if($enable_single_icon=="yes")
158
- {
159
- ?>
160
- <span style="margin-right:6px;" class="fa <?php echo $accordion_title_icon; ?>"></span>
161
  <?php
 
 
 
 
 
 
 
 
 
 
162
  }
163
- }
164
- if($accordion_title == '' ) { echo "no title"; } else { echo $accordion_title; } ?>
165
- </span>
166
- </a>
167
- </h4>
168
- </div>
169
- <div id="ac_<?php echo $post_id; ?>_collapse<?php echo $i; ?>" class="wpsm_panel-collapse collapse <?php if($i==1){ echo "in"; } ?>" >
170
- <div class="wpsm_panel-body">
171
- <?php echo do_shortcode($accordion_desc); ?>
172
- </div>
173
  </div>
174
- </div>
175
- <!-- Inner panel End -->
176
-
177
- <?php
178
- $i++;
179
- }
180
- ?>
181
  </div>
182
  <?php
183
  }
184
  else{
185
  echo "<h3> No Accordion Found </h3>";
186
  }
187
- endwhile; ?>
188
-
189
-
2
 
3
  $ac_post_type = "responsive_accordion";
4
 
5
+ $AllAccordion = array( 'p' => $WPSM_AC_ID, 'post_type' => $ac_post_type, 'orderby' => 'ASC');
6
  $loop = new WP_Query( $AllAccordion );
7
 
8
  while ( $loop->have_posts() ) : $loop->the_post();
9
  //get the post id
10
  $post_id = get_the_ID();
11
+
12
+ $Accordion_Settings = unserialize(get_post_meta( $post_id, 'Accordion_Settings', true));
13
+ if(count($Accordion_Settings))
14
+ {
15
+ $option_names = array(
16
+ "acc_sec_title" => "yes",
17
+ "op_cl_icon" => "yes",
18
+ "acc_title_icon" => "yes",
19
+ "acc_radius" => "yes",
20
+ "acc_margin" => "yes",
21
+ "enable_toggle" => "no",
22
+ "enable_ac_border" => "yes",
23
+ "acc_op_cl_align" => "right",
24
+ "acc_title_bg_clr" => "#e8e8e8",
25
+ "acc_title_icon_clr" => "#000000",
26
+ "acc_desc_bg_clr" => "#ffffff",
27
+ "acc_desc_font_clr" => "#000000",
28
+ "title_size" => "18",
29
+ "des_size" => "16",
30
+ "font_family" => "Open Sans",
31
+ "expand_option" =>1,
32
+ "ac_styles" =>1,
33
+ );
34
+
35
+ foreach($option_names as $option_name => $default_value) {
36
+ if(isset($Accordion_Settings[$option_name]))
37
+ ${"" . $option_name} = $Accordion_Settings[$option_name];
38
+ else
39
+ ${"" . $option_name} = $default_value;
40
+ }
41
+ }
42
+
43
  $accordion_data = unserialize(get_post_meta( get_the_ID(), 'wpsm_accordion_data', true));
44
  $TotalCount = get_post_meta( get_the_ID(), 'wpsm_accordion_count', true );
45
  if($TotalCount>0)
46
  {
47
  ?>
48
  <?php if($acc_sec_title == 'yes' ) { ?>
49
+ <h3 style="margin-bottom:20px;display:block;width:100%;margin-top:10px"><?php echo get_the_title( $post_id ); ?> </h3>
50
  <?php } ?>
51
  <style>
52
+ <?php
53
+ switch($ac_styles){
54
+ case "1":
55
+ ?>
56
+
57
+ <?php
58
+ break;
59
+ case "2":
60
+ ?>
61
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-heading {
62
+ background-image: url(<?php echo wpshopmart_accordion_directory_url.'img/style-soft.png'; ?>);
63
+ background-position: 0 0;
64
+ background-repeat: repeat-x;
65
+ }
66
+ #wpsm_accordion_<?php echo $post_id; ?> .ac_open_cl_icon{
67
+ background-image: url(<?php echo wpshopmart_accordion_directory_url.'img/style-soft.png'; ?>);
68
+ background-position: 0 0;
69
+ background-repeat: repeat-x;
70
+ }
71
+ <?php
72
+ break;
73
+ case "3":
74
+ ?>
75
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-heading {
76
+ background-image: url(<?php echo wpshopmart_accordion_directory_url.'img/style-noise.png'; ?>);
77
+ background-position: 0 0;
78
+ background-repeat: repeat-x;
79
+ }
80
+ #wpsm_accordion_<?php echo $post_id; ?> .ac_open_cl_icon{
81
+ background-image: url(<?php echo wpshopmart_accordion_directory_url.'img/style-noise.png'; ?>);
82
+ background-position: 0 0;
83
+ background-repeat: repeat-x;
84
+ }
85
+ <?php
86
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
+ ?>
89
+
90
+
91
+ <?php require('style.php'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  </style>
93
  <div class="wpsm_panel-group" id="wpsm_accordion_<?php echo $post_id; ?>" >
94
+ <?php
95
+ $i=1;
96
+ foreach($accordion_data as $accordion_single_data)
97
+ {
98
+ $accordion_title = $accordion_single_data['accordion_title'];
99
+ $accordion_title_icon = $accordion_single_data['accordion_title_icon'];
100
+ $enable_single_icon = $accordion_single_data['enable_single_icon'];
101
+ $accordion_desc = $accordion_single_data['accordion_desc'];
102
+ $i;
103
+
104
+ switch($expand_option){
105
+ case "1":
106
+ $j=1;
107
+ break;
108
+ case "2":
109
+ $j=$i;
110
+ break;
111
+ case "3":
112
+ $j=0;
113
+ break;
114
+ }
115
+
116
+ ?>
117
 
118
+ <!-- Inner panel Start -->
119
+ <div class="wpsm_panel wpsm_panel-default">
120
+ <div class="wpsm_panel-heading" role="tab" >
121
+ <h4 class="wpsm_panel-title">
122
+ <a class="<?php if($i!=1){ echo "collapsed"; } ?>" data-toggle="collapse" data-parent="<?php if($enable_toggle=="no") { ?>#wpsm_accordion_<?php echo $post_id; ?> <?php } ?>" href="#ac_<?php echo $post_id; ?>_collapse<?php echo $i; ?>" >
123
+ <?php if($op_cl_icon == 'yes' )
124
+ { ?>
125
+ <span class="ac_open_cl_icon fa fa-<?php if($i==$j){ echo "minus"; } else { echo "plus"; } ?>"></span>
126
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  <?php
128
+ } ?>
129
+ <span class="ac_title_class">
130
+ <?php if($acc_title_icon == 'yes' )
131
+ {
132
+ if($enable_single_icon=="yes")
133
+ {
134
+ ?>
135
+ <span style="margin-right:6px;" class="fa <?php echo $accordion_title_icon; ?>"></span>
136
+ <?php
137
+ }
138
  }
139
+ if($accordion_title == '' ) { echo "no title"; } else { echo esc_attr($accordion_title); } ?>
140
+ </span>
141
+ </a>
142
+ </h4>
143
+ </div>
144
+ <div id="ac_<?php echo $post_id; ?>_collapse<?php echo $i; ?>" class="wpsm_panel-collapse collapse <?php if($i==$j){ echo "in"; } ?>" >
145
+ <div class="wpsm_panel-body">
146
+ <?php echo do_shortcode($accordion_desc); ?>
147
+ </div>
148
+ </div>
149
  </div>
150
+ <!-- Inner panel End -->
151
+
152
+ <?php
153
+ $i++;
154
+ }
155
+ ?>
 
156
  </div>
157
  <?php
158
  }
159
  else{
160
  echo "<h3> No Accordion Found </h3>";
161
  }
162
+ endwhile; ?>
 
 
front/shortcode.php CHANGED
@@ -2,49 +2,13 @@
2
  add_shortcode( 'WPSM_AC', 'AccordionShortCode' );
3
  function AccordionShortCode( $Id ) {
4
  ob_start();
5
-
6
  if(!isset($Id['id']))
7
  {
8
- $acc_sec_title = "yes";
9
- $op_cl_icon = "yes";
10
- $acc_title_icon = "yes";
11
- $acc_radius = "yes";
12
- $acc_margin = "yes";
13
- $enable_toggle = "no";
14
- $enable_ac_border = "yes";
15
- $acc_op_cl_align = "right";
16
- $acc_title_bg_clr = "#f5f5f5";
17
- $acc_title_icon_clr = "#000000";
18
- $acc_desc_bg_clr = "#ffffff";
19
- $acc_desc_font_clr = "#000000";
20
- $title_size = "18";
21
- $des_size = "16";
22
- $font_family = "sans-serif";
23
- }
24
  else
25
  {
26
  $WPSM_AC_ID = $Id['id'];
27
- $Accordion_Settings = unserialize(get_post_meta( $WPSM_AC_ID, 'Accordion_Settings', true));
28
- if(count($Accordion_Settings))
29
- {
30
- $acc_sec_title = $Accordion_Settings['acc_sec_title'];
31
- $op_cl_icon = $Accordion_Settings['op_cl_icon'];
32
- $acc_title_icon = $Accordion_Settings['acc_title_icon'];
33
- $acc_radius = $Accordion_Settings['acc_radius'];
34
- $acc_margin = $Accordion_Settings['acc_margin'];
35
- $acc_op_cl_align = $Accordion_Settings['acc_op_cl_align'];
36
- $enable_toggle = $Accordion_Settings['enable_toggle'];
37
- $enable_ac_border = $Accordion_Settings['enable_ac_border'];
38
- $acc_title_bg_clr = $Accordion_Settings['acc_title_bg_clr'];
39
- $acc_title_icon_clr = $Accordion_Settings['acc_title_icon_clr'];
40
- $acc_desc_bg_clr = $Accordion_Settings['acc_desc_bg_clr'];
41
- $acc_desc_font_clr = $Accordion_Settings['acc_desc_font_clr'];
42
- $title_size = $Accordion_Settings['title_size'];
43
- $des_size = $Accordion_Settings['des_size'];
44
- $font_family = $Accordion_Settings['font_family'];
45
- $custom_css = $Accordion_Settings['custom_css'];
46
-
47
- }
48
  }
49
  require("ac-content.php");
50
  wp_reset_query();
2
  add_shortcode( 'WPSM_AC', 'AccordionShortCode' );
3
  function AccordionShortCode( $Id ) {
4
  ob_start();
 
5
  if(!isset($Id['id']))
6
  {
7
+ $WPSM_AC_ID = "";
8
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  else
10
  {
11
  $WPSM_AC_ID = $Id['id'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
13
  require("ac-content.php");
14
  wp_reset_query();
front/style.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-heading{
2
+ padding:0px !important;
3
+ }
4
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title {
5
+ margin:0px !important;
6
+ text-transform:none !important;
7
+ line-height: 1 !important;
8
+ }
9
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title a{
10
+ text-decoration:none;
11
+ overflow:hidden;
12
+ display:block;
13
+ padding:0px;
14
+ font-size: <?php echo $title_size; ?>px !important;
15
+ font-family: <?php echo $font_family; ?> !important;
16
+ border-bottom:0px !important;
17
+ }
18
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title a:hover, #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-title a:focus {
19
+ color:<?php echo $acc_title_icon_clr; ?> !important;
20
+ }
21
+ #wpsm_accordion_<?php echo $post_id; ?> .acc-a{
22
+ color: <?php echo $acc_title_icon_clr; ?> !important;
23
+ background-color:<?php echo $acc_title_bg_clr; ?> !important;
24
+ border-color: #ddd;
25
+ }
26
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-default > .wpsm_panel-heading{
27
+ color: <?php echo $acc_title_icon_clr; ?> !important;
28
+ background-color: <?php echo $acc_title_bg_clr; ?> !important;
29
+ border-color: <?php echo $acc_title_bg_clr; ?> !important;
30
+ border-top-left-radius: 0px;
31
+ border-top-right-radius: 0px;
32
+ }
33
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-default {
34
+ <?php if($acc_margin == 'yes' ) { ?>
35
+ border:1px solid transparent !important;
36
+ <?php } else { ?>
37
+ border:0px solid transparent !important;
38
+ <?php } ?>
39
+ }
40
+ #wpsm_accordion_<?php echo $post_id; ?> {
41
+ margin-bottom: 20px;
42
+ overflow: hidden;
43
+ float: left;
44
+ width: 100%;
45
+ display: block;
46
+ }
47
+ #wpsm_accordion_<?php echo $post_id; ?> .ac_title_class{
48
+ display: block;
49
+ padding-top: 12px;
50
+ padding-bottom: 12px;
51
+ padding-left: 15px;
52
+ padding-right: 15px;
53
+ }
54
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel {
55
+ overflow:hidden;
56
+ -webkit-box-shadow: 0 0px 0px rgba(0, 0, 0, .05);
57
+ box-shadow: 0 0px 0px rgba(0, 0, 0, .05);
58
+ <?php if($acc_radius == 'yes' ) { ?>
59
+ border-radius: 4px;
60
+ <?php }
61
+ else {
62
+ ?>
63
+ border-radius: 0px;
64
+ <?php
65
+ }
66
+ ?>
67
+ }
68
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel + .wpsm_panel {
69
+ <?php if($acc_margin == 'yes' ) { ?>
70
+ margin-top: 5px;
71
+ <?php }
72
+ else {
73
+ ?>
74
+ margin-top: 0px;
75
+ <?php
76
+ }
77
+ ?>
78
+ }
79
+ #wpsm_accordion_<?php echo $post_id; ?> .wpsm_panel-body{
80
+ background-color:<?php echo $acc_desc_bg_clr; ?> !important;
81
+ color:<?php echo $acc_desc_font_clr; ?> !important;
82
+ border-top-color: <?php echo $acc_title_bg_clr; ?> !important;
83
+ font-size:<?php echo $des_size; ?>px !important;
84
+ font-family: <?php echo $font_family; ?> !important;
85
+ overflow: hidden;
86
+ <?php if($enable_ac_border=="yes")
87
+ { ?>
88
+ border: 2px solid <?php echo $acc_title_bg_clr; ?> !important;
89
+ <?php }
90
+ else {
91
+ ?>
92
+ border: 2px solid transparent !important;
93
+ <?php } ?>
94
+ }
95
+
96
+ #wpsm_accordion_<?php echo $post_id; ?> .ac_open_cl_icon{
97
+ background-color:<?php echo $acc_title_bg_clr; ?> !important;
98
+ color: <?php echo $acc_title_icon_clr; ?> !important;
99
+ float:<?php echo $acc_op_cl_align; ?> !important;
100
+ padding-top: 12px !important;
101
+ padding-bottom: 12px !important;
102
+ line-height: 1.0 !important;
103
+ padding-left: 15px !important;
104
+ padding-right: 15px !important;
105
+ display: inline-block !important;
106
+ }
107
+ <?php echo $custom_css; ?>
img/style-noise.png ADDED
Binary file
img/style-soft.png ADDED
Binary file
lib/admin/add-acc.php CHANGED
@@ -19,9 +19,9 @@
19
  ?>
20
  <li class="wpsm_ac-panel single_acc_box" >
21
  <span class="ac_label"><?php _e('Accordion Title',wpshopmart_accordion_text_domain); ?></span>
22
- <input type="text" id="accordion_title[]" name="accordion_title[]" value="<?php echo $accordion_title; ?>" placeholder="Enter Accordion Title Here" class="wpsm_ac_label_text">
23
  <span class="ac_label"><?php _e('Accordion Description',wpshopmart_accordion_text_domain); ?></span>
24
- <textarea id="accordion_desc[]" name="accordion_desc[]" placeholder="Enter Accordion Description Here" class="wpsm_ac_label_text"><?php echo $accordion_desc; ?></textarea>
25
 
26
  <span class="ac_label"><?php _e('Accordion Icon',wpshopmart_accordion_text_domain); ?></span>
27
  <div class="form-group input-group">
@@ -86,4 +86,19 @@
86
  <span style="display:block"><?php _e('Delete All',wpshopmart_accordion_text_domain); ?></span>
87
  </a>
88
  <div style="clear:left;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  <?php require('add-ac-js-footer.php'); ?>
19
  ?>
20
  <li class="wpsm_ac-panel single_acc_box" >
21
  <span class="ac_label"><?php _e('Accordion Title',wpshopmart_accordion_text_domain); ?></span>
22
+ <input type="text" id="accordion_title[]" name="accordion_title[]" value="<?php echo esc_attr($accordion_title); ?>" placeholder="Enter Accordion Title Here" class="wpsm_ac_label_text">
23
  <span class="ac_label"><?php _e('Accordion Description',wpshopmart_accordion_text_domain); ?></span>
24
+ <textarea id="accordion_desc[]" name="accordion_desc[]" placeholder="Enter Accordion Description Here" class="wpsm_ac_label_text"><?php echo esc_html($accordion_desc); ?></textarea>
25
 
26
  <span class="ac_label"><?php _e('Accordion Icon',wpshopmart_accordion_text_domain); ?></span>
27
  <div class="form-group input-group">
86
  <span style="display:block"><?php _e('Delete All',wpshopmart_accordion_text_domain); ?></span>
87
  </a>
88
  <div style="clear:left;"></div>
89
+ <h1>Get Support Help Here</h1>
90
+ <h3>If You have any issue then please ask us any time</h3>
91
+ <a href="https://wordpress.org/support/plugin/responsive-accordion-and-collapse" target="_blank" class="button button-primary button-hero ">Get Support</a>
92
+ <br> <br>
93
+
94
+ <h1>Rate Us </h1>
95
+ <h3>Show us some love, If you like our product then please give us some valuable feedback on wordpress</h3>
96
+ <a href="https://wordpress.org/plugins/responsive-accordion-and-collapse/" target="_blank" class="button button-primary button-hero ">RATE HERE</a>
97
+ <a class="wpsm-rate-us" style=" text-decoration: none; height: 40px; width: 40px;" href="https://wordpress.org/plugins/responsive-accordion-and-collapse/" target="_blank">
98
+ <span class="dashicons dashicons-star-filled"></span>
99
+ <span class="dashicons dashicons-star-filled"></span>
100
+ <span class="dashicons dashicons-star-filled"></span>
101
+ <span class="dashicons dashicons-star-filled"></span>
102
+ <span class="dashicons dashicons-star-filled"></span>
103
+ </a>
104
  <?php require('add-ac-js-footer.php'); ?>
lib/admin/data-post/ac-save-data.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(isset($PostID) && isset($_POST['ac_save_data_action']) ) {
3
+ $TotalCount = count($_POST['accordion_title']);
4
+ $AccordionArray = array();
5
+ if($TotalCount) {
6
+ for($i=0; $i < $TotalCount; $i++) {
7
+ $accordion_title = stripslashes(sanitize_text_field($_POST['accordion_title'][$i]));
8
+ $accordion_title_icon = sanitize_text_field($_POST['accordion_title_icon'][$i]);
9
+ $enable_single_icon = sanitize_text_field($_POST['enable_single_icon'][$i]);
10
+ $accordion_desc = stripslashes(wp_kses_post($_POST['accordion_desc'][$i]));
11
+
12
+ $AccordionArray[] = array(
13
+ 'accordion_title' => $accordion_title,
14
+ 'accordion_title_icon' => $accordion_title_icon,
15
+ 'enable_single_icon' => $enable_single_icon,
16
+ 'accordion_desc' => $accordion_desc,
17
+ );
18
+ }
19
+ update_post_meta($PostID, 'wpsm_accordion_data', serialize($AccordionArray));
20
+ update_post_meta($PostID, 'wpsm_accordion_count', $TotalCount);
21
+ } else {
22
+ $TotalCount = -1;
23
+ update_post_meta($PostID, 'wpsm_accordion_count', $TotalCount);
24
+ $AccordionArray = array();
25
+ update_post_meta($PostID, 'wpsm_accordion_data', serialize($AccordionArray));
26
+ }
27
+ }
28
+ ?>
lib/admin/data-post/ac-settings-save-data.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(isset($PostID) && isset($_POST['accordion_setting_save_action'])) {
3
+ $acc_sec_title = sanitize_option('acc_sec_title', $_POST['acc_sec_title']);
4
+ $op_cl_icon = sanitize_option('op_cl_icon', $_POST['op_cl_icon']);
5
+ $acc_title_icon = sanitize_option('acc_title_icon', $_POST['acc_title_icon']);
6
+ $acc_radius = sanitize_option('acc_radius', $_POST['acc_radius']);
7
+ $acc_margin = sanitize_option('acc_margin', $_POST['acc_margin']);
8
+ $acc_op_cl_align = sanitize_option('acc_op_cl_align', $_POST['acc_op_cl_align']);
9
+ $enable_toggle = sanitize_option('enable_toggle', $_POST['enable_toggle']);
10
+ $enable_ac_border = sanitize_option('enable_ac_border',$_POST['enable_ac_border']);
11
+ $expand_option = sanitize_option('expand_option',$_POST['expand_option']);
12
+ $ac_styles = sanitize_option('ac_styles',$_POST['ac_styles']);
13
+ $acc_title_bg_clr = sanitize_text_field($_POST['acc_title_bg_clr']);
14
+ $acc_title_icon_clr = sanitize_text_field($_POST['acc_title_icon_clr']);
15
+ $acc_desc_bg_clr = sanitize_text_field($_POST['acc_desc_bg_clr']);
16
+ $acc_desc_font_clr = sanitize_text_field($_POST['acc_desc_font_clr']);
17
+ $title_size = sanitize_text_field($_POST['title_size']);
18
+ $des_size = sanitize_text_field($_POST['des_size']);
19
+ $font_family = sanitize_text_field($_POST['font_family']);
20
+ $custom_css = stripslashes(sanitize_text_field($_POST['custom_css']));
21
+
22
+ $Accordion_Settings_Array = serialize( array(
23
+ 'acc_sec_title' => $acc_sec_title,
24
+ 'op_cl_icon' => $op_cl_icon,
25
+ 'acc_title_icon' => $acc_title_icon,
26
+ 'acc_radius' => $acc_radius,
27
+ 'acc_margin' => $acc_margin,
28
+ 'acc_op_cl_align' => $acc_op_cl_align,
29
+ 'enable_toggle' => $enable_toggle,
30
+ 'enable_ac_border' => $enable_ac_border,
31
+ 'expand_option' => $expand_option,
32
+ 'ac_styles' => $ac_styles,
33
+ 'acc_title_bg_clr' => $acc_title_bg_clr,
34
+ 'acc_title_icon_clr' => $acc_title_icon_clr,
35
+ 'acc_desc_bg_clr' => $acc_desc_bg_clr,
36
+ 'acc_desc_font_clr' => $acc_desc_font_clr,
37
+ 'title_size' => $title_size,
38
+ 'des_size' => $des_size,
39
+ 'font_family' => $font_family,
40
+ 'custom_css' => $custom_css,
41
+ ) );
42
+
43
+ update_post_meta($PostID, 'Accordion_Settings', $Accordion_Settings_Array);
44
+ }
45
+ ?>
lib/admin/menu.php CHANGED
@@ -18,8 +18,6 @@ class wpsm_accordion {
18
  add_action('admin_init', array(&$this, 'wpsm_accordion_meta_boxes_group'), 1);
19
  add_action('save_post', array(&$this, 'add_accordion_meta_box_save'), 9, 1);
20
  add_action('save_post', array(&$this, 'accordion_settings_meta_box_save'), 9, 1);
21
-
22
-
23
  }
24
  }
25
  // admin scripts
@@ -30,7 +28,7 @@ class wpsm_accordion {
30
  //color-picker css n js
31
  wp_enqueue_style( 'wp-color-picker' );
32
  wp_enqueue_script( 'wpsm_ac-color-pic', wpshopmart_accordion_directory_url.'js/color-picker.js', array( 'wp-color-picker' ), false, true );
33
- wp_enqueue_style('wpsm_ac-panel-style', wpshopmart_accordion_directory_url.'css/panel-style.css');
34
 
35
  //font awesome css
36
  wp_enqueue_style('wpsm_ac-font-awesome', wpshopmart_accordion_directory_url.'css/font-awesome/css/font-awesome.min.css');
@@ -45,11 +43,11 @@ class wpsm_accordion {
45
  //tooltip
46
  wp_enqueue_style('wpsm_ac_tooltip', wpshopmart_accordion_directory_url.'tooltip/darktooltip.css');
47
  wp_enqueue_script( 'wpsm_ac-tooltip-js', wpshopmart_accordion_directory_url.'tooltip/jquery.darktooltip.js');
 
48
  // settings
49
  wp_enqueue_style('wpsm_ac_settings-css', wpshopmart_accordion_directory_url.'css/settings.css');
50
 
51
-
52
-
53
  wp_enqueue_script('font-icon-picker-js',wpshopmart_accordion_directory_url.'js/fontawesome-iconpicker.js',array('jquery'));
54
  wp_enqueue_script('call-icon-picker-js',wpshopmart_accordion_directory_url.'js/call-icon-picker.js',array('jquery'), false, true);
55
  }
@@ -83,10 +81,9 @@ class wpsm_accordion {
83
  }
84
 
85
  public function wpsm_accordion_meta_boxes_group(){
86
- add_meta_box( __('add_accordion', wpshopmart_accordion_text_domain), __('Add Accordion', wpshopmart_accordion_text_domain), array(&$this, 'wpsm_add_ac_meta_box_function'), 'responsive_accordion', 'normal', 'low' );
87
- add_meta_box ( __('accordion_shortcode', wpshopmart_accordion_text_domain), __('Accordion Shortcode', wpshopmart_accordion_text_domain), array(&$this, 'wpsm_pic_ac_shortcode'), 'responsive_accordion', 'normal', 'low');
88
- add_meta_box( __('accordion_setting', wpshopmart_accordion_text_domain), __('Accordion Settings', wpshopmart_accordion_text_domain), array(&$this, 'wpsm_add_ac_setting_meta_box_function'), 'responsive_accordion', 'side', 'low');
89
-
90
  }
91
 
92
  public function wpsm_add_ac_meta_box_function($post){
@@ -94,37 +91,35 @@ class wpsm_accordion {
94
  }
95
 
96
  public function wpsm_pic_ac_shortcode(){
97
-
98
  ?>
99
  <style>
100
- #accordion_shortcode{
101
- background:#fff!important;
102
- box-shadow: 0 0 20px rgba(0,0,0,.2);
103
- }
104
- #accordion_shortcode .hndle , #accordion_shortcode .handlediv{
105
- display:none;
106
- }
107
- #accordion_shortcode p{
108
- color:#000;
109
- font-size:15px;
110
- }
111
- #accordion_shortcode input {
112
- font-size: 16px;
113
- padding: 8px 10px;
114
- width:100%;
115
- }
116
-
117
- .wpsm-rate-us span.dashicons {
118
- width: 50px;
119
- height: 50px;
120
- font-size:30px;
121
- color : #dd3333 !important;
122
- }
123
- .wpsm-rate-us span.dashicons-star-filled:before {
124
- content: "\f155";
125
- font-size: 40px;
126
- }
127
-
128
  </style>
129
  <h3>Accordion Shortcode</h3>
130
  <p><?php _e("Use below shortcode in any Page/Post to publish your Accordion", wpshopmart_accordion_text_domain);?></p>
@@ -138,105 +133,28 @@ class wpsm_accordion {
138
  else{
139
  $custom_css="";
140
  }
141
-
142
  ?>
143
  <h3>Custom Css</h3>
144
  <textarea name="custom_css" id="custom_css" style="width:100% !important ;height:300px;background:#ECECEC;"><?php echo $custom_css ; ?></textarea>
145
  <p>Enter Css without <strong>&lt;style&gt; &lt;/style&gt; </strong> tag</p>
146
  <br>
147
- <h3>Show us some love, Rate Us If you like our product</h3>
148
- <a class="wpsm-rate-us" style=" text-decoration: none; height: 40px; width: 40px;" href="https://wordpress.org/plugins/responsive-accordion-and-collapse/" target="_blank">
149
- <span class="dashicons dashicons-star-filled"></span>
150
- <span class="dashicons dashicons-star-filled"></span>
151
- <span class="dashicons dashicons-star-filled"></span>
152
- <span class="dashicons dashicons-star-filled"></span>
153
- <span class="dashicons dashicons-star-filled"></span>
154
- </a>
155
  <?php
156
  }
157
 
158
  public function wpsm_add_ac_setting_meta_box_function($post){
159
- require_once('settings.php');
160
  }
161
 
162
  public function add_accordion_meta_box_save($PostID) {
163
- if(isset($PostID) && isset($_POST['ac_save_data_action']) ) {
164
- $TotalCount = count($_POST['accordion_title']);
165
- $AccordionArray = array();
166
- if($TotalCount) {
167
- for($i=0; $i < $TotalCount; $i++) {
168
- $accordion_title = stripslashes($_POST['accordion_title'][$i]);
169
-
170
-
171
- $accordion_title_icon = $_POST['accordion_title_icon'][$i];
172
- $enable_single_icon = $_POST['enable_single_icon'][$i];
173
- $accordion_desc = stripslashes($_POST['accordion_desc'][$i]);
174
-
175
- $AccordionArray[] = array(
176
- 'accordion_title' => $accordion_title,
177
- 'accordion_title_icon' => $accordion_title_icon,
178
- 'enable_single_icon' => $enable_single_icon,
179
- 'accordion_desc' => $accordion_desc,
180
-
181
- );
182
- }
183
- update_post_meta($PostID, 'wpsm_accordion_data', serialize($AccordionArray));
184
- update_post_meta($PostID, 'wpsm_accordion_count', $TotalCount);
185
- } else {
186
- $TotalCount = -1;
187
- update_post_meta($PostID, 'wpsm_accordion_count', $TotalCount);
188
- $AccordionArray = array();
189
- update_post_meta($PostID, 'wpsm_accordion_data', serialize($AccordionArray));
190
- }
191
- }
192
  }
193
 
194
  public function accordion_settings_meta_box_save($PostID){
195
- if(isset($PostID) && isset($_POST['accordion_setting_save_action'])) {
196
- $acc_sec_title = $_POST['acc_sec_title'];
197
- $op_cl_icon = $_POST['op_cl_icon'];
198
- $acc_title_icon = $_POST['acc_title_icon'];
199
- $acc_radius = $_POST['acc_radius'];
200
- $acc_margin = $_POST['acc_margin'];
201
- $acc_op_cl_align = $_POST['acc_op_cl_align'];
202
- $enable_toggle = $_POST['enable_toggle'];
203
- $enable_ac_border = $_POST['enable_ac_border'];
204
- $acc_title_bg_clr = $_POST['acc_title_bg_clr'];
205
- $acc_title_icon_clr = $_POST['acc_title_icon_clr'];
206
- $acc_desc_bg_clr = $_POST['acc_desc_bg_clr'];
207
- $acc_desc_font_clr = $_POST['acc_desc_font_clr'];
208
- $title_size = $_POST['title_size'];
209
- $des_size = $_POST['des_size'];
210
- $font_family = $_POST['font_family'];
211
- $custom_css = stripslashes($_POST['custom_css']);
212
-
213
- $Accordion_Settings_Array = serialize( array(
214
- 'acc_sec_title' => $acc_sec_title,
215
- 'op_cl_icon' => $op_cl_icon,
216
- 'acc_title_icon' => $acc_title_icon,
217
- 'acc_radius' => $acc_radius,
218
- 'acc_margin' => $acc_margin,
219
- 'acc_op_cl_align' => $acc_op_cl_align,
220
- 'enable_toggle' => $enable_toggle,
221
- 'enable_ac_border' => $enable_ac_border,
222
- 'acc_title_bg_clr' => $acc_title_bg_clr,
223
- 'acc_title_icon_clr' => $acc_title_icon_clr,
224
- 'acc_desc_bg_clr' => $acc_desc_bg_clr,
225
- 'acc_desc_font_clr' => $acc_desc_font_clr,
226
- 'title_size' => $title_size,
227
- 'des_size' => $des_size,
228
- 'font_family' => $font_family,
229
- 'custom_css' => $custom_css,
230
- ) );
231
-
232
- update_post_meta($PostID, 'Accordion_Settings', $Accordion_Settings_Array);
233
- }
234
  }
235
-
236
-
237
  }
238
 
239
  global $wpsm_accordion;
240
  $wpsm_accordion = wpsm_accordion::forge();
241
-
242
- ?>
18
  add_action('admin_init', array(&$this, 'wpsm_accordion_meta_boxes_group'), 1);
19
  add_action('save_post', array(&$this, 'add_accordion_meta_box_save'), 9, 1);
20
  add_action('save_post', array(&$this, 'accordion_settings_meta_box_save'), 9, 1);
 
 
21
  }
22
  }
23
  // admin scripts
28
  //color-picker css n js
29
  wp_enqueue_style( 'wp-color-picker' );
30
  wp_enqueue_script( 'wpsm_ac-color-pic', wpshopmart_accordion_directory_url.'js/color-picker.js', array( 'wp-color-picker' ), false, true );
31
+ wp_enqueue_style('wpsm_ac-panel-style', wpshopmart_accordion_directory_url.'css/panel-style.css');
32
 
33
  //font awesome css
34
  wp_enqueue_style('wpsm_ac-font-awesome', wpshopmart_accordion_directory_url.'css/font-awesome/css/font-awesome.min.css');
43
  //tooltip
44
  wp_enqueue_style('wpsm_ac_tooltip', wpshopmart_accordion_directory_url.'tooltip/darktooltip.css');
45
  wp_enqueue_script( 'wpsm_ac-tooltip-js', wpshopmart_accordion_directory_url.'tooltip/jquery.darktooltip.js');
46
+
47
  // settings
48
  wp_enqueue_style('wpsm_ac_settings-css', wpshopmart_accordion_directory_url.'css/settings.css');
49
 
50
+ //icon picker
 
51
  wp_enqueue_script('font-icon-picker-js',wpshopmart_accordion_directory_url.'js/fontawesome-iconpicker.js',array('jquery'));
52
  wp_enqueue_script('call-icon-picker-js',wpshopmart_accordion_directory_url.'js/call-icon-picker.js',array('jquery'), false, true);
53
  }
81
  }
82
 
83
  public function wpsm_accordion_meta_boxes_group(){
84
+ add_meta_box('add_accordion', __('Add Accordion', wpshopmart_accordion_text_domain), array(&$this, 'wpsm_add_ac_meta_box_function'), 'responsive_accordion', 'normal', 'low' );
85
+ add_meta_box ('accordion_shortcode', __('Accordion Shortcode', wpshopmart_accordion_text_domain), array(&$this, 'wpsm_pic_ac_shortcode'), 'responsive_accordion', 'normal', 'low');
86
+ add_meta_box('accordion_setting', __('Accordion Settings', wpshopmart_accordion_text_domain), array(&$this, 'wpsm_add_ac_setting_meta_box_function'), 'responsive_accordion', 'side', 'low');
 
87
  }
88
 
89
  public function wpsm_add_ac_meta_box_function($post){
91
  }
92
 
93
  public function wpsm_pic_ac_shortcode(){
 
94
  ?>
95
  <style>
96
+ #accordion_shortcode{
97
+ background:#fff!important;
98
+ box-shadow: 0 0 20px rgba(0,0,0,.2);
99
+ }
100
+ #accordion_shortcode .hndle , #accordion_shortcode .handlediv{
101
+ display:none;
102
+ }
103
+ #accordion_shortcode p{
104
+ color:#000;
105
+ font-size:15px;
106
+ }
107
+ #accordion_shortcode input {
108
+ font-size: 16px;
109
+ padding: 8px 10px;
110
+ width:100%;
111
+ }
112
+
113
+ .wpsm-rate-us span.dashicons {
114
+ width: 50px;
115
+ height: 50px;
116
+ font-size:30px;
117
+ color : #dd3333 !important;
118
+ }
119
+ .wpsm-rate-us span.dashicons-star-filled:before {
120
+ content: "\f155";
121
+ font-size: 40px;
122
+ }
 
123
  </style>
124
  <h3>Accordion Shortcode</h3>
125
  <p><?php _e("Use below shortcode in any Page/Post to publish your Accordion", wpshopmart_accordion_text_domain);?></p>
133
  else{
134
  $custom_css="";
135
  }
 
136
  ?>
137
  <h3>Custom Css</h3>
138
  <textarea name="custom_css" id="custom_css" style="width:100% !important ;height:300px;background:#ECECEC;"><?php echo $custom_css ; ?></textarea>
139
  <p>Enter Css without <strong>&lt;style&gt; &lt;/style&gt; </strong> tag</p>
140
  <br>
141
+
 
 
 
 
 
 
 
142
  <?php
143
  }
144
 
145
  public function wpsm_add_ac_setting_meta_box_function($post){
146
+ require('settings.php');
147
  }
148
 
149
  public function add_accordion_meta_box_save($PostID) {
150
+ require('data-post/ac-save-data.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  }
152
 
153
  public function accordion_settings_meta_box_save($PostID){
154
+ require('data-post/ac-settings-save-data.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  }
 
 
156
  }
157
 
158
  global $wpsm_accordion;
159
  $wpsm_accordion = wpsm_accordion::forge();
160
+ ?>
 
lib/admin/settings.php CHANGED
@@ -1,45 +1,35 @@
1
  <?php
2
  $PostId = $post->ID;
3
  $Accordion_Settings = unserialize(get_post_meta( $PostId, 'Accordion_Settings', true));
4
- if($Accordion_Settings['acc_sec_title'] && $Accordion_Settings['op_cl_icon'] && $Accordion_Settings['acc_title_bg_clr']) {
5
-
6
- $acc_sec_title = $Accordion_Settings['acc_sec_title'];
7
- $op_cl_icon = $Accordion_Settings['op_cl_icon'];
8
- $acc_title_icon = $Accordion_Settings['acc_title_icon'];
9
- $acc_radius = $Accordion_Settings['acc_radius'];
10
- $acc_margin = $Accordion_Settings['acc_margin'];
11
- $acc_op_cl_align = $Accordion_Settings['acc_op_cl_align'];
12
- $enable_toggle = $Accordion_Settings['enable_toggle'];
13
- $enable_ac_border = $Accordion_Settings['enable_ac_border'];
14
- $acc_title_bg_clr = $Accordion_Settings['acc_title_bg_clr'];
15
- $acc_title_icon_clr = $Accordion_Settings['acc_title_icon_clr'];
16
- $acc_desc_bg_clr = $Accordion_Settings['acc_desc_bg_clr'];
17
- $acc_desc_font_clr = $Accordion_Settings['acc_desc_font_clr'];
18
- $title_size = $Accordion_Settings['title_size'];
19
- $des_size = $Accordion_Settings['des_size'];
20
- $font_family = $Accordion_Settings['font_family'];
21
- }
22
- else{
23
- $acc_sec_title = "yes";
24
- $op_cl_icon = "yes";
25
- $acc_title_icon = "yes";
26
- $acc_radius = "yes";
27
- $acc_margin = "yes";
28
- $enable_toggle = "no";
29
- $enable_ac_border = "yes";
30
- $acc_op_cl_align = "right";
31
- $acc_title_bg_clr = "#e8e8e8";
32
- $acc_title_icon_clr = "#000000";
33
- $acc_desc_bg_clr = "#ffffff";
34
- $acc_desc_font_clr = "#000000";
35
- $title_size = "18";
36
- $des_size = "16";
37
- $font_family = "Open Sans";
38
- }
39
- ?>
40
- <style>
41
 
42
- </style>
43
  <Script>
44
 
45
  //minimum flake size script
@@ -252,6 +242,44 @@ else{
252
  </td>
253
  </tr>
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  <tr >
256
  <th scope="row"><label><?php _e('Accordion Title Background Colour',wpshopmart_accordion_text_domain); ?></label></th>
257
  <td>
1
  <?php
2
  $PostId = $post->ID;
3
  $Accordion_Settings = unserialize(get_post_meta( $PostId, 'Accordion_Settings', true));
4
+
5
+ $option_names = array(
6
+ "acc_sec_title" => "yes",
7
+ "op_cl_icon" => "yes",
8
+ "acc_title_icon" => "yes",
9
+ "acc_radius" => "yes",
10
+ "acc_margin" => "yes",
11
+ "enable_toggle" => "no",
12
+ "enable_ac_border" => "yes",
13
+ "acc_op_cl_align" => "right",
14
+ "acc_title_bg_clr" => "#e8e8e8",
15
+ "acc_title_icon_clr" => "#000000",
16
+ "acc_desc_bg_clr" => "#ffffff",
17
+ "acc_desc_font_clr" => "#000000",
18
+ "title_size" => "18",
19
+ "des_size" => "16",
20
+ "font_family" => "Open Sans",
21
+ "expand_option" =>1,
22
+ "ac_styles" =>1,
23
+ );
24
+
25
+ foreach($option_names as $option_name => $default_value) {
26
+ if(isset($Accordion_Settings[$option_name]))
27
+ ${"" . $option_name} = $Accordion_Settings[$option_name];
28
+ else
29
+ ${"" . $option_name} = $default_value;
30
+ }
31
+ ?>
 
 
 
 
 
 
 
 
 
32
 
 
33
  <Script>
34
 
35
  //minimum flake size script
242
  </td>
243
  </tr>
244
 
245
+ <tr>
246
+ <th scope="row"><label><?php _e('Expand/Collapse Accordion Option On Page Load',wpshopmart_accordion_text_domain); ?></label></th>
247
+ <td>
248
+ <span style="display:block;margin-bottom:10px"><input type="radio" name="expand_option" id="expand_option" value="1" <?php if($expand_option == '1' ) { echo "checked"; } ?> /> First Accordion Open </span>
249
+ <span style="display:block;margin-bottom:10px"><input type="radio" name="expand_option" id="expand_option2" value="2" <?php if($expand_option == '2' ) { echo "checked"; } ?> /> Open All Accordion </span>
250
+ <span style="display:block"><input type="radio" name="expand_option" id="expand_option2" value="3" <?php if($expand_option == '3' ) { echo "checked"; } ?> /> Hide/close All Accordion </span>
251
+ <!-- Tooltip -->
252
+ <a class="ac_tooltip" href="#help" data-tooltip="#expand_option_tp">help</a>
253
+ <div id="expand_option_tp" style="display:none;">
254
+ <div style="color:#fff !important;padding:10px;">
255
+ <h2 style="color:#fff !important;"><?php _e('Expand/Collapse Accordion Option On Page Load',wpshopmart_accordion_text_domain); ?></h2>
256
+ <img src="<?php echo wpshopmart_accordion_directory_url.'tooltip/img/collapase.png'; ?>">
257
+ <br>
258
+ <img src="<?php echo wpshopmart_accordion_directory_url.'tooltip/img/all-close.png'; ?>">
259
+ </div>
260
+ </div>
261
+ </td>
262
+ </tr>
263
+
264
+ <tr>
265
+ <th scope="row"><label><?php _e('Accordion Styles',wpshopmart_accordion_text_domain); ?></label></th>
266
+ <td>
267
+ <span style="display:block;margin-bottom:10px"><input type="radio" name="ac_styles" id="ac_styles" value="1" <?php if($ac_styles == '1' ) { echo "checked"; } ?> /> Simple </span>
268
+ <span style="display:block;margin-bottom:10px"><input type="radio" name="ac_styles" id="ac_styles2" value="2" <?php if($ac_styles == '2' ) { echo "checked"; } ?> /> Soft </span>
269
+ <span style="display:block"><input type="radio" name="ac_styles" id="ac_styles3" value="3" <?php if($ac_styles == '3' ) { echo "checked"; } ?> /> Noise </span>
270
+ <!-- Tooltip -->
271
+ <a class="ac_tooltip" href="#help" data-tooltip="#ac_styles_tp">help</a>
272
+ <div id="ac_styles_tp" style="display:none;">
273
+ <div style="color:#fff !important;padding:10px;">
274
+ <h2 style="color:#fff !important;"><?php _e('Accordion Styles',wpshopmart_accordion_text_domain); ?></h2>
275
+ <img src="<?php echo wpshopmart_accordion_directory_url.'tooltip/img/ac-style.png'; ?>">
276
+ <br>
277
+ <img src="<?php echo wpshopmart_accordion_directory_url.'tooltip/img/ac-style2.png'; ?>">
278
+ </div>
279
+ </div>
280
+ </td>
281
+ </tr>
282
+
283
  <tr >
284
  <th scope="row"><label><?php _e('Accordion Title Background Colour',wpshopmart_accordion_text_domain); ?></label></th>
285
  <td>
lib/installation/installation.php CHANGED
@@ -18,7 +18,7 @@ function wpsm_ac_front_script() {
18
  }
19
  add_action( 'wp_enqueue_scripts', 'wpsm_ac_front_script' );
20
 
21
- add_filter( 'widget_text', 'shortcode_unautop');
22
 
23
  add_action('media_buttons_context', 'wpsm_ac_editor_popup_content_button');
24
  add_action('admin_footer', 'wpsm_ac_editor_popup_content');
@@ -28,18 +28,18 @@ function wpsm_ac_editor_popup_content_button($context) {
28
  $container_id = 'WPSM_AC';
29
  $title = 'Select Accordion to insert into post';
30
  $context .= '<style>.wp_ac_shortcode_button {
31
- background: #F8504B !important;
32
- border-color: #F8504B #F8504B #F8504B !important;
33
- -webkit-box-shadow: 0 1px 0 #F8504B !important;
34
- box-shadow: 0 1px 0 #F8504B !important;
35
- color: #fff;
36
- text-decoration: none;
37
- text-shadow: 0 -1px 1px #F8504B ,1px 0 1px #F8504B,0 1px 1px #F8504B,-1px 0 1px #F8504B !important;
38
- }</style>
39
- <a class="button button-primary wp_ac_shortcode_button thickbox" title="Select Accordion to insert into post" href="#TB_inline?width=400&inlineId='.$container_id.'">
40
- <span class="wp-media-buttons-icon" style="background: url('.$img.'); background-repeat: no-repeat; background-position: left bottom;"></span>
41
- Responsive Accordion Shortcode
42
- </a>';
43
  return $context;
44
  }
45
 
18
  }
19
  add_action( 'wp_enqueue_scripts', 'wpsm_ac_front_script' );
20
 
21
+ add_filter( 'widget_text', 'do_shortcode');
22
 
23
  add_action('media_buttons_context', 'wpsm_ac_editor_popup_content_button');
24
  add_action('admin_footer', 'wpsm_ac_editor_popup_content');
28
  $container_id = 'WPSM_AC';
29
  $title = 'Select Accordion to insert into post';
30
  $context .= '<style>.wp_ac_shortcode_button {
31
+ background: #F8504B !important;
32
+ border-color: #F8504B #F8504B #F8504B !important;
33
+ -webkit-box-shadow: 0 1px 0 #F8504B !important;
34
+ box-shadow: 0 1px 0 #F8504B !important;
35
+ color: #fff;
36
+ text-decoration: none;
37
+ text-shadow: 0 -1px 1px #F8504B ,1px 0 1px #F8504B,0 1px 1px #F8504B,-1px 0 1px #F8504B !important;
38
+ }</style>
39
+ <a class="button button-primary wp_ac_shortcode_button thickbox" title="Select Accordion to insert into post" href="#TB_inline?width=400&inlineId='.$container_id.'">
40
+ <span class="wp-media-buttons-icon" style="background: url('.$img.'); background-repeat: no-repeat; background-position: left bottom;"></span>
41
+ Responsive Accordion Shortcode
42
+ </a>';
43
  return $context;
44
  }
45
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.wpshopmart.com
4
  Tags: Accordion, accordions, accordion plugin, accordion plugin jquery, accordions plugin wordpress, accordions shortcode, accordion shortcode, accordions Widget, accordion Widget, jQuery accordions, Responsive accordion, Responsive accordions, collapsable content, collapse, collapsible, display, expand, expandable, expandable content, hidden, hide, javascript, jquery, toggle, css accordion, css3 , bootstrap, bootstrap accordion, bootstrap collapse, wordpress accordion, widget, shortcode, responsive, plugin, wordpress accordion plugin
5
  Requires at least: 3.3
6
  Tested up to: 4.4.1
7
- Stable tag: 1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,7 +18,7 @@ You can easy sort your accordion position using backend. Responsive Accordion is
18
  ### Features Of Plugin
19
 
20
  * Responsive Design
21
- * Xpert Accordion is responsive and friendly to any mobile devices
22
  * Limitless accordion anywhere in the theme
23
  * Drag and Drop builder Api integrated.
24
  * Draggable accordion items for easy sorting
@@ -28,7 +28,9 @@ You can easy sort your accordion position using backend. Responsive Accordion is
28
  * Bootstrap framework based
29
  * Less for quick customization
30
  * Font Awesome Icon Support
31
- * Font Awesome Icon Picker Integrated
 
 
32
  * Gulp for instant workflow
33
  * Highly customized for User Experience
34
  * Slick Frontend and backend UI
@@ -64,8 +66,15 @@ Please use WordPress support forum to ask any query regarding any issue.
64
  7. Accordion option field setting
65
  8. Accordion setting for design
66
  9. accordion complete setting panel
 
 
67
 
68
  == Changelog ==
69
 
 
 
 
 
 
70
  = 1.0 =
71
  * Initial release.
4
  Tags: Accordion, accordions, accordion plugin, accordion plugin jquery, accordions plugin wordpress, accordions shortcode, accordion shortcode, accordions Widget, accordion Widget, jQuery accordions, Responsive accordion, Responsive accordions, collapsable content, collapse, collapsible, display, expand, expandable, expandable content, hidden, hide, javascript, jquery, toggle, css accordion, css3 , bootstrap, bootstrap accordion, bootstrap collapse, wordpress accordion, widget, shortcode, responsive, plugin, wordpress accordion plugin
5
  Requires at least: 3.3
6
  Tested up to: 4.4.1
7
+ Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
18
  ### Features Of Plugin
19
 
20
  * Responsive Design
21
+ * Accordion is responsive and friendly to any mobile devices
22
  * Limitless accordion anywhere in the theme
23
  * Drag and Drop builder Api integrated.
24
  * Draggable accordion items for easy sorting
28
  * Bootstrap framework based
29
  * Less for quick customization
30
  * Font Awesome Icon Support
31
+ * Font Awesome Icon Picker Integrated
32
+ * Two different styles Integrated
33
+ * Hide All Accordion on page load or display all
34
  * Gulp for instant workflow
35
  * Highly customized for User Experience
36
  * Slick Frontend and backend UI
66
  7. Accordion option field setting
67
  8. Accordion setting for design
68
  9. accordion complete setting panel
69
+ 10. accordion styles 1
70
+ 11. accordion styles 2
71
 
72
  == Changelog ==
73
 
74
+ = 1.1 =
75
+ * All Data are sanitized
76
+ * (New) Add expand/collapse hide settings on page load
77
+ * (New) Add accordion styles option
78
+
79
  = 1.0 =
80
  * Initial release.
responsive-accordion.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Responsive Accordion And Collapse
4
- * Version: 1.0
5
  * Description: Responsive Accordion is the most easiest drag & drop accordion builder for WordPress. You can generate multiple accordion and collapse with multiple colour.
6
  * Author: wpshopmart
7
  * Author URI: http://www.wpshopmart.com
1
  <?php
2
  /**
3
  * Plugin Name: Responsive Accordion And Collapse
4
+ * Version: 1.1
5
  * Description: Responsive Accordion is the most easiest drag & drop accordion builder for WordPress. You can generate multiple accordion and collapse with multiple colour.
6
  * Author: wpshopmart
7
  * Author URI: http://www.wpshopmart.com
tooltip/img/ac-style.png ADDED
Binary file
tooltip/img/ac-style2.png ADDED
Binary file
tooltip/img/all-close.png ADDED
Binary file