Collapse-O-Matic - Version 1.6.14

Version Description

  • hash-bang (#!) that are used in urls will not be processed as url anchors
  • now checks if a url anchor is actually an existing element before trying to process it
  • changed language domain to jquery-collapse-o-matic to work with WordPress new translation process
  • updated tested up to tag to 4.3.1
Download this release

Release Info

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

Code changes from version 1.6.13 to 1.6.14

collapse-o-matic.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: Collapse-O-Matic
4
- 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.13
9
  Author: twinpictures, baden03
10
  Author URI: http://twinpictures.de/
11
  License: GPL2
@@ -30,14 +30,14 @@ class WP_Collapse_O_Matic {
30
  * Current version
31
  * @var string
32
  */
33
- var $version = '1.6.13';
34
 
35
  /**
36
  * Used as prefix for options entry
37
  * @var string
38
  */
39
  var $domain = 'colomat';
40
-
41
  /**
42
  * Name of the options
43
  * @var string
@@ -82,7 +82,7 @@ class WP_Collapse_O_Matic {
82
  $this->_set_options();
83
 
84
  // load text domain for translations
85
- load_plugin_textdomain( 'colomat', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
86
 
87
  //load the script and style if viewing the front-end
88
  add_action('wp_enqueue_scripts', array( $this, 'collapsTronicInit' ) );
@@ -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.17', $load_in_footer);
134
  if( empty($this->options['script_check']) ){
135
  wp_enqueue_script('collapseomatic-js');
136
  }
@@ -397,7 +397,7 @@ class WP_Collapse_O_Matic {
397
  // Add link to options page from plugin list
398
  function plugin_actions($links) {
399
  $new_links = array();
400
- $new_links[] = '<a href="options-general.php?page=collapse-o-matic-options">' . __('Settings', 'colomat') . '</a>';
401
  return array_merge($new_links, $links);
402
  }
403
 
@@ -406,22 +406,22 @@ class WP_Collapse_O_Matic {
406
  */
407
  function options_page() {
408
  $like_it_arr = array(
409
- __('really tied the room together', 'colomat'),
410
- __('made you feel all warm and fuzzy on the inside', 'colomat'),
411
- __('restored your faith in humanity... even if only for a fleeting second', 'colomat'),
412
- __('rocked your world', 'provided a positive vision of future living', 'colomat'),
413
- __('inspired you to commit a random act of kindness', 'colomat'),
414
- __('encouraged more regular flossing of the teeth', 'colomat'),
415
- __('helped organize your life in the small ways that matter', 'colomat'),
416
- __('saved your minutes--if not tens of minutes--writing your own solution', 'colomat'),
417
- __('brightened your day... or darkened if if you are trying to sleep in', 'colomat'),
418
- __('caused you to dance a little jig of joy and joyousness', 'colomat'),
419
- __('inspired you to tweet a little @twinpictues social love', 'colomat'),
420
- __('tasted great, while also being less filling', 'colomat'),
421
- __('caused you to shout: "everybody spread love, give me some mo!"', 'colomat'),
422
- __('helped you keep the funk alive', 'colomat'),
423
- __('<a href="http://www.youtube.com/watch?v=dvQ28F5fOdU" target="_blank">soften hands while you do dishes</a>', 'colomat'),
424
- __('helped that little old lady <a href="http://www.youtube.com/watch?v=Ug75diEyiA0" target="_blank">find the beef</a>', 'colomat')
425
  );
426
  $rand_key = array_rand($like_it_arr);
427
  $like_it = $like_it_arr[$rand_key];
@@ -434,8 +434,8 @@ class WP_Collapse_O_Matic {
434
  <div class="postbox-container metabox-holder meta-box-sortables" style="width: 69%">
435
  <div style="margin:0 5px;">
436
  <div class="postbox">
437
- <div class="handlediv" title="<?php _e( 'Click to toggle', 'colomat' ) ?>"><br/></div>
438
- <h3 class="hndle"><?php _e( 'Default Collapse-O-Matic Settings', 'colomat' ) ?></h3>
439
  <div class="inside">
440
  <form method="post" action="options.php">
441
  <?php
@@ -445,16 +445,16 @@ class WP_Collapse_O_Matic {
445
  <fieldset class="options">
446
  <table class="form-table">
447
  <tr>
448
- <th><?php _e( 'Style', 'colomat' ) ?>:</th>
449
  <td><label><select id="<?php echo $this->options_name ?>[style]" name="<?php echo $this->options_name ?>[style]">
450
  <?php
451
  if(empty($options['style'])){
452
  $options['style'] = 'light';
453
  }
454
  $st_array = array(
455
- __('Light', 'colomat') => 'light',
456
- __('Dark', 'colomat') => 'dark',
457
- __('None', 'colomat') => 'none'
458
  );
459
  foreach( $st_array as $key => $value){
460
  $selected = '';
@@ -465,51 +465,51 @@ class WP_Collapse_O_Matic {
465
  }
466
  ?>
467
  </select>
468
- <br /><span class="description"><?php _e('Select Light for sites with lighter backgrounds. Select Dark for sites with darker backgrounds. Select None to handle styling yourself.', 'colomat'); ?></span></label>
469
  </td>
470
  </tr>
471
 
472
  <?php if( is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
473
  <tr>
474
- <th><?php _e( 'CID Attribute', 'colomat' ) ?>:</th>
475
  <td><label><input type="text" id="<?php echo $this->options_name ?>[cid]" name="<?php echo $this->options_name ?>[cid]" value="<?php echo $options['cid']; ?>" />
476
- <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>
477
  </td>
478
  </tr>
479
  <?php endif; ?>
480
 
481
  <tr>
482
- <th><?php _e( 'Tag Attribute', 'colomat' ) ?>:</th>
483
  <td><label><input type="text" id="<?php echo $this->options_name ?>[tag]" name="<?php echo $this->options_name ?>[tag]" value="<?php echo $options['tag']; ?>" />
484
- <br /><span class="description"><?php printf(__('HTML tag use to wrap the trigger text. See %sTag Attribute%s in the documentation for more info.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#tag" target="_blank">', '</a>'); ?></span></label>
485
  </td>
486
  </tr>
487
 
488
  <tr>
489
- <th><?php _e( 'Trigclass Attribute', 'colomat' ) ?>:</th>
490
  <td><label><input type="text" id="<?php echo $this->options_name ?>[trigclass]" name="<?php echo $this->options_name ?>[trigclass]" value="<?php echo $options['trigclass']; ?>" />
491
- <br /><span class="description"><?php printf(__('Default class assigned to the trigger element. See %sTrigclass Attribute%s in the documentation for more info.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#trigclass" target="_blank">', '</a>'); ?></span></label>
492
  </td>
493
  </tr>
494
 
495
  <tr>
496
- <th><?php _e( 'Tabindex Attribute', 'colomat' ) ?>:</th>
497
  <td><label><input type="text" id="<?php echo $this->options_name ?>[tabindex]" name="<?php echo $this->options_name ?>[tabindex]" value="<?php echo $options['tabindex']; ?>" />
498
- <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>
499
  </td>
500
  </tr>
501
 
502
  <tr>
503
- <th><?php _e( 'Targtag Attribute', 'colomat' ) ?>:</th>
504
  <td><label><input type="text" id="<?php echo $this->options_name ?>[targtag]" name="<?php echo $this->options_name ?>[targtag]" value="<?php echo $options['targtag']; ?>" />
505
- <br /><span class="description"><?php printf(__('HTML tag use for the target element. See %sTargtag Attribute%s in the documentation for more info.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#targtag" target="_blank">', '</a>'); ?></span></label>
506
  </td>
507
  </tr>
508
 
509
  <tr>
510
- <th><?php _e( 'Targclass Attribute', 'colomat' ) ?>:</th>
511
  <td><label><input type="text" id="<?php echo $this->options_name ?>[targclass]" name="<?php echo $this->options_name ?>[targclass]" value="<?php echo $options['targclass']; ?>" />
512
- <br /><span class="description"><?php printf(__('Default class assigned to the target element. See %sTargclass Attribute%s in the documentation for more info.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#targclass" target="_blank">', '</a>'); ?></span></label>
513
  </td>
514
  </tr>
515
 
@@ -519,22 +519,22 @@ class WP_Collapse_O_Matic {
519
  $options['duration'] = 'fast';
520
  }
521
  ?>
522
- <th><?php _e( 'Collapse/Expand Duration', 'colomat' ) ?>:</th>
523
  <td><label><input type="text" id="<?php echo $this->options_name ?>[duration]" name="<?php echo $this->options_name ?>[duration]" value="<?php echo $options['duration']; ?>" />
524
- <br /><span class="description"><?php printf(__('A string or number determining how long the animation will run. See %sDuration%s in the documentation for more info.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#duration" target="_blank">', '</a>'); ?></span></label>
525
  </td>
526
  </tr>
527
 
528
  <tr>
529
- <th><?php _e( 'Animation Effect', 'colomat' ) ?>:</th>
530
  <td><label><select id="<?php echo $this->options_name ?>[slideEffect]" name="<?php echo $this->options_name ?>[slideEffect]">
531
  <?php
532
  if(empty($options['slideEffect'])){
533
  $options['slideEffect'] = 'slideFade';
534
  }
535
  $se_array = array(
536
- __('Slide Only', 'colomat') => 'slideToggle',
537
- __('Slide & Fade', 'colomat') => 'slideFade'
538
  );
539
  foreach( $se_array as $key => $value){
540
  $selected = '';
@@ -545,41 +545,41 @@ class WP_Collapse_O_Matic {
545
  }
546
  ?>
547
  </select>
548
- <br /><span class="description"><?php printf(__('Animation effect to use while collapsing and expanding. See %sAnimation Effect%s in the documentation for more info.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#animation-effect" target="_blank">', '</a>'); ?></span></label>
549
  </td>
550
  </tr>
551
 
552
  <tr>
553
- <th><?php _e( 'Custom Style', 'colomat' ) ?>:</th>
554
  <td><label><textarea id="<?php echo $this->options_name ?>[custom_css]" name="<?php echo $this->options_name ?>[custom_css]" style="width: 100%; height: 150px;"><?php echo $options['custom_css']; ?></textarea>
555
- <br /><span class="description"><?php _e( 'Custom CSS style for <em>ultimate flexibility</em>', 'colomat' ) ?></span></label>
556
  </td>
557
  </tr>
558
 
559
  <tr>
560
- <th><?php _e( 'Content Filter', 'colomat' ) ?>:</th>
561
- <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[filter_content]" name="<?php echo $this->options_name ?>[filter_content]" value="1" <?php echo checked( $options['filter_content'], 1 ); ?> /> <?php _e('Apply filter', 'colomat'); ?>
562
- <br /><span class="description"><?php _e('Apply the_content filter to target content.', 'colomat'); ?></span></label>
563
  </td>
564
  </tr>
565
 
566
  <tr>
567
- <th><?php _e( 'Shortcode Loads Scripts', 'colomat' ) ?>:</th>
568
- <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[script_check]" name="<?php echo $this->options_name ?>[script_check]" value="1" <?php echo checked( $options['script_check'], 1 ); ?> /> <?php _e('Only load scripts with shortcode.', 'colomat'); ?>
569
- <br /><span class="description"><?php _e('Only load Collapse-O-Matic scripts if [expand] shortcode is used.', 'colomat'); ?></span></label>
570
  </td>
571
  </tr>
572
 
573
  <tr>
574
- <th><?php _e( 'Script Load Location', 'colomat' ) ?>:</th>
575
  <td><label><select id="<?php echo $this->options_name ?>[script_location]" name="<?php echo $this->options_name ?>[script_location]">
576
  <?php
577
  if(empty($options['script_location'])){
578
  $options['script_location'] = 'footer';
579
  }
580
  $sl_array = array(
581
- __('Header', 'colomat') => 'header',
582
- __('Footer', 'colomat') => 'footer'
583
  );
584
  foreach( $sl_array as $key => $value){
585
  $selected = '';
@@ -590,19 +590,19 @@ class WP_Collapse_O_Matic {
590
  }
591
  ?>
592
  </select>
593
- <br /><span class="description"><?php _e('Where should the script be loaded, in the Header or the Footer?', 'colomat'); ?></span></label>
594
  </td>
595
  </tr>
596
  <?php if( !is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
597
  <tr>
598
- <th><strong><?php _e( 'Take Command!', 'colomat' ) ?></strong></th>
599
- <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/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-commander&utm_campaign=collapse-o-matic-commander">', '</a>'); ?>
600
  </td>
601
  </tr>
602
  <?php endif; ?>
603
  <tr>
604
- <th><strong><?php _e( 'Level Up!', 'colomat' ) ?></strong></th>
605
- <td><?php printf(__( '%sCollapse-Pro-Matic%s is our premium plugin that offers additional attributes and features for <i>ultimate</i> flexibility.', 'colomat' ), '<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-o-matic-pro">', '</a>'); ?>
606
  </td>
607
  </tr>
608
  </table>
@@ -620,15 +620,15 @@ class WP_Collapse_O_Matic {
620
  <div class="postbox-container side metabox-holder meta-box-sortables" style="width:29%;">
621
  <div style="margin:0 5px;">
622
  <div class="postbox">
623
- <div class="handlediv" title="<?php _e( 'Click to toggle', 'colomat' ) ?>"><br/></div>
624
  <h3 class="hndle"><?php _e( 'About' ) ?></h3>
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.', 'colomat') ?></p>
628
  <ul>
629
- <li><?php printf( __( '%sDetailed documentation%s, complete with working demonstrations of all shortcode attributes, is available for your instructional enjoyment.', 'colomat'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/" target="_blank">', '</a>'); ?></li>
630
- <li><?php printf( __( '%sFree Opensource Support%s', 'colomat'), '<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.', 'colomat'), $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
  <!--
@@ -645,7 +645,7 @@ class WP_Collapse_O_Matic {
645
  <div class="postbox-container side metabox-holder" style="width:29%;">
646
  <div style="margin:0 5px;">
647
  <div class="postbox">
648
- <h3 class="handle"><?php _e( 'Register Collapse Commander', 'colomat') ?></h3>
649
  <div class="inside">
650
  <p><?php printf( __('To receive plugin updates you must register your plugin. Enter your Collapse Commander licence key below. Licence keys may be viewed and manged by logging into %syour account%s.', 'colpromat'), '<a href="http://plugins.twinpictures.de/your-account/" target="_blank">', '</a>'); ?></p>
651
  <form method="post" action="options.php">
@@ -696,7 +696,7 @@ class WP_Collapse_O_Matic {
696
  <div class="postbox-container side metabox-holder meta-box-sortables" style="width:29%;">
697
  <div style="margin:0 5px;">
698
  <div class="postbox">
699
- <div class="handlediv" title="<?php _e( 'Click to toggle', 'colomat' ) ?>"><br/></div>
700
  <h3 class="hndle">Collapse Commander</h3>
701
  <div class="inside">
702
  <p>A brief and not-exactly-sober overview of <a href="http://plugins.twinpictures.de/premium-plugins/collapse-commander/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-commander&utm_campaign=collapse-o-matic-commander">Collapse Commander</a>, a new add-on plugin for Collapse-O-Matic and Collapse-Pro-Matic that adds and advanded expand shortcode management system.</p>
1
  <?php
2
  /*
3
  Plugin Name: Collapse-O-Matic
4
+ 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.14
9
  Author: twinpictures, baden03
10
  Author URI: http://twinpictures.de/
11
  License: GPL2
30
  * Current version
31
  * @var string
32
  */
33
+ var $version = '1.6.14';
34
 
35
  /**
36
  * Used as prefix for options entry
37
  * @var string
38
  */
39
  var $domain = 'colomat';
40
+
41
  /**
42
  * Name of the options
43
  * @var string
82
  $this->_set_options();
83
 
84
  // load text domain for translations
85
+ load_plugin_textdomain( 'jquery-collapse-o-matic', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
86
 
87
  //load the script and style if viewing the front-end
88
  add_action('wp_enqueue_scripts', array( $this, 'collapsTronicInit' ) );
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
  }
397
  // Add link to options page from plugin list
398
  function plugin_actions($links) {
399
  $new_links = array();
400
+ $new_links[] = '<a href="options-general.php?page=collapse-o-matic-options">' . __('Settings', 'jquery-collapse-o-matic') . '</a>';
401
  return array_merge($new_links, $links);
402
  }
403
 
406
  */
407
  function options_page() {
408
  $like_it_arr = array(
409
+ __('really tied the room together', 'jquery-collapse-o-matic'),
410
+ __('made you feel all warm and fuzzy on the inside', 'jquery-collapse-o-matic'),
411
+ __('restored your faith in humanity... even if only for a fleeting second', 'jquery-collapse-o-matic'),
412
+ __('rocked your world', 'provided a positive vision of future living', 'jquery-collapse-o-matic'),
413
+ __('inspired you to commit a random act of kindness', 'jquery-collapse-o-matic'),
414
+ __('encouraged more regular flossing of the teeth', 'jquery-collapse-o-matic'),
415
+ __('helped organize your life in the small ways that matter', 'jquery-collapse-o-matic'),
416
+ __('saved your minutes--if not tens of minutes--writing your own solution', 'jquery-collapse-o-matic'),
417
+ __('brightened your day... or darkened if if you are trying to sleep in', 'jquery-collapse-o-matic'),
418
+ __('caused you to dance a little jig of joy and joyousness', 'jquery-collapse-o-matic'),
419
+ __('inspired you to tweet a little @twinpictues social love', 'jquery-collapse-o-matic'),
420
+ __('tasted great, while also being less filling', 'jquery-collapse-o-matic'),
421
+ __('caused you to shout: "everybody spread love, give me some mo!"', 'jquery-collapse-o-matic'),
422
+ __('helped you keep the funk alive', 'jquery-collapse-o-matic'),
423
+ __('<a href="http://www.youtube.com/watch?v=dvQ28F5fOdU" target="_blank">soften hands while you do dishes</a>', 'jquery-collapse-o-matic'),
424
+ __('helped that little old lady <a href="http://www.youtube.com/watch?v=Ug75diEyiA0" target="_blank">find the beef</a>', 'jquery-collapse-o-matic')
425
  );
426
  $rand_key = array_rand($like_it_arr);
427
  $like_it = $like_it_arr[$rand_key];
434
  <div class="postbox-container metabox-holder meta-box-sortables" style="width: 69%">
435
  <div style="margin:0 5px;">
436
  <div class="postbox">
437
+ <div class="handlediv" title="<?php _e( 'Click to toggle', 'jquery-collapse-o-matic' ) ?>"><br/></div>
438
+ <h3 class="hndle"><?php _e( 'Default Collapse-O-Matic Settings', 'jquery-collapse-o-matic' ) ?></h3>
439
  <div class="inside">
440
  <form method="post" action="options.php">
441
  <?php
445
  <fieldset class="options">
446
  <table class="form-table">
447
  <tr>
448
+ <th><?php _e( 'Style', 'jquery-collapse-o-matic' ) ?>:</th>
449
  <td><label><select id="<?php echo $this->options_name ?>[style]" name="<?php echo $this->options_name ?>[style]">
450
  <?php
451
  if(empty($options['style'])){
452
  $options['style'] = 'light';
453
  }
454
  $st_array = array(
455
+ __('Light', 'jquery-collapse-o-matic') => 'light',
456
+ __('Dark', 'jquery-collapse-o-matic') => 'dark',
457
+ __('None', 'jquery-collapse-o-matic') => 'none'
458
  );
459
  foreach( $st_array as $key => $value){
460
  $selected = '';
465
  }
466
  ?>
467
  </select>
468
+ <br /><span class="description"><?php _e('Select Light for sites with lighter backgrounds. Select Dark for sites with darker backgrounds. Select None to handle styling yourself.', 'jquery-collapse-o-matic'); ?></span></label>
469
  </td>
470
  </tr>
471
 
472
  <?php if( is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
473
  <tr>
474
+ <th><?php _e( 'CID Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
475
  <td><label><input type="text" id="<?php echo $this->options_name ?>[cid]" name="<?php echo $this->options_name ?>[cid]" value="<?php echo $options['cid']; ?>" />
476
+ <br /><span class="description"><?php printf( __('Default %sCollapse Commander%s ID', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/premium-plugins/collapse-commander/" target="_blank">', '</a>'); ?></span></label>
477
  </td>
478
  </tr>
479
  <?php endif; ?>
480
 
481
  <tr>
482
+ <th><?php _e( 'Tag Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
483
  <td><label><input type="text" id="<?php echo $this->options_name ?>[tag]" name="<?php echo $this->options_name ?>[tag]" value="<?php echo $options['tag']; ?>" />
484
+ <br /><span class="description"><?php printf(__('HTML tag use to wrap the trigger text. See %sTag Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#tag" target="_blank">', '</a>'); ?></span></label>
485
  </td>
486
  </tr>
487
 
488
  <tr>
489
+ <th><?php _e( 'Trigclass Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
490
  <td><label><input type="text" id="<?php echo $this->options_name ?>[trigclass]" name="<?php echo $this->options_name ?>[trigclass]" value="<?php echo $options['trigclass']; ?>" />
491
+ <br /><span class="description"><?php printf(__('Default class assigned to the trigger element. See %sTrigclass Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#trigclass" target="_blank">', '</a>'); ?></span></label>
492
  </td>
493
  </tr>
494
 
495
  <tr>
496
+ <th><?php _e( 'Tabindex Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
497
  <td><label><input type="text" id="<?php echo $this->options_name ?>[tabindex]" name="<?php echo $this->options_name ?>[tabindex]" value="<?php echo $options['tabindex']; ?>" />
498
+ <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.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#tabindex" target="_blank">', '</a>'); ?></span></label>
499
  </td>
500
  </tr>
501
 
502
  <tr>
503
+ <th><?php _e( 'Targtag Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
504
  <td><label><input type="text" id="<?php echo $this->options_name ?>[targtag]" name="<?php echo $this->options_name ?>[targtag]" value="<?php echo $options['targtag']; ?>" />
505
+ <br /><span class="description"><?php printf(__('HTML tag use for the target element. See %sTargtag Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#targtag" target="_blank">', '</a>'); ?></span></label>
506
  </td>
507
  </tr>
508
 
509
  <tr>
510
+ <th><?php _e( 'Targclass Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
511
  <td><label><input type="text" id="<?php echo $this->options_name ?>[targclass]" name="<?php echo $this->options_name ?>[targclass]" value="<?php echo $options['targclass']; ?>" />
512
+ <br /><span class="description"><?php printf(__('Default class assigned to the target element. See %sTargclass Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#targclass" target="_blank">', '</a>'); ?></span></label>
513
  </td>
514
  </tr>
515
 
519
  $options['duration'] = 'fast';
520
  }
521
  ?>
522
+ <th><?php _e( 'Collapse/Expand Duration', 'jquery-collapse-o-matic' ) ?>:</th>
523
  <td><label><input type="text" id="<?php echo $this->options_name ?>[duration]" name="<?php echo $this->options_name ?>[duration]" value="<?php echo $options['duration']; ?>" />
524
+ <br /><span class="description"><?php printf(__('A string or number determining how long the animation will run. See %sDuration%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#duration" target="_blank">', '</a>'); ?></span></label>
525
  </td>
526
  </tr>
527
 
528
  <tr>
529
+ <th><?php _e( 'Animation Effect', 'jquery-collapse-o-matic' ) ?>:</th>
530
  <td><label><select id="<?php echo $this->options_name ?>[slideEffect]" name="<?php echo $this->options_name ?>[slideEffect]">
531
  <?php
532
  if(empty($options['slideEffect'])){
533
  $options['slideEffect'] = 'slideFade';
534
  }
535
  $se_array = array(
536
+ __('Slide Only', 'jquery-collapse-o-matic') => 'slideToggle',
537
+ __('Slide & Fade', 'jquery-collapse-o-matic') => 'slideFade'
538
  );
539
  foreach( $se_array as $key => $value){
540
  $selected = '';
545
  }
546
  ?>
547
  </select>
548
+ <br /><span class="description"><?php printf(__('Animation effect to use while collapsing and expanding. See %sAnimation Effect%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#animation-effect" target="_blank">', '</a>'); ?></span></label>
549
  </td>
550
  </tr>
551
 
552
  <tr>
553
+ <th><?php _e( 'Custom Style', 'jquery-collapse-o-matic' ) ?>:</th>
554
  <td><label><textarea id="<?php echo $this->options_name ?>[custom_css]" name="<?php echo $this->options_name ?>[custom_css]" style="width: 100%; height: 150px;"><?php echo $options['custom_css']; ?></textarea>
555
+ <br /><span class="description"><?php _e( 'Custom CSS style for <em>ultimate flexibility</em>', 'jquery-collapse-o-matic' ) ?></span></label>
556
  </td>
557
  </tr>
558
 
559
  <tr>
560
+ <th><?php _e( 'Content Filter', 'jquery-collapse-o-matic' ) ?>:</th>
561
+ <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[filter_content]" name="<?php echo $this->options_name ?>[filter_content]" value="1" <?php echo checked( $options['filter_content'], 1 ); ?> /> <?php _e('Apply filter', 'jquery-collapse-o-matic'); ?>
562
+ <br /><span class="description"><?php _e('Apply the_content filter to target content.', 'jquery-collapse-o-matic'); ?></span></label>
563
  </td>
564
  </tr>
565
 
566
  <tr>
567
+ <th><?php _e( 'Shortcode Loads Scripts', 'jquery-collapse-o-matic' ) ?>:</th>
568
+ <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[script_check]" name="<?php echo $this->options_name ?>[script_check]" value="1" <?php echo checked( $options['script_check'], 1 ); ?> /> <?php _e('Only load scripts with shortcode.', 'jquery-collapse-o-matic'); ?>
569
+ <br /><span class="description"><?php _e('Only load Collapse-O-Matic scripts if [expand] shortcode is used.', 'jquery-collapse-o-matic'); ?></span></label>
570
  </td>
571
  </tr>
572
 
573
  <tr>
574
+ <th><?php _e( 'Script Load Location', 'jquery-collapse-o-matic' ) ?>:</th>
575
  <td><label><select id="<?php echo $this->options_name ?>[script_location]" name="<?php echo $this->options_name ?>[script_location]">
576
  <?php
577
  if(empty($options['script_location'])){
578
  $options['script_location'] = 'footer';
579
  }
580
  $sl_array = array(
581
+ __('Header', 'jquery-collapse-o-matic') => 'header',
582
+ __('Footer', 'jquery-collapse-o-matic') => 'footer'
583
  );
584
  foreach( $sl_array as $key => $value){
585
  $selected = '';
590
  }
591
  ?>
592
  </select>
593
+ <br /><span class="description"><?php _e('Where should the script be loaded, in the Header or the Footer?', 'jquery-collapse-o-matic'); ?></span></label>
594
  </td>
595
  </tr>
596
  <?php if( !is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
597
  <tr>
598
+ <th><strong><?php _e( 'Take Command!', 'jquery-collapse-o-matic' ) ?></strong></th>
599
+ <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.', 'jquery-collapse-o-matic' ), '<a href="http://plugins.twinpictures.de/premium-plugins/collapse-commander/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-commander&utm_campaign=collapse-o-matic-commander">', '</a>'); ?>
600
  </td>
601
  </tr>
602
  <?php endif; ?>
603
  <tr>
604
+ <th><strong><?php _e( 'Level Up!', 'jquery-collapse-o-matic' ) ?></strong></th>
605
+ <td><?php printf(__( '%sCollapse-Pro-Matic%s is our premium plugin that offers additional attributes and features for <i>ultimate</i> flexibility.', 'jquery-collapse-o-matic' ), '<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-o-matic-pro">', '</a>'); ?>
606
  </td>
607
  </tr>
608
  </table>
620
  <div class="postbox-container side metabox-holder meta-box-sortables" style="width:29%;">
621
  <div style="margin:0 5px;">
622
  <div class="postbox">
623
+ <div class="handlediv" title="<?php _e( 'Click to toggle', 'jquery-collapse-o-matic' ) ?>"><br/></div>
624
  <h3 class="hndle"><?php _e( 'About' ) ?></h3>
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
  <!--
645
  <div class="postbox-container side metabox-holder" style="width:29%;">
646
  <div style="margin:0 5px;">
647
  <div class="postbox">
648
+ <h3 class="handle"><?php _e( 'Register Collapse Commander', 'jquery-collapse-o-matic') ?></h3>
649
  <div class="inside">
650
  <p><?php printf( __('To receive plugin updates you must register your plugin. Enter your Collapse Commander licence key below. Licence keys may be viewed and manged by logging into %syour account%s.', 'colpromat'), '<a href="http://plugins.twinpictures.de/your-account/" target="_blank">', '</a>'); ?></p>
651
  <form method="post" action="options.php">
696
  <div class="postbox-container side metabox-holder meta-box-sortables" style="width:29%;">
697
  <div style="margin:0 5px;">
698
  <div class="postbox">
699
+ <div class="handlediv" title="<?php _e( 'Click to toggle', 'jquery-collapse-o-matic' ) ?>"><br/></div>
700
  <h3 class="hndle">Collapse Commander</h3>
701
  <div class="inside">
702
  <p>A brief and not-exactly-sober overview of <a href="http://plugins.twinpictures.de/premium-plugins/collapse-commander/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-commander&utm_campaign=collapse-o-matic-commander">Collapse Commander</a>, a new add-on plugin for Collapse-O-Matic and Collapse-Pro-Matic that adds and advanded expand shortcode management system.</p>
js/collapse.js CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Collapse-O-Matic JavaSctipt v1.5.17
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2015, Twinpictures
@@ -468,10 +468,11 @@ jQuery(document).ready(function() {
468
  });
469
 
470
  //handle new page loads with anchor
471
- var myFile = document.location.toString();
472
- if (myFile.match('#')) { // the URL contains an anchor
 
473
  // click the navigation item corresponding to the anchor
474
- var anchor_arr = myFile.split('#');
475
  if(anchor_arr.length > 1){
476
  junk = anchor_arr.splice(0, 1);
477
  anchor = anchor_arr.join('#');
@@ -480,27 +481,39 @@ jQuery(document).ready(function() {
480
  anchor = anchor_arr[0];
481
  }
482
 
483
- if( !jQuery('#' + anchor).hasClass('colomat-close') ){
484
- jQuery('#' + anchor).click();
485
- }
486
- //expand any nested parents
487
- jQuery('#' + anchor).parents('.collapseomatic_content, .collapseomatic_content_inline').each(function(index) {
488
- parent_arr = jQuery(this).attr('id').split('-');
489
- junk = parent_arr.splice(0, 1);
490
- parent = parent_arr.join('-');
491
- if( !jQuery('#' + parent).hasClass('colomat-close') ){
 
 
 
 
492
  jQuery('#' + parent).click();
 
 
 
 
 
 
493
  }
494
- })
495
  }
496
 
497
  //handle anchor links within the same page
498
  jQuery(document).on('click', 'a.expandanchor', function(event) {
499
- event.preventDefault();
500
  var fullurl = jQuery(this).attr('href');
501
- if (fullurl.match('#')) { // the URL contains an anchor
 
502
  // click the navigation item corresponding to the anchor
503
- var anchor_arr = fullurl.split('#');
 
504
  if(anchor_arr.length > 1){
505
  junk = anchor_arr.splice(0, 1);
506
  anchor = anchor_arr.join('#');
@@ -508,20 +521,22 @@ jQuery(document).ready(function() {
508
  else{
509
  anchor = anchor_arr[0];
510
  }
511
- if(!jQuery('#' + anchor).hasClass('colomat-close')){
512
- jQuery('#' + anchor).click();
513
- }
514
 
515
- //expand any nested parents
516
- jQuery('#' + anchor).parents('.collapseomatic_content, .collapseomatic_content_inline').each(function(index) {
517
- parent_arr = jQuery(this).attr('id').split('-');
518
- junk = parent_arr.splice(0, 1);
519
- parent = parent_arr.join('-');
520
- if(!jQuery('#' + parent).hasClass('colomat-close')){
521
- jQuery('#' + parent).click();
522
  }
523
 
524
- })
 
 
 
 
 
 
 
 
 
525
  }
526
  });
527
 
1
  /*!
2
+ * Collapse-O-Matic JavaSctipt v1.5.18
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2015, Twinpictures
468
  });
469
 
470
  //handle new page loads with anchor
471
+ var fullurl = document.location.toString();
472
+ // the URL contains an anchor, but not a hash-bang (#!)
473
+ if (fullurl.match('#(?!\!)')) {
474
  // click the navigation item corresponding to the anchor
475
+ var anchor_arr = fullurl.split(/#(?!\!)/);
476
  if(anchor_arr.length > 1){
477
  junk = anchor_arr.splice(0, 1);
478
  anchor = anchor_arr.join('#');
481
  anchor = anchor_arr[0];
482
  }
483
 
484
+ //if the element exists
485
+ if( jQuery('#' + anchor).length ){
486
+
487
+ //if the element isn't already expanded, expand it
488
+ if(!jQuery('#' + anchor).hasClass('colomat-close')){
489
+ jQuery('#' + anchor).click();
490
+ }
491
+
492
+ //expand any nested parents
493
+ jQuery('#' + anchor).parents('.collapseomatic_content').each(function(index) {
494
+ parent_arr = jQuery(this).attr('id').split('-');
495
+ junk = parent_arr.splice(0, 1);
496
+ parent = parent_arr.join('-');
497
  jQuery('#' + parent).click();
498
+ })
499
+
500
+ if(typeof colomatoffset !== 'undefined'){
501
+ var anchor_offset = jQuery('#' + anchor).offset();
502
+ colomatoffset = colomatoffset + anchor_offset.top;
503
+ jQuery('html, body').animate({scrollTop:colomatoffset}, 50);
504
  }
505
+ }
506
  }
507
 
508
  //handle anchor links within the same page
509
  jQuery(document).on('click', 'a.expandanchor', function(event) {
510
+ //event.preventDefault();
511
  var fullurl = jQuery(this).attr('href');
512
+ // the URL contains an anchor but not a hash-bang
513
+ if (fullurl.match('#(?!\!)')) {
514
  // click the navigation item corresponding to the anchor
515
+ var anchor_arr = fullurl.split(/#(?!\!)/);
516
+
517
  if(anchor_arr.length > 1){
518
  junk = anchor_arr.splice(0, 1);
519
  anchor = anchor_arr.join('#');
521
  else{
522
  anchor = anchor_arr[0];
523
  }
 
 
 
524
 
525
+ if( jQuery('#' + anchor).length ){
526
+ if(!jQuery('#' + anchor).hasClass('colomat-close')){
527
+ jQuery('#' + anchor).click();
 
 
 
 
528
  }
529
 
530
+ //expand any nested parents
531
+ jQuery('#' + anchor).parents('.collapseomatic_content').each(function(index) {
532
+ parent_arr = jQuery(this).attr('id').split('-');
533
+ junk = parent_arr.splice(0, 1);
534
+ parent = parent_arr.join('-');
535
+ if(!jQuery('#' + parent).hasClass('colomat-close')){
536
+ jQuery('#' + parent).click();
537
+ }
538
+ })
539
+ }
540
  }
541
  });
542
 
languages/{colomat-en_EN.mo → jquery-collapse-o-matic-en.mo} RENAMED
File without changes
languages/{colomat-en_EN.po → jquery-collapse-o-matic-en.po} RENAMED
File without changes
languages/{colomat-me.mo → jquery-collapse-o-matic-me.mo} RENAMED
File without changes
languages/{colomat-me.po → jquery-collapse-o-matic-me.po} RENAMED
File without changes
languages/{colomat.pot → jquery-collapse-o-matic.pot} RENAMED
File without changes
languages/{colomat_de.mo → jquery-collapse-o-matic_de.mo} RENAMED
File without changes
languages/{colomat_de.po → jquery-collapse-o-matic_de.po} RENAMED
File without changes
languages/{colomat_ru.mo → jquery-collapse-o-matic_ru.mo} RENAMED
File without changes
languages/{colomat_ru.po → jquery-collapse-o-matic_ru.po} RENAMED
File without changes
languages/{colomat_sr.mo → jquery-collapse-o-matic_sr.mo} RENAMED
File without changes
languages/{colomat_sr.po → jquery-collapse-o-matic_sr.po} RENAMED
File without changes
readme.txt CHANGED
@@ -4,8 +4,8 @@ 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
8
- Stable tag: 1.6.13
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -50,6 +50,12 @@ No. Not even close.
50
 
51
  == Changelog ==
52
 
 
 
 
 
 
 
53
  = 1.6.13 =
54
  * added map resize support for google maps builder
55
 
@@ -302,4 +308,4 @@ Fixed auto-expand of urls with id-anchors
302
 
303
  == Upgrade Notice ==
304
 
305
- * supports google maps builder resize function on expand
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.14
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.14 =
54
+ * hash-bang (#!) that are used in urls will not be processed as url anchors
55
+ * now checks if a url anchor is actually an existing element before trying to process it
56
+ * changed language domain to jquery-collapse-o-matic to work with WordPress’ new translation process
57
+ * updated tested up to tag to 4.3.1
58
+
59
  = 1.6.13 =
60
  * added map resize support for google maps builder
61
 
308
 
309
  == Upgrade Notice ==
310
 
311
+ * improvements to how url anchors are processed and new language domain