Version Description
- fixed issue with using id anchor links on elements with expanded=true
- added support for Collapse Commander add-on plugin to manage expand elements
Download this release
Release Info
Developer | baden03 |
Plugin | Collapse-O-Matic |
Version | 1.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.10 to 1.6
- collapse-o-matic.php +86 -6
- js/collapse.js +8 -3
- readme.txt +10 -1
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.
|
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.
|
27 |
|
28 |
/**
|
29 |
* Used as prefix for options entry
|
@@ -42,12 +42,15 @@ class WP_Collapse_O_Matic {
|
|
42 |
*/
|
43 |
var $options = array(
|
44 |
'style' => 'light',
|
|
|
45 |
'tag' => 'span',
|
46 |
'duration' => 'fast',
|
47 |
'slideEffect' => 'slideFade',
|
48 |
'custom_css' => '',
|
49 |
'script_check' => '',
|
50 |
-
'script_location' => 'footer'
|
|
|
|
|
51 |
);
|
52 |
|
53 |
/**
|
@@ -106,7 +109,7 @@ class WP_Collapse_O_Matic {
|
|
106 |
if($this->options['script_location'] == 'footer' ){
|
107 |
$load_in_footer = true;
|
108 |
}
|
109 |
-
wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.5.
|
110 |
if( empty($this->options['script_check']) ){
|
111 |
wp_enqueue_script('collapseomatic-js');
|
112 |
}
|
@@ -172,6 +175,33 @@ class WP_Collapse_O_Matic {
|
|
172 |
'elwrapclass' => ''
|
173 |
), $atts));
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
$ewo = '';
|
176 |
$ewc = '';
|
177 |
if($elwraptag){
|
@@ -355,6 +385,15 @@ class WP_Collapse_O_Matic {
|
|
355 |
</td>
|
356 |
</tr>
|
357 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
<tr>
|
359 |
<th><?php _e( 'Tag Attribute', 'colomat' ) ?>:</th>
|
360 |
<td><label><input type="text" id="<?php echo $this->options_name ?>[tag]" name="<?php echo $this->options_name ?>[tag]" value="<?php echo $options['tag']; ?>" />
|
@@ -435,7 +474,13 @@ class WP_Collapse_O_Matic {
|
|
435 |
<br /><span class="description"><?php _e('Where should the script be loaded, in the Header or the Footer?', 'colomat'); ?></span></label>
|
436 |
</td>
|
437 |
</tr>
|
438 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
<tr>
|
440 |
<th><strong><?php _e( 'Level Up!', 'colomat' ) ?></strong></th>
|
441 |
<td><?php printf(__( '%sCollapse-Pro-Matic%s is our preimum plugin that offers additional attributes and features for <i>ultimate</i> flexibility.', 'colomat' ), '<a href="http://plugins.twinpictures.de/premium-plugins/collapse-pro-matic/">', '</a>'); ?>
|
@@ -447,7 +492,6 @@ class WP_Collapse_O_Matic {
|
|
447 |
<p class="submit">
|
448 |
<input class="button-primary" type="submit" value="<?php _e( 'Save Changes' ) ?>" />
|
449 |
</p>
|
450 |
-
</form>
|
451 |
</div>
|
452 |
</div>
|
453 |
</div>
|
@@ -472,6 +516,42 @@ class WP_Collapse_O_Matic {
|
|
472 |
</div>
|
473 |
<div class="clear"></div>
|
474 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
<?php
|
476 |
}
|
477 |
|
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
|
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';
|
27 |
|
28 |
/**
|
29 |
* Used as prefix for options entry
|
42 |
*/
|
43 |
var $options = array(
|
44 |
'style' => 'light',
|
45 |
+
'cid' => '',
|
46 |
'tag' => 'span',
|
47 |
'duration' => 'fast',
|
48 |
'slideEffect' => 'slideFade',
|
49 |
'custom_css' => '',
|
50 |
'script_check' => '',
|
51 |
+
'script_location' => 'footer',
|
52 |
+
'cc_download_key' => '',
|
53 |
+
'cc_email' => ''
|
54 |
);
|
55 |
|
56 |
/**
|
109 |
if($this->options['script_location'] == 'footer' ){
|
110 |
$load_in_footer = true;
|
111 |
}
|
112 |
+
wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.5.12', $load_in_footer);
|
113 |
if( empty($this->options['script_check']) ){
|
114 |
wp_enqueue_script('collapseomatic-js');
|
115 |
}
|
175 |
'elwrapclass' => ''
|
176 |
), $atts));
|
177 |
|
178 |
+
if($cid){
|
179 |
+
$args = array(
|
180 |
+
'post_type' => 'expand-element',
|
181 |
+
'p' => $cid,
|
182 |
+
);
|
183 |
+
$query_commander = new WP_Query( $args );
|
184 |
+
if ( $query_commander->have_posts() ) {
|
185 |
+
while ( $query_commander->have_posts() ) {
|
186 |
+
$query_commander->the_post();
|
187 |
+
$title = get_the_title();
|
188 |
+
if(get_the_content()){
|
189 |
+
$content = apply_filters('the_content',get_the_content());
|
190 |
+
}
|
191 |
+
|
192 |
+
$meta_values = get_post_meta( $cid );
|
193 |
+
foreach($meta_values as $key => $value){
|
194 |
+
if(!empty($value) && $key[0] != '_'){
|
195 |
+
${substr($key, 9)} = $value[0];
|
196 |
+
}
|
197 |
+
}
|
198 |
+
if(!empty($highlander) && !empty($rel)){
|
199 |
+
$rel .= '-highlander';
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
$ewo = '';
|
206 |
$ewc = '';
|
207 |
if($elwraptag){
|
385 |
</td>
|
386 |
</tr>
|
387 |
|
388 |
+
<?php if( is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
|
389 |
+
<tr>
|
390 |
+
<th><?php _e( 'CID Attribute', 'colomat' ) ?>:</th>
|
391 |
+
<td><label><input type="text" id="<?php echo $this->options_name ?>[cid]" name="<?php echo $this->options_name ?>[cid]" value="<?php echo $options['cid']; ?>" />
|
392 |
+
<br /><span class="description"><?php printf( __('Default %sCollapse Commander%s ID', 'colomat'), '<a href="http://plugins.twinpictures.de/premium-plugins/collapse-commander/" target="_blank">', '</a>'); ?></span></label>
|
393 |
+
</td>
|
394 |
+
</tr>
|
395 |
+
<?php endif; ?>
|
396 |
+
|
397 |
<tr>
|
398 |
<th><?php _e( 'Tag Attribute', 'colomat' ) ?>:</th>
|
399 |
<td><label><input type="text" id="<?php echo $this->options_name ?>[tag]" name="<?php echo $this->options_name ?>[tag]" value="<?php echo $options['tag']; ?>" />
|
474 |
<br /><span class="description"><?php _e('Where should the script be loaded, in the Header or the Footer?', 'colomat'); ?></span></label>
|
475 |
</td>
|
476 |
</tr>
|
477 |
+
<?php if( !is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
|
478 |
+
<tr>
|
479 |
+
<th><strong><?php _e( 'Collapse Managment', 'colomat' ) ?></strong></th>
|
480 |
+
<td><?php printf(__( '%sCollapse Commander%s is an add-on plugin that introduces an advanced management interface to better organize expand elements and simplify expand shortcodes.', 'colomat' ), '<a href="http://plugins.twinpictures.de/premium-plugins/collapse-commander/">', '</a>'); ?>
|
481 |
+
</td>
|
482 |
+
</tr>
|
483 |
+
<?php endif; ?>
|
484 |
<tr>
|
485 |
<th><strong><?php _e( 'Level Up!', 'colomat' ) ?></strong></th>
|
486 |
<td><?php printf(__( '%sCollapse-Pro-Matic%s is our preimum plugin that offers additional attributes and features for <i>ultimate</i> flexibility.', 'colomat' ), '<a href="http://plugins.twinpictures.de/premium-plugins/collapse-pro-matic/">', '</a>'); ?>
|
492 |
<p class="submit">
|
493 |
<input class="button-primary" type="submit" value="<?php _e( 'Save Changes' ) ?>" />
|
494 |
</p>
|
|
|
495 |
</div>
|
496 |
</div>
|
497 |
</div>
|
516 |
</div>
|
517 |
<div class="clear"></div>
|
518 |
</div>
|
519 |
+
|
520 |
+
<?php if( is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
|
521 |
+
|
522 |
+
<div class="postbox-container side metabox-holder" style="width:29%;">
|
523 |
+
<div style="margin:0 5px;">
|
524 |
+
<div class="postbox">
|
525 |
+
<h3 class="handle"><?php _e( 'Register Collapse Commander', 'colomat') ?></h3>
|
526 |
+
<div class="inside">
|
527 |
+
<p><?php _e('To receive plugin updates you must register your plugin. Enter your Receipt ID and email address used to purchase the plugin below.', 'colomat'); ?></p>
|
528 |
+
<fieldset>
|
529 |
+
<table>
|
530 |
+
<tr>
|
531 |
+
<th><?php _e( 'Receipt ID', 'colomat' ) ?>:</th>
|
532 |
+
<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%" />
|
533 |
+
<br /><span class="description"><?php _e('Receipt ID is found in the Collapse Commander Purchase Receipt', 'colomat'); ?></span></label>
|
534 |
+
</td>
|
535 |
+
</tr>
|
536 |
+
|
537 |
+
<tr>
|
538 |
+
<th><?php _e( 'Email', 'colomat' ) ?>:</th>
|
539 |
+
<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%" />
|
540 |
+
<br /><span class="description"><?php _e('Email address used to purchase Collapse Commander', 'colomat'); ?></span></label>
|
541 |
+
</td>
|
542 |
+
</tr>
|
543 |
+
</table>
|
544 |
+
</fieldset>
|
545 |
+
<p class="submit" style="margin-bottom: 20px;">
|
546 |
+
<input class="button-primary" type="submit" style="float: right;" value="<?php _e( 'Register', 'colomat') ?>" />
|
547 |
+
</p>
|
548 |
+
</div>
|
549 |
+
</div>
|
550 |
+
</div>
|
551 |
+
</div>
|
552 |
+
|
553 |
+
<?php endif; ?>
|
554 |
+
</form>
|
555 |
<?php
|
556 |
}
|
557 |
|
js/collapse.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*!
|
2 |
-
* Collapse-O-Matic JavaSctipt v1.5.
|
3 |
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
*
|
5 |
* Copyright 2014, Twinpictures
|
@@ -450,13 +450,18 @@ jQuery(document).ready(function() {
|
|
450 |
else{
|
451 |
anchor = anchor_arr[0];
|
452 |
}
|
453 |
-
|
|
|
|
|
|
|
454 |
//expand any nested parents
|
455 |
jQuery('#' + anchor).parents('.collapseomatic_content, .collapseomatic_content_inline').each(function(index) {
|
456 |
parent_arr = jQuery(this).attr('id').split('-');
|
457 |
junk = parent_arr.splice(0, 1);
|
458 |
parent = parent_arr.join('-');
|
459 |
-
jQuery('#' + parent).
|
|
|
|
|
460 |
})
|
461 |
}
|
462 |
|
1 |
/*!
|
2 |
+
* Collapse-O-Matic JavaSctipt v1.5.12
|
3 |
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
*
|
5 |
* Copyright 2014, Twinpictures
|
450 |
else{
|
451 |
anchor = anchor_arr[0];
|
452 |
}
|
453 |
+
|
454 |
+
if( !jQuery('#' + anchor).hasClass('colomat-close') ){
|
455 |
+
jQuery('#' + anchor).click();
|
456 |
+
}
|
457 |
//expand any nested parents
|
458 |
jQuery('#' + anchor).parents('.collapseomatic_content, .collapseomatic_content_inline').each(function(index) {
|
459 |
parent_arr = jQuery(this).attr('id').split('-');
|
460 |
junk = parent_arr.splice(0, 1);
|
461 |
parent = parent_arr.join('-');
|
462 |
+
if( !jQuery('#' + parent).hasClass('colomat-close') ){
|
463 |
+
jQuery('#' + parent).click();
|
464 |
+
}
|
465 |
})
|
466 |
}
|
467 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ 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.0
|
8 |
-
Stable tag: 1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -49,6 +49,11 @@ No. Not even close.
|
|
49 |
3. Options Page? Yes, Options Page!
|
50 |
|
51 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
52 |
= 1.5.10 =
|
53 |
* change the find me element from an anchor to an input due to HTML5 no longer supporting the Name attribute
|
54 |
* fixed bug with trigpos inline
|
@@ -246,6 +251,10 @@ Fixed auto-expand of urls with id-anchors
|
|
246 |
|
247 |
== Upgrade Notice ==
|
248 |
|
|
|
|
|
|
|
|
|
249 |
= 1.5.10 =
|
250 |
* fixed an HTML5 validation issue with anchors having name attributes
|
251 |
* fixed bug with trigpos inline
|
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.0
|
8 |
+
Stable tag: 1.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
49 |
3. Options Page? Yes, Options Page!
|
50 |
|
51 |
== Changelog ==
|
52 |
+
|
53 |
+
= 1.6 =
|
54 |
+
* fixed issue with using id anchor links on elements with expanded=‘true’
|
55 |
+
* added support for Collapse Commander add-on plugin to manage expand elements
|
56 |
+
|
57 |
= 1.5.10 =
|
58 |
* change the find me element from an anchor to an input due to HTML5 no longer supporting the Name attribute
|
59 |
* fixed bug with trigpos inline
|
251 |
|
252 |
== Upgrade Notice ==
|
253 |
|
254 |
+
= 1.6 =
|
255 |
+
* fixed issue with using id anchor links on elements with expanded=‘true’
|
256 |
+
* added support for Collapse Commander add-on plugin to manage expand elements
|
257 |
+
|
258 |
= 1.5.10 =
|
259 |
* fixed an HTML5 validation issue with anchors having name attributes
|
260 |
* fixed bug with trigpos inline
|