Collapse-O-Matic - Version 1.6.4

Version Description

  • added plugin to GitHub: https://github.com/baden03/collapse-o-matic
  • added new tabindex attribute to shortcode and options page
  • registration fields are masked using password input type
Download this release

Release Info

Developer baden03
Plugin Icon 128x128 Collapse-O-Matic
Version 1.6.4
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.4

Files changed (3) hide show
  1. collapse-o-matic.php +21 -7
  2. js/collapse.js +8 -1
  3. readme.txt +12 -2
collapse-o-matic.php CHANGED
@@ -5,7 +5,7 @@ Text Domain: colomat
5
  Domain Path: /languages
6
  Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
7
  Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
8
- Version: 1.6.3
9
  Author: twinpictures, baden03
10
  Author URI: http://twinpictures.de/
11
  License: GPL2
@@ -23,7 +23,7 @@ class WP_Collapse_O_Matic {
23
  * Current version
24
  * @var string
25
  */
26
- var $version = '1.6.3';
27
 
28
  /**
29
  * Used as prefix for options entry
@@ -48,6 +48,7 @@ class WP_Collapse_O_Matic {
48
  'targtag' => 'div',
49
  'targclass' => '',
50
  'duration' => 'fast',
 
51
  'slideEffect' => 'slideFade',
52
  'custom_css' => '',
53
  'script_check' => '',
@@ -112,7 +113,7 @@ class WP_Collapse_O_Matic {
112
  if($this->options['script_location'] == 'footer' ){
113
  $load_in_footer = true;
114
  }
115
- wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.5.12', $load_in_footer);
116
  if( empty($this->options['script_check']) ){
117
  wp_enqueue_script('collapseomatic-js');
118
  }
@@ -176,7 +177,8 @@ class WP_Collapse_O_Matic {
176
  'startwrap' => '',
177
  'endwrap' => '',
178
  'elwraptag' => '',
179
- 'elwrapclass' => ''
 
180
  ), $atts));
181
 
182
  if(!empty($cid)){
@@ -207,6 +209,7 @@ class WP_Collapse_O_Matic {
207
  }
208
  }
209
  }
 
210
  }
211
 
212
  $ewo = '';
@@ -284,6 +287,10 @@ class WP_Collapse_O_Matic {
284
  if($rel){
285
  $relatt = 'rel="'.$rel.'"';
286
  }
 
 
 
 
287
  if($expanded){
288
  $trigclass .= ' colomat-close';
289
  }
@@ -301,7 +308,7 @@ class WP_Collapse_O_Matic {
301
  $trigclass .= ' scroll-to-trigger';
302
  $closeanchor = '<input type="hidden" id="scrollonclose-'.$id.'" name="'.$scrollonclose.'"/>';
303
  }
304
- $link = $closeanchor.$anchor.'<'.$tag.' class="collapseomatic '.$trigclass.'" id="'.$id.'" '.$relatt.' '.$altatt.'>'.$startwrap.$title.$endwrap.'</'.$tag.'>';
305
  if($swaptitle){
306
  $link .= "<".$tag." id='swap-".$id."' alt='".$swapalt."' class='colomat-swap' style='display:none;'>".$startwrap.$swaptitle.$endwrap."</".$tag.">";
307
  }
@@ -441,6 +448,13 @@ class WP_Collapse_O_Matic {
441
  </td>
442
  </tr>
443
 
 
 
 
 
 
 
 
444
  <tr>
445
  <th><?php _e( 'Targtag Attribute', 'colomat' ) ?>:</th>
446
  <td><label><input type="text" id="<?php echo $this->options_name ?>[targtag]" name="<?php echo $this->options_name ?>[targtag]" value="<?php echo $options['targtag']; ?>" />
@@ -584,14 +598,14 @@ class WP_Collapse_O_Matic {
584
  <table>
585
  <tr>
586
  <th><?php _e( 'Receipt ID', 'colomat' ) ?>:</th>
587
- <td><label><input type="text" id="<?php echo $this->options_name ?>[cc_download_key]" name="<?php echo $this->options_name ?>[cc_download_key]" value="<?php echo $options['cc_download_key']; ?>" style="width: 100%" />
588
  <br /><span class="description"><?php _e('Receipt ID is found in the Collapse Commander Purchase Receipt', 'colomat'); ?></span></label>
589
  </td>
590
  </tr>
591
 
592
  <tr>
593
  <th><?php _e( 'Email', 'colomat' ) ?>:</th>
594
- <td><label><input type="text" id="<?php echo $this->options_name ?>[cc_email]" name="<?php echo $this->options_name ?>[cc_email]" value="<?php echo $options['cc_email']; ?>" style="width: 100%" />
595
  <br /><span class="description"><?php _e('Email address used to purchase Collapse Commander', 'colomat'); ?></span></label>
596
  </td>
597
  </tr>
5
  Domain Path: /languages
6
  Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
7
  Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
8
+ Version: 1.6.4
9
  Author: twinpictures, baden03
10
  Author URI: http://twinpictures.de/
11
  License: GPL2
23
  * Current version
24
  * @var string
25
  */
26
+ var $version = '1.6.4';
27
 
28
  /**
29
  * Used as prefix for options entry
48
  'targtag' => 'div',
49
  'targclass' => '',
50
  'duration' => 'fast',
51
+ 'tabindex' => '0',
52
  'slideEffect' => 'slideFade',
53
  'custom_css' => '',
54
  'script_check' => '',
113
  if($this->options['script_location'] == 'footer' ){
114
  $load_in_footer = true;
115
  }
116
+ wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.5.13', $load_in_footer);
117
  if( empty($this->options['script_check']) ){
118
  wp_enqueue_script('collapseomatic-js');
119
  }
177
  'startwrap' => '',
178
  'endwrap' => '',
179
  'elwraptag' => '',
180
+ 'elwrapclass' => '',
181
+ 'tabindex' => $options['tabindex']
182
  ), $atts));
183
 
184
  if(!empty($cid)){
209
  }
210
  }
211
  }
212
+ wp_reset_postdata();
213
  }
214
 
215
  $ewo = '';
287
  if($rel){
288
  $relatt = 'rel="'.$rel.'"';
289
  }
290
+ $inexatt = '';
291
+ if(!empty($tabindex) || $tabindex == 0 ){
292
+ $inexatt = 'tabindex="'.$tabindex.'"';
293
+ }
294
  if($expanded){
295
  $trigclass .= ' colomat-close';
296
  }
308
  $trigclass .= ' scroll-to-trigger';
309
  $closeanchor = '<input type="hidden" id="scrollonclose-'.$id.'" name="'.$scrollonclose.'"/>';
310
  }
311
+ $link = $closeanchor.$anchor.'<'.$tag.' class="collapseomatic '.$trigclass.'" id="'.$id.'" '.$relatt.' '.$inexatt.' '.$altatt.'>'.$startwrap.$title.$endwrap.'</'.$tag.'>';
312
  if($swaptitle){
313
  $link .= "<".$tag." id='swap-".$id."' alt='".$swapalt."' class='colomat-swap' style='display:none;'>".$startwrap.$swaptitle.$endwrap."</".$tag.">";
314
  }
448
  </td>
449
  </tr>
450
 
451
+ <tr>
452
+ <th><?php _e( 'Tabindex Attribute', 'colomat' ) ?>:</th>
453
+ <td><label><input type="text" id="<?php echo $this->options_name ?>[tabindex]" name="<?php echo $this->options_name ?>[tabindex]" value="<?php echo $options['tabindex']; ?>" />
454
+ <br /><span class="description"><?php printf(__('Default tabindex value to be assigned to the trigger element. See %sTabindex Attribute%s in the documentation for more info.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#tabindex" target="_blank">', '</a>'); ?></span></label>
455
+ </td>
456
+ </tr>
457
+
458
  <tr>
459
  <th><?php _e( 'Targtag Attribute', 'colomat' ) ?>:</th>
460
  <td><label><input type="text" id="<?php echo $this->options_name ?>[targtag]" name="<?php echo $this->options_name ?>[targtag]" value="<?php echo $options['targtag']; ?>" />
598
  <table>
599
  <tr>
600
  <th><?php _e( 'Receipt ID', 'colomat' ) ?>:</th>
601
+ <td><label><input type="password" id="<?php echo $this->options_name ?>[cc_download_key]" name="<?php echo $this->options_name ?>[cc_download_key]" value="<?php echo $options['cc_download_key']; ?>" style="width: 100%" />
602
  <br /><span class="description"><?php _e('Receipt ID is found in the Collapse Commander Purchase Receipt', 'colomat'); ?></span></label>
603
  </td>
604
  </tr>
605
 
606
  <tr>
607
  <th><?php _e( 'Email', 'colomat' ) ?>:</th>
608
+ <td><label><input type="password" id="<?php echo $this->options_name ?>[cc_email]" name="<?php echo $this->options_name ?>[cc_email]" value="<?php echo $options['cc_email']; ?>" style="width: 100%" />
609
  <br /><span class="description"><?php _e('Email address used to purchase Collapse Commander', 'colomat'); ?></span></label>
610
  </td>
611
  </tr>
js/collapse.js CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Collapse-O-Matic JavaSctipt v1.5.12
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2014, Twinpictures
@@ -298,6 +298,13 @@ jQuery(document).ready(function() {
298
  }
299
  }, '.collapseomatic'); //pass the element as an argument to .on
300
 
 
 
 
 
 
 
 
301
  //the main collapse/expand function
302
  jQuery(document).on('click', '.collapseomatic', function(event) {
303
  var offset_top;
1
  /*!
2
+ * Collapse-O-Matic JavaSctipt v1.5.13
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2014, Twinpictures
298
  }
299
  }, '.collapseomatic'); //pass the element as an argument to .on
300
 
301
+ //tabindex enter
302
+ jQuery(document).on('keypress','.collapseomatic', function(event) {
303
+ if (event.which == 13) {
304
+ event.currentTarget.click();
305
+ };
306
+ });
307
+
308
  //the main collapse/expand function
309
  jQuery(document).on('click', '.collapseomatic', function(event) {
310
  var offset_top;
readme.txt CHANGED
@@ -3,9 +3,9 @@
3
  Contributors: twinpictures, baden03
4
  Donate link: http://plugins.twinpictures.de/plugins/collapse-o-matic/
5
  Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
6
- Requires at least: 3.5
7
  Tested up to: 4.1
8
- Stable tag: 1.6.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -50,6 +50,11 @@ No. Not even close.
50
 
51
  == Changelog ==
52
 
 
 
 
 
 
53
  = 1.6.3 =
54
  * added shortcode and html support for the title, swaptitle, startwrap, enwrap and excerpt attributes using placeholders
55
  * added wpex_clean_shortcodes filter to strip unwanted p and br tags from the shortcode
@@ -263,6 +268,11 @@ Fixed auto-expand of urls with id-anchors
263
 
264
  == Upgrade Notice ==
265
 
 
 
 
 
 
266
  = 1.6.3 =
267
  * added shortcode support for the excerpt attribute
268
  * added wpex_clean_shortcodes filter to strip unwanted p and br tags from the shortcode
3
  Contributors: twinpictures, baden03
4
  Donate link: http://plugins.twinpictures.de/plugins/collapse-o-matic/
5
  Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
6
+ Requires at least: 3.9
7
  Tested up to: 4.1
8
+ Stable tag: 1.6.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
50
 
51
  == Changelog ==
52
 
53
+ = 1.6.4 =
54
+ * added plugin to GitHub: https://github.com/baden03/collapse-o-matic
55
+ * added new tabindex attribute to shortcode and options page
56
+ * registration fields are masked using password input type
57
+
58
  = 1.6.3 =
59
  * added shortcode and html support for the title, swaptitle, startwrap, enwrap and excerpt attributes using placeholders
60
  * added wpex_clean_shortcodes filter to strip unwanted p and br tags from the shortcode
268
 
269
  == Upgrade Notice ==
270
 
271
+ = 1.6.4 =
272
+ * added plugin to GitHub: https://github.com/baden03/collapse-o-matic
273
+ * added new tabindex attribute to shortcode and options page
274
+ * registration fields are masked using password input type
275
+
276
  = 1.6.3 =
277
  * added shortcode support for the excerpt attribute
278
  * added wpex_clean_shortcodes filter to strip unwanted p and br tags from the shortcode