Accordion FAQ - Version 1.6.2

Version Description

24-Mar-2016 = * New: Add WYSIWYG Editor for accordion description.

Download this release

Release Info

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

Code changes from version 1.6.1 to 1.6.2

lib/admin/add-ac-js-footer.php CHANGED
@@ -1,10 +1,12 @@
1
  <script>
 
2
  function add_new_accordion(){
3
  var output = '<li class="wpsm_ac-panel single_acc_box" >'+
4
  '<span class="ac_label"><?php _e("Accordion Title",wpshopmart_accordion_text_domain); ?></span>'+
5
  '<input type="text" id="accordion_title[]" name="accordion_title[]" value="" placeholder="Enter Accordion Title Here" class="wpsm_ac_label_text">'+
6
  '<span class="ac_label"l><?php _e("Accordion Description",wpshopmart_accordion_text_domain); ?></span>'+
7
  '<textarea id="accordion_desc[]" name="accordion_desc[]" placeholder="Enter Accordion Description Here" class="wpsm_ac_label_text"></textarea>'+
 
8
  '<span class="ac_label"><?php _e("Accordion Icon",wpshopmart_accordion_text_domain); ?></span>'+
9
  '<div class="form-group input-group" >'+
10
  ' <input data-placement="bottomRight" id="accordion_title_icon[]" name="accordion_title_icon[]" class="form-control icp icp-auto" value="fa-laptop" type="text" readonly="readonly" />'+
@@ -64,4 +66,25 @@
64
  };
65
  accordion.init();
66
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  </script>
1
  <script>
2
+ var i = 1000;
3
  function add_new_accordion(){
4
  var output = '<li class="wpsm_ac-panel single_acc_box" >'+
5
  '<span class="ac_label"><?php _e("Accordion Title",wpshopmart_accordion_text_domain); ?></span>'+
6
  '<input type="text" id="accordion_title[]" name="accordion_title[]" value="" placeholder="Enter Accordion Title Here" class="wpsm_ac_label_text">'+
7
  '<span class="ac_label"l><?php _e("Accordion Description",wpshopmart_accordion_text_domain); ?></span>'+
8
  '<textarea id="accordion_desc[]" name="accordion_desc[]" placeholder="Enter Accordion Description Here" class="wpsm_ac_label_text"></textarea>'+
9
+ '<button type="button" class="btn btn-primary btn-block html_editor_button" data-toggle="modal" data-target=".bs-example-modal-lg" id="'+i+'" onclick="open_editor('+i+')">Use WYSIWYG Editor </button>'+
10
  '<span class="ac_label"><?php _e("Accordion Icon",wpshopmart_accordion_text_domain); ?></span>'+
11
  '<div class="form-group input-group" >'+
12
  ' <input data-placement="bottomRight" id="accordion_title_icon[]" name="accordion_title_icon[]" class="form-control icp icp-auto" value="fa-laptop" type="text" readonly="readonly" />'+
66
  };
67
  accordion.init();
68
  });
69
+ </script>
70
+
71
+
72
+ <script>
73
+
74
+
75
+ function open_editor(id){
76
+ var value = jQuery("#"+id).closest('li').find('textarea').val();
77
+ jQuery("#get_text").val(value);
78
+ jQuery("#get_id").val(jQuery("#"+id).attr('id'));
79
+ }
80
+
81
+
82
+ function insert_html(){
83
+ var html_text = jQuery("#get_text").val();
84
+ var id = jQuery("#get_id").val();
85
+ jQuery("#"+id).closest('li').find('textarea').val(html_text);
86
+
87
+ }
88
+
89
+
90
  </script>
lib/admin/add-acc.php CHANGED
@@ -1,9 +1,17 @@
1
  <div style=" overflow: hidden;padding: 10px;">
 
 
 
 
 
 
 
 
2
  <h3><?php _e('Add Accordion',wpshopmart_accordion_text_domain); ?></h3>
3
  <input type="hidden" name="ac_save_data_action" value="ac_save_data_action" />
4
  <ul class="clearfix" id="accordion_panel">
5
  <?php
6
-
7
  $accordion_data = unserialize(get_post_meta( $post->ID, 'wpsm_accordion_data', true));
8
  $TotalCount = get_post_meta( $post->ID, 'wpsm_accordion_count', true );
9
  if($TotalCount)
@@ -22,6 +30,7 @@
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">
@@ -39,7 +48,7 @@
39
 
40
  </li>
41
  <?php
42
-
43
  } // end of foreach
44
  }else{
45
  echo "<h2>No Accordion Found</h2>";
@@ -56,6 +65,7 @@
56
  <span class="ac_label"><?php _e('Accordion Description',wpshopmart_accordion_text_domain); ?></span>
57
 
58
  <textarea id="accordion_desc[]" name="accordion_desc[]" placeholder="Enter Accordion Description Here" class="wpsm_ac_label_text">Accordion Sample Description</textarea>
 
59
 
60
  <span class="ac_label"><?php _e('Accordion Icon',wpshopmart_accordion_text_domain); ?></span>
61
  <div class="form-group input-group">
@@ -78,6 +88,38 @@
78
  </ul>
79
  </div>
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  <a class="wpsm_ac-panel add_wpsm_ac_new" id="add_new_ac" onclick="add_new_accordion()" >
82
  <?php _e('Add New Accordion', wpshopmart_accordion_text_domain); ?>
83
  </a>
1
  <div style=" overflow: hidden;padding: 10px;">
2
+ <style>
3
+ .html_editor_button{
4
+ border-radius:0px;
5
+ background-color: #9C9C9C;
6
+ border-color: #9C9C9C;
7
+ margin-bottom:20px;
8
+ }
9
+ </style>
10
  <h3><?php _e('Add Accordion',wpshopmart_accordion_text_domain); ?></h3>
11
  <input type="hidden" name="ac_save_data_action" value="ac_save_data_action" />
12
  <ul class="clearfix" id="accordion_panel">
13
  <?php
14
+ $i=1;
15
  $accordion_data = unserialize(get_post_meta( $post->ID, 'wpsm_accordion_data', true));
16
  $TotalCount = get_post_meta( $post->ID, 'wpsm_accordion_count', true );
17
  if($TotalCount)
30
  <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">
31
  <span class="ac_label"><?php _e('Accordion Description',wpshopmart_accordion_text_domain); ?></span>
32
  <textarea id="accordion_desc[]" name="accordion_desc[]" placeholder="Enter Accordion Description Here" class="wpsm_ac_label_text"><?php echo esc_html($accordion_desc); ?></textarea>
33
+ <button type="button" class="btn btn-primary btn-block html_editor_button" data-toggle="modal" data-target=".bs-example-modal-lg" id="<?php echo $i; ?>" onclick="open_editor(<?php echo $i; ?>)">Use WYSIWYG Editor </button>
34
 
35
  <span class="ac_label"><?php _e('Accordion Icon',wpshopmart_accordion_text_domain); ?></span>
36
  <div class="form-group input-group">
48
 
49
  </li>
50
  <?php
51
+ $i++;
52
  } // end of foreach
53
  }else{
54
  echo "<h2>No Accordion Found</h2>";
65
  <span class="ac_label"><?php _e('Accordion Description',wpshopmart_accordion_text_domain); ?></span>
66
 
67
  <textarea id="accordion_desc[]" name="accordion_desc[]" placeholder="Enter Accordion Description Here" class="wpsm_ac_label_text">Accordion Sample Description</textarea>
68
+ <button type="button" class="btn btn-primary btn-block html_editor_button" data-toggle="modal" data-target=".bs-example-modal-lg" id="<?php echo $i; ?>" onclick="open_editor(<?php echo $i; ?>)">Use WYSIWYG Editor </button>
69
 
70
  <span class="ac_label"><?php _e('Accordion Icon',wpshopmart_accordion_text_domain); ?></span>
71
  <div class="form-group input-group">
88
  </ul>
89
  </div>
90
 
91
+ <!-- Modal -->
92
+ <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
93
+ <div class="modal-dialog modal-lg" role="document">
94
+ <div class="modal-content">
95
+ <div class="modal-header">
96
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
97
+ <h4 class="modal-title" id="myModalLabel">Html Editor Area</h4>
98
+ </div>
99
+ <div class="modal-body">
100
+ <style>
101
+ .switch-tmce {
102
+ display: none;
103
+ }
104
+ </style>
105
+ <?php
106
+
107
+ $content = '';
108
+ $editor_id = 'get_text';
109
+
110
+ wp_editor( $content, $editor_id );
111
+
112
+ ?>
113
+ <input type="hidden" value="" id="get_id" />
114
+ </div>
115
+ <div class="modal-footer">
116
+ <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="insert_html()">Insert Code In Description</button>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+
122
+
123
  <a class="wpsm_ac-panel add_wpsm_ac_new" id="add_new_ac" onclick="add_new_accordion()" >
124
  <?php _e('Add New Accordion', wpshopmart_accordion_text_domain); ?>
125
  </a>
lib/admin/menu.php CHANGED
@@ -41,6 +41,8 @@ class wpsm_accordion {
41
  wp_enqueue_style('wpsm_ac_line-edtor', wpshopmart_accordion_directory_url.'css/jquery-linedtextarea.css');
42
  wp_enqueue_script( 'wpsm_ac-line-edit-js', wpshopmart_accordion_directory_url.'js/jquery-linedtextarea.js');
43
 
 
 
44
  //tooltip
45
  wp_enqueue_style('wpsm_ac_tooltip', wpshopmart_accordion_directory_url.'tooltip/darktooltip.css');
46
  wp_enqueue_script( 'wpsm_ac-tooltip-js', wpshopmart_accordion_directory_url.'tooltip/jquery.darktooltip.js');
41
  wp_enqueue_style('wpsm_ac_line-edtor', wpshopmart_accordion_directory_url.'css/jquery-linedtextarea.css');
42
  wp_enqueue_script( 'wpsm_ac-line-edit-js', wpshopmart_accordion_directory_url.'js/jquery-linedtextarea.js');
43
 
44
+ wp_enqueue_script( 'wpsm_ac-bootstrap-js', wpshopmart_accordion_directory_url.'js/bootstrap.js');
45
+
46
  //tooltip
47
  wp_enqueue_style('wpsm_ac_tooltip', wpshopmart_accordion_directory_url.'tooltip/darktooltip.css');
48
  wp_enqueue_script( 'wpsm_ac-tooltip-js', wpshopmart_accordion_directory_url.'tooltip/jquery.darktooltip.js');
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.2
7
- Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,9 @@ Please use WordPress support forum to ask any query regarding any issue.
103
 
104
  == Changelog ==
105
 
 
 
 
106
  = 1.6.1 07-Mar-2016 =
107
  * Resolve Accordion Title Color Issue
108
 
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.2
7
+ Stable tag: 1.6.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Changelog ==
105
 
106
+ = 1.6.2 24-Mar-2016 =
107
+ * New: Add WYSIWYG Editor for accordion description.
108
+
109
  = 1.6.1 07-Mar-2016 =
110
  * Resolve Accordion Title Color Issue
111
 
responsive-accordion.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Responsive Accordion And Collapse
4
- * Version: 1.6.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
1
  <?php
2
  /**
3
  * Plugin Name: Responsive Accordion And Collapse
4
+ * Version: 1.6.2
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