Accordion - Version 1.3

Version Description

  • 22/05/2015 - update - UI update for admin content part.
    • 22/05/2015 - add - WP Editor for Accordion Content.
Download this release

Release Info

Developer paratheme
Plugin Icon 128x128 Accordion
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

Files changed (6) hide show
  1. accordions-help.php +5 -1
  2. accordions.php +7 -10
  3. css/style.css +89 -15
  4. includes/accordions-meta.php +44 -20
  5. js/scripts.js +47 -5
  6. readme.txt +21 -4
accordions-help.php CHANGED
@@ -78,7 +78,11 @@
78
  ?>
79
  </div>
80
 
81
-
 
 
 
 
82
 
83
 
84
 
78
  ?>
79
  </div>
80
 
81
+ <div class="option-box">
82
+ <p class="option-title">Video Tutorial(with premium features)</p>
83
+ <p class="option-info">Please watch this video tutorial.</p>
84
+ <iframe width="640" height="480" src="<?php echo accordions_tutorial_video_url; ?>" frameborder="0" allowfullscreen></iframe>
85
+ </div>
86
 
87
 
88
 
accordions.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accordions
4
  Plugin URI: http://paratheme.com/items/accordions-html-css3-responsive-accordion-grid-for-wordpress/
5
  Description: Fully responsive and mobile ready accordion grid for wordpress.
6
- Version: 1.2
7
  Author: paratheme
8
  Author URI: http://paratheme.com
9
  License: GPLv2 or later
@@ -20,7 +20,7 @@ define('accordions_conatct_url', 'http://paratheme.com/contact' );
20
  define('accordions_qa_url', 'http://paratheme.com/qa/' );
21
  define('accordions_plugin_name', 'Accordions' );
22
  define('accordions_share_url', 'https://wordpress.org/plugins/accordions/' );
23
- define('accordions_tutorial_video_url', '//www.youtube.com/embed/8OiNCDavSQg?rel=0' );
24
 
25
  require_once( plugin_dir_path( __FILE__ ) . 'includes/accordions-meta.php');
26
  require_once( plugin_dir_path( __FILE__ ) . 'includes/accordions-functions.php');
@@ -40,7 +40,7 @@ function accordions_paratheme_init_scripts()
40
  wp_enqueue_script('jquery');
41
 
42
  wp_enqueue_script('accordions_js', plugins_url( '/js/scripts.js' , __FILE__ ) , array( 'jquery' ));
43
-
44
  wp_enqueue_style('accordions_style', accordions_plugin_url.'css/style.css');
45
  wp_enqueue_style('responsive-accordion', accordions_plugin_url.'css/responsive-accordion.css');
46
 
@@ -71,7 +71,7 @@ register_activation_hook(__FILE__, 'accordions_paratheme_activation');
71
 
72
  function accordions_paratheme_activation()
73
  {
74
- $accordions_version= "1.2";
75
  update_option('accordions_version', $accordions_version); //update plugin version.
76
 
77
  $accordions_customer_type= "free"; //customer_type "free"
@@ -97,13 +97,10 @@ function accordions_paratheme_display($atts, $content = null ) {
97
  {
98
  $accordions_paratheme_display.= accordions_themes_flat($post_id);
99
  }
100
- elseif($accordions_themes== "rounded")
101
- {
102
- $accordions_paratheme_display.= accordions_themes_rounded($post_id);
103
- }
104
- elseif($accordions_themes== "rounded_top")
105
  {
106
- $accordions_paratheme_display.= accordions_themes_rounded_top($post_id);
107
  }
108
 
109
 
3
  Plugin Name: Accordions
4
  Plugin URI: http://paratheme.com/items/accordions-html-css3-responsive-accordion-grid-for-wordpress/
5
  Description: Fully responsive and mobile ready accordion grid for wordpress.
6
+ Version: 1.3
7
  Author: paratheme
8
  Author URI: http://paratheme.com
9
  License: GPLv2 or later
20
  define('accordions_qa_url', 'http://paratheme.com/qa/' );
21
  define('accordions_plugin_name', 'Accordions' );
22
  define('accordions_share_url', 'https://wordpress.org/plugins/accordions/' );
23
+ define('accordions_tutorial_video_url', '//www.youtube.com/embed/h2wNFJaaY8s?rel=0' );
24
 
25
  require_once( plugin_dir_path( __FILE__ ) . 'includes/accordions-meta.php');
26
  require_once( plugin_dir_path( __FILE__ ) . 'includes/accordions-functions.php');
40
  wp_enqueue_script('jquery');
41
 
42
  wp_enqueue_script('accordions_js', plugins_url( '/js/scripts.js' , __FILE__ ) , array( 'jquery' ));
43
+
44
  wp_enqueue_style('accordions_style', accordions_plugin_url.'css/style.css');
45
  wp_enqueue_style('responsive-accordion', accordions_plugin_url.'css/responsive-accordion.css');
46
 
71
 
72
  function accordions_paratheme_activation()
73
  {
74
+ $accordions_version= "1.3";
75
  update_option('accordions_version', $accordions_version); //update plugin version.
76
 
77
  $accordions_customer_type= "free"; //customer_type "free"
97
  {
98
  $accordions_paratheme_display.= accordions_themes_flat($post_id);
99
  }
100
+
101
+ else
 
 
 
102
  {
103
+ $accordions_paratheme_display.= accordions_themes_flat($post_id);
104
  }
105
 
106
 
css/style.css CHANGED
@@ -19,31 +19,40 @@
19
  }
20
 
21
 
 
 
 
 
22
 
23
- #accordions_metabox .accordions-content tr{
24
-
 
 
 
 
 
 
25
  }
26
 
27
- #accordions_metabox .accordions-content td {
28
- background: none repeat scroll 0 0 rgb(245, 245, 245);
29
- border-left: 3px solid rgb(255, 255, 255);
30
- padding-bottom: 15px;
 
 
 
 
31
  }
32
 
 
 
33
  #accordions_metabox .accordions-content input, #accordions_metabox .accordions-content textarea {
34
- margin-left: 10px;
35
  width: 95%;
36
  }
37
 
38
 
39
- #accordions_metabox .accordions-content .removeaccordions {
40
- background: none repeat scroll 0 0 rgb(221, 221, 221);
41
- border: 1px solid rgb(255, 255, 255);
42
- cursor: pointer;
43
- margin: 3px;
44
- padding: 1px 5px;
45
- position: absolute;
46
- }
47
 
48
  #accordions_metabox .accordions-content .removeaccordions:hover {
49
  background: none repeat scroll 0 0 rgb(255, 134, 87);
@@ -55,6 +64,71 @@
55
 
56
 
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  /*CSS front page*/
59
 
60
  .accordions-container {
19
  }
20
 
21
 
22
+ #accordions_metabox .accordions_icons_custom {
23
+ display: none;
24
+ margin-top: 15px;
25
+ }
26
 
27
+ #accordions_metabox .accordions_icons_custom_plus {
28
+ background: none repeat scroll 0 0 / 100% auto rgb(221, 221, 221);
29
+ display: inline-block;
30
+ height: 20px;
31
+ margin-right: 5px;
32
+ width: 20px;
33
+ cursor: pointer;
34
+ border: 1px solid rgb(255, 89, 16);
35
  }
36
 
37
+ #accordions_metabox .accordions_icons_custom_minus {
38
+ background: none repeat scroll 0 0 / 100% auto rgb(221, 221, 221);
39
+ display: inline-block;
40
+ height: 20px;
41
+ margin-right: 5px;
42
+ width: 20px;
43
+ cursor: pointer;
44
+ border: 1px solid rgb(255, 89, 16);
45
  }
46
 
47
+
48
+
49
  #accordions_metabox .accordions-content input, #accordions_metabox .accordions-content textarea {
50
+
51
  width: 95%;
52
  }
53
 
54
 
55
+
 
 
 
 
 
 
 
56
 
57
  #accordions_metabox .accordions-content .removeaccordions:hover {
58
  background: none repeat scroll 0 0 rgb(255, 134, 87);
64
 
65
 
66
 
67
+
68
+ #accordions_metabox .accordions-content {
69
+
70
+ }
71
+
72
+ #accordions_metabox .accordions-content tr {
73
+ background: none repeat scroll 0 0 rgb(255, 255, 255);
74
+ border-bottom: 1px solid rgb(153, 153, 153);
75
+ margin-bottom: 10px;
76
+ padding: 0;
77
+ }
78
+
79
+ #accordions_metabox .accordions-content .section-dragHandle {
80
+ text-align: center;
81
+ vertical-align: middle;
82
+ width: 20px;
83
+ }
84
+
85
+
86
+ #accordions_metabox .accordions-content .section-header {
87
+ border-bottom: 1px solid rgb(153, 153, 153);
88
+ padding: 5px 10px;
89
+ }
90
+
91
+ #accordions_metabox .accordions-content .accordions-title-preview {
92
+ display: inline-block;
93
+ }
94
+ #accordions_metabox .accordions-content .section-header .removeaccordions {
95
+ background: none repeat scroll 0 0 rgb(255, 91, 64);
96
+ cursor: pointer;
97
+ display: inline-block;
98
+ float: right;
99
+ margin-left: 20px;
100
+ text-align: center;
101
+ width: 20px;
102
+ }
103
+
104
+ #accordions_metabox .accordions-content .section-header label {
105
+ float: right;
106
+ }
107
+
108
+
109
+
110
+
111
+
112
+
113
+ #accordions_metabox .accordions-content .section-panel {
114
+ display: none;
115
+ }
116
+
117
+
118
+ #accordions_metabox .accordions-content .active .section-panel {
119
+ display: block;
120
+ padding: 25px 10px;
121
+ text-align: left;
122
+ background:#bde6fc;
123
+ }
124
+
125
+ #accordions_metabox .accordions-content .active .section-header{
126
+ background:#a7e1ff;
127
+
128
+ }
129
+
130
+
131
+
132
  /*CSS front page*/
133
 
134
  .accordions-container {
includes/accordions-meta.php CHANGED
@@ -327,49 +327,73 @@ function meta_boxes_accordions_input( $post ) {
327
  <div class="button add-accordions">Add</div>
328
  <br />
329
  </div>
330
- <table width="100%" class="accordions-content">
 
331
 
332
  <?php
333
- $total_row = count($accordions_content_title);
334
 
335
  if(empty($accordions_content_title))
336
  {
337
- $accordions_content_title = array(0);
338
  }
339
-
340
  foreach ($accordions_content_title as $index => $accordions_title)
341
  {
342
-
 
 
 
 
343
 
344
  ?>
345
  <tr index='<?php echo $index; ?>' valign="top">
346
-
 
 
347
  <td style="vertical-align:middle;">
 
 
 
 
 
348
  <span class="removeaccordions">X</span>
349
- <br/><br/>
350
- <input width="100%" placeholder="accordions Header" type="text" name="accordions_content_title[<?php echo $index; ?>]" value="<?php if(!empty($accordions_title)) echo $accordions_title; ?>" />
351
- <br /><br />
352
- <textarea placeholder="accordions Content" name="accordions_content_body[<?php echo $index; ?>]" ><?php if(!empty($accordions_content_body[$index])) echo $accordions_content_body[$index]; ?></textarea>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  </td>
354
  </tr>
355
  <?php
356
 
357
-
358
  }
359
 
360
  ?>
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
 
370
 
371
  </table>
372
-
373
 
374
  </div>
375
  </li>
327
  <div class="button add-accordions">Add</div>
328
  <br />
329
  </div>
330
+
331
+ <table width="100%" class="accordions-content" id="accordions-content">
332
 
333
  <?php
334
+ // $total_row = count($accordions_content_title);
335
 
336
  if(empty($accordions_content_title))
337
  {
338
+ $accordions_content_title = array('0'=>'Demo Title');
339
  }
340
+ $i=0;
341
  foreach ($accordions_content_title as $index => $accordions_title)
342
  {
343
+
344
+ if(empty($accordions_content_body[$index]))
345
+ {
346
+ $accordions_content_body[$index] = 'Demo Content';
347
+ }
348
 
349
  ?>
350
  <tr index='<?php echo $index; ?>' valign="top">
351
+
352
+ <td class="section-dragHandle">*</td>
353
+
354
  <td style="vertical-align:middle;">
355
+ <div class="section-header">
356
+ <div class="accordions-title-preview">
357
+ <?php if(!empty($accordions_title)) echo $accordions_title; ?>
358
+ </div>
359
+
360
  <span class="removeaccordions">X</span>
361
+
362
+ </div>
363
+ <div class="section-panel">
364
+ <input width="100%" placeholder="accordions Header" type="text" name="accordions_content_title[row_<?php echo $i; ?>]" value="<?php if(!empty($accordions_title)) echo $accordions_title; ?>" />
365
+
366
+
367
+
368
+ <?php
369
+
370
+ wp_editor( stripslashes($accordions_content_body[$index]), 'accordions_content_body'.$i, $settings = array('textarea_name'=>'accordions_content_body[row_'.$i.']') );
371
+
372
+
373
+ ?>
374
+ </div>
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
  </td>
386
  </tr>
387
  <?php
388
 
389
+ $i++;
390
  }
391
 
392
  ?>
 
 
 
 
 
 
 
 
393
 
394
 
395
  </table>
396
+
397
 
398
  </div>
399
  </li>
js/scripts.js CHANGED
@@ -1,8 +1,50 @@
1
 
2
  jQuery(document).ready(function($)
3
  {
4
-
5
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  $(document).on('click', '.tab-nav li', function()
7
  {
8
  $(".active").removeClass("active");
@@ -49,7 +91,7 @@ jQuery(document).ready(function($)
49
  }
50
 
51
 
52
- $(".accordions-content").append('<tr index="'+row+'" valign="top"><td class="tab-new" style="vertical-align:middle;"><span class="removeaccordions">X</span><br/><br/><input width="100%" placeholder="accordions Header" type="text" name="accordions_content_title['+row+']" value="" /><br /><br /><textarea placeholder="accordions Content" name="accordions_content_body['+row+']" ></textarea></td></tr>');
53
 
54
 
55
 
@@ -68,9 +110,9 @@ jQuery(document).ready(function($)
68
  $(document).on('click', '#accordions_metabox .removeaccordions', function()
69
  {
70
 
71
- if (confirm('Do you really want to delete this tab ?')) {
72
 
73
- $(this).parent().parent().remove();
74
  }
75
 
76
 
1
 
2
  jQuery(document).ready(function($)
3
  {
4
+
5
+
6
+
7
+
8
+ $(document).on('keyup', '#accordions_metabox .section-panel input', function()
9
+ {
10
+ var text = $(this).val();
11
+
12
+ if(text == '')
13
+ {
14
+ $(this).parent().parent().children('.section-header').children('.accordions-title-preview').html('start typing');
15
+ }
16
+ else
17
+ {
18
+ $(this).parent().parent().children('.section-header').children('.accordions-title-preview').html(text);
19
+ }
20
+
21
+
22
+
23
+ })
24
+
25
+
26
+
27
+
28
+
29
+
30
+ $(document).on('click', '#accordions_metabox .section-header', function()
31
+ {
32
+ if($(this).parent().hasClass('active'))
33
+ {
34
+ $(this).parent().removeClass('active');
35
+ }
36
+ else
37
+ {
38
+ $(this).parent().addClass('active');
39
+ }
40
+
41
+
42
+ })
43
+
44
+
45
+
46
+
47
+
48
  $(document).on('click', '.tab-nav li', function()
49
  {
50
  $(".active").removeClass("active");
91
  }
92
 
93
 
94
+ $(".accordions-content").append('<tr index="'+row+'" valign="top"><td class="section-dragHandle">*</td><td class="tab-new" style="vertical-align:middle;"><br/><input width="100%" placeholder="accordions Header" type="text" name="accordions_content_title['+row+']" value="" /><br /><br /><textarea placeholder="accordions Content" name="accordions_content_body['+row+']" ></textarea></td></tr>');
95
 
96
 
97
 
110
  $(document).on('click', '#accordions_metabox .removeaccordions', function()
111
  {
112
 
113
+ if (confirm('Do you really want to delete this accordion ?')) {
114
 
115
+ $(this).parent().parent().parent().remove();
116
  }
117
 
118
 
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
  Donate link: http://paratheme.com
4
  Tags: accordion, accordions, Responsive accordions, accordions plugin, jQuery accordions, accordions short-code, accordions Widget, accordions plugin wordpress, accordions plugin jquery
5
  Requires at least: 3.8
6
- Tested up to: 4.2
7
- Stable tag: 1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,7 +18,7 @@ Accordions is pure HTML & CSS3 responsive accordion grid for WordPress. By this
18
 
19
  ### Accordions by http://paratheme.com
20
 
21
- * [Upgrade to Premium!&raquo;](http://goo.gl/0gcRTQ)
22
  * [Live Demo!&raquo;](http://paratheme.com/demo/accordions/)
23
 
24
 
@@ -47,8 +47,21 @@ Accordions is pure HTML & CSS3 responsive accordion grid for WordPress. By this
47
  * Themes(4 Different Themes).
48
  * Icon Position(Left or Right).
49
  * Custom Icons(Add your own icons).
50
- * Drag & Drop Content Sorting.
51
  * WP Editor for Accordion Content.
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
 
54
  == Installation ==
@@ -83,6 +96,10 @@ then paste this shortcode anywhere in your page to display accordions<br />
83
 
84
  == Changelog ==
85
 
 
 
 
 
86
  = 1.2 =
87
  * 12/11/2014 problem fixed for content color and font size.
88
 
3
  Donate link: http://paratheme.com
4
  Tags: accordion, accordions, Responsive accordions, accordions plugin, jQuery accordions, accordions short-code, accordions Widget, accordions plugin wordpress, accordions plugin jquery
5
  Requires at least: 3.8
6
+ Tested up to: 4.2.2
7
+ Stable tag: 1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
18
 
19
  ### Accordions by http://paratheme.com
20
 
21
+ * [Buy to Premium!&raquo;](http://paratheme.com/items/accordions-html-css3-responsive-accordion-grid-for-wordpress/)
22
  * [Live Demo!&raquo;](http://paratheme.com/demo/accordions/)
23
 
24
 
47
  * Themes(4 Different Themes).
48
  * Icon Position(Left or Right).
49
  * Custom Icons(Add your own icons).
50
+ * Accordion Sorting.
51
  * WP Editor for Accordion Content.
52
+ * Multilevel accordion.
53
+ * Hide any accordion without deleting.
54
+ * Click Header to scroll top.
55
+ * Default active accordion.
56
+
57
+
58
+
59
+
60
+ <strong>Video Tutorial(With premium features)</strong><br />
61
+ https://www.youtube.com/watch?v=h2wNFJaaY8s
62
+
63
+
64
+
65
 
66
 
67
  == Installation ==
96
 
97
  == Changelog ==
98
 
99
+ = 1.3 =
100
+ * 22/05/2015 - update - UI update for admin content part.
101
+ * 22/05/2015 - add - WP Editor for Accordion Content.
102
+
103
  = 1.2 =
104
  * 12/11/2014 problem fixed for content color and font size.
105