Collapse-O-Matic - Version 1.7.0

Version Description

  • reworked the find-me feature to use new data-findme attribute, rather than create a hidden element.
Download this release

Release Info

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

Code changes from version 1.6.15 to 1.7.0

Files changed (3) hide show
  1. collapse-o-matic.php +7 -8
  2. js/collapse.js +6 -3
  3. readme.txt +7 -4
collapse-o-matic.php CHANGED
@@ -5,7 +5,7 @@ Text Domain: jquery-collapse-o-matic
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.15
9
  Author: twinpictures, baden03
10
  Author URI: http://twinpictures.de/
11
  License: GPL2
@@ -30,7 +30,7 @@ class WP_Collapse_O_Matic {
30
  * Current version
31
  * @var string
32
  */
33
- var $version = '1.6.15';
34
 
35
  /**
36
  * Used as prefix for options entry
@@ -130,7 +130,7 @@ class WP_Collapse_O_Matic {
130
  if($this->options['script_location'] == 'footer' ){
131
  $load_in_footer = true;
132
  }
133
- wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.5.18', $load_in_footer);
134
  if( empty($this->options['script_check']) ){
135
  wp_enqueue_script('collapseomatic-js');
136
  }
@@ -345,14 +345,15 @@ class WP_Collapse_O_Matic {
345
  if($findme != 'true' && $findme != 'auto'){
346
  $offset = $findme;
347
  }
348
- $anchor = '<input type="hidden" id="find-'.$id.'" name="'.$offset.'"/>';
 
349
  }
350
  $closeanchor = '';
351
  if($scrollonclose && (is_numeric($scrollonclose) || $scrollonclose == 0)){
352
  $trigclass .= ' scroll-to-trigger';
353
  $closeanchor = '<input type="hidden" id="scrollonclose-'.$id.'" name="'.$scrollonclose.'"/>';
354
  }
355
- $link = $closeanchor.$anchor.'<'.$tag.' class="collapseomatic '.$trigclass.'" id="'.$id.'" '.$relatt.' '.$inexatt.' '.$altatt.'>'.$startwrap.$title.$endwrap.'</'.$tag.'>';
356
  if($swaptitle){
357
  $link .= "<".$tag." id='swap-".$id."' alt='".$swapalt."' class='colomat-swap' style='display:none;'>".$startwrap.$swaptitle.$endwrap."</".$tag.">";
358
  }
@@ -625,15 +626,13 @@ class WP_Collapse_O_Matic {
625
  <div class="inside">
626
  <h4><img src="<?php echo plugins_url( 'images/collapse-o-matic-icon.png', __FILE__ ) ?>" width="16" height="16"/> Collapse-O-Matic Version <?php echo $this->version; ?></h4>
627
  <p><?php _e( 'Remove clutter, save space. Display and hide additional content in a SEO friendly way. Wrap any content&mdash;including other shortcodes&mdash;into a lovely jQuery expanding and collapsing element.', 'jquery-collapse-o-matic') ?></p>
 
628
  <ul>
629
  <li><?php printf( __( '%sDetailed documentation%s, complete with working demonstrations of all shortcode attributes, is available for your instructional enjoyment.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/" target="_blank">', '</a>'); ?></li>
630
  <li><?php printf( __( '%sFree Opensource Support%s', 'jquery-collapse-o-matic'), '<a href="http://wordpress.org/support/plugin/jquery-collapse-o-matic" target="_blank">', '</a>'); ?></li>
631
  <li><?php printf( __('If this plugin %s, please consider %sreviewing it at WordPress.org%s to help others.', 'jquery-collapse-o-matic'), $like_it, '<a href="http://wordpress.org/support/view/plugin-reviews/jquery-collapse-o-matic" target="_blank">', '</a>' ) ?></li>
632
  <li><a href="http://wordpress.org/extend/plugins/jquery-collapse-o-matic/" target="_blank">WordPress.org</a> | <a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/" target="_blank">Twinpictues Plugin Oven</a></li>
633
  </ul>
634
- <!--
635
- <p style="padding: 5px; border: 1px dashed #cccc66; background: #EEE;"><strong>Limited Offer:</strong> <a href="http://plugins.twinpictures.de/premium-plugins/collapse-pro-matic/">Upgrade to Collapse-Pro-Matic</a> or add on <a href="http://plugins.twinpictures.de/premium-plugins/collapse-commander/">Collapse Commander</a> before January 1, 2015 and receive a lifetime unlimited licence. Starting in 2015, all Plugin Oven pro plugins will introduce new pricing and licensing tiers.</p>
636
- -->
637
  </div>
638
  </div>
639
  </div>
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.7.0
9
  Author: twinpictures, baden03
10
  Author URI: http://twinpictures.de/
11
  License: GPL2
30
  * Current version
31
  * @var string
32
  */
33
+ var $version = '1.7.0';
34
 
35
  /**
36
  * Used as prefix for options entry
130
  if($this->options['script_location'] == 'footer' ){
131
  $load_in_footer = true;
132
  }
133
+ wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.6.0', $load_in_footer);
134
  if( empty($this->options['script_check']) ){
135
  wp_enqueue_script('collapseomatic-js');
136
  }
345
  if($findme != 'true' && $findme != 'auto'){
346
  $offset = $findme;
347
  }
348
+ //$anchor = '<input type="hidden" id="find-'.$id.'" name="'.$offset.'"/>';
349
+ $anchor = 'data-findme="'.$offset.'"';
350
  }
351
  $closeanchor = '';
352
  if($scrollonclose && (is_numeric($scrollonclose) || $scrollonclose == 0)){
353
  $trigclass .= ' scroll-to-trigger';
354
  $closeanchor = '<input type="hidden" id="scrollonclose-'.$id.'" name="'.$scrollonclose.'"/>';
355
  }
356
+ $link = $closeanchor.'<'.$tag.' class="collapseomatic '.$trigclass.'" id="'.$id.'" '.$relatt.' '.$inexatt.' '.$altatt.' '.$anchor.'>'.$startwrap.$title.$endwrap.'</'.$tag.'>';
357
  if($swaptitle){
358
  $link .= "<".$tag." id='swap-".$id."' alt='".$swapalt."' class='colomat-swap' style='display:none;'>".$startwrap.$swaptitle.$endwrap."</".$tag.">";
359
  }
626
  <div class="inside">
627
  <h4><img src="<?php echo plugins_url( 'images/collapse-o-matic-icon.png', __FILE__ ) ?>" width="16" height="16"/> Collapse-O-Matic Version <?php echo $this->version; ?></h4>
628
  <p><?php _e( 'Remove clutter, save space. Display and hide additional content in a SEO friendly way. Wrap any content&mdash;including other shortcodes&mdash;into a lovely jQuery expanding and collapsing element.', 'jquery-collapse-o-matic') ?></p>
629
+ <p style="padding: 5px; border: 1px dashed #cccc66; background: #EEE;"><strong>Last Chance for 2015 Prices:</strong> <a href="http://plugins.twinpictures.de/premium-plugins/collapse-pro-matic/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-pro-matic&utm_campaign=collapse-pro-year-end">Update to Collapse-Pro-Matic</a> before January 2016 to take advantage of 2015 pricing.</p>
630
  <ul>
631
  <li><?php printf( __( '%sDetailed documentation%s, complete with working demonstrations of all shortcode attributes, is available for your instructional enjoyment.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/" target="_blank">', '</a>'); ?></li>
632
  <li><?php printf( __( '%sFree Opensource Support%s', 'jquery-collapse-o-matic'), '<a href="http://wordpress.org/support/plugin/jquery-collapse-o-matic" target="_blank">', '</a>'); ?></li>
633
  <li><?php printf( __('If this plugin %s, please consider %sreviewing it at WordPress.org%s to help others.', 'jquery-collapse-o-matic'), $like_it, '<a href="http://wordpress.org/support/view/plugin-reviews/jquery-collapse-o-matic" target="_blank">', '</a>' ) ?></li>
634
  <li><a href="http://wordpress.org/extend/plugins/jquery-collapse-o-matic/" target="_blank">WordPress.org</a> | <a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/" target="_blank">Twinpictues Plugin Oven</a></li>
635
  </ul>
 
 
 
636
  </div>
637
  </div>
638
  </div>
js/collapse.js CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Collapse-O-Matic JavaSctipt v1.5.18
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2015, Twinpictures
@@ -76,7 +76,9 @@ function toggleState (obj, id, maptastic, trig_id) {
76
 
77
  //deal with any findme links
78
  if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
79
- offset_top = jQuery('#find-'+trig_id).attr('name');
 
 
80
  if(!offset_top){
81
  target_offset = jQuery('#'+trig_id).offset();
82
  offset_top = target_offset.top;
@@ -98,7 +100,8 @@ function toggleState (obj, id, maptastic, trig_id) {
98
 
99
  //deal with any findme links
100
  if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
101
- offset_top = jQuery('#find-'+trig_id).attr('name');
 
102
  if(!offset_top){
103
  target_offset = jQuery('#'+trig_id).offset();
104
  offset_top = target_offset.top;
1
  /*!
2
+ * Collapse-O-Matic JavaSctipt v1.6.0
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2015, Twinpictures
76
 
77
  //deal with any findme links
78
  if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
79
+ //offset_top = jQuery('#find-'+trig_id).attr('name');
80
+ offset_top = jQuery('#'+trig_id).attr('data-findme');
81
+
82
  if(!offset_top){
83
  target_offset = jQuery('#'+trig_id).offset();
84
  offset_top = target_offset.top;
100
 
101
  //deal with any findme links
102
  if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
103
+ //offset_top = jQuery('#find-'+trig_id).attr('name');
104
+ offset_top = jQuery('#'+trig_id).attr('data-findme');
105
  if(!offset_top){
106
  target_offset = jQuery('#'+trig_id).offset();
107
  offset_top = target_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.9
7
- Tested up to: 4.3.1
8
- Stable tag: 1.6.15
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -50,6 +50,9 @@ No. Not even close.
50
 
51
  == Changelog ==
52
 
 
 
 
53
  = 1.6.15 =
54
  * renamed language files to xx_XX.po and xx_XX.mo
55
  * recreated the .pot file
@@ -311,4 +314,4 @@ Fixed auto-expand of urls with id-anchors
311
  * The plug-in came to be.
312
 
313
  == Upgrade Notice ==
314
- Internationalisation (i18n) improvements for better language localisation integration. Wow, that’s a mouthful!
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: 4.0
7
+ Tested up to: 4.4.0
8
+ Stable tag: 1.7.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
50
 
51
  == Changelog ==
52
 
53
+ = 1.7.0 =
54
+ * reworked the find-me feature to use new data-findme attribute, rather than create a hidden element.
55
+
56
  = 1.6.15 =
57
  * renamed language files to xx_XX.po and xx_XX.mo
58
  * recreated the .pot file
314
  * The plug-in came to be.
315
 
316
  == Upgrade Notice ==
317
+ find-me feature has been improved to use a new data-findme attribute, rather than create a hidden element.