Collapse-O-Matic - Version 1.7.6

Version Description

  • integrated collapse-commander expand templates
  • fully tested with WordPress 4.8.1
Download this release

Release Info

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

Code changes from version 1.7.5 to 1.7.6

Files changed (2) hide show
  1. collapse-o-matic.php +30 -2
  2. readme.txt +9 -4
collapse-o-matic.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Collapse-O-Matic
4
  Text Domain: jquery-collapse-o-matic
5
  Plugin URI: https://plugins.twinpictures.de/plugins/collapse-o-matic/
6
  Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
7
- Version: 1.7.5
8
  Author: twinpictures, baden03
9
  Author URI: https://twinpictures.de/
10
  License: GPL2
@@ -29,7 +29,7 @@ class WP_Collapse_O_Matic {
29
  * Current version
30
  * @var string
31
  */
32
- var $version = '1.7.5';
33
 
34
  /**
35
  * Used as prefix for options entry
@@ -179,6 +179,7 @@ class WP_Collapse_O_Matic {
179
  extract(shortcode_atts(array(
180
  'title' => '',
181
  'cid' => $options['cid'],
 
182
  'swaptitle' => '',
183
  'alt' => '',
184
  'swapalt' => '',
@@ -210,6 +211,8 @@ class WP_Collapse_O_Matic {
210
  'animation_effect' => '',
211
  'duration' => '',
212
  ), $atts, 'expand'));
 
 
213
  if(!empty($cid)){
214
  $args = array(
215
  'post_type' => 'expand-element',
@@ -242,6 +245,31 @@ class WP_Collapse_O_Matic {
242
  wp_reset_postdata();
243
  }
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  //content filtering
246
  if(empty($filter) || $filter == 'false'){
247
  $content = do_shortcode($content);
4
  Text Domain: jquery-collapse-o-matic
5
  Plugin URI: https://plugins.twinpictures.de/plugins/collapse-o-matic/
6
  Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
7
+ Version: 1.7.6
8
  Author: twinpictures, baden03
9
  Author URI: https://twinpictures.de/
10
  License: GPL2
29
  * Current version
30
  * @var string
31
  */
32
+ var $version = '1.7.6';
33
 
34
  /**
35
  * Used as prefix for options entry
179
  extract(shortcode_atts(array(
180
  'title' => '',
181
  'cid' => $options['cid'],
182
+ 'template_id' => '',
183
  'swaptitle' => '',
184
  'alt' => '',
185
  'swapalt' => '',
211
  'animation_effect' => '',
212
  'duration' => '',
213
  ), $atts, 'expand'));
214
+
215
+ //collapse commander
216
  if(!empty($cid)){
217
  $args = array(
218
  'post_type' => 'expand-element',
245
  wp_reset_postdata();
246
  }
247
 
248
+ //expand templates from collapse commander
249
+ if(!empty($template_id)){
250
+ $args = array(
251
+ 'post_type' => 'expand-template',
252
+ 'p' => $template_id,
253
+ );
254
+ $query_commander = new WP_Query( $args );
255
+ if ( $query_commander->have_posts() ) {
256
+ while ( $query_commander->have_posts() ) {
257
+ $query_commander->the_post();
258
+ $meta_values = get_post_meta( $template_id );
259
+ foreach($meta_values as $key => $value){
260
+ if(!empty($value) && $key[0] != '_'){
261
+ //var_dump( substr($key, 9), $value[0]);
262
+ ${substr($key, 9)} = $value[0];
263
+ }
264
+ }
265
+ if(!empty($highlander) && !empty($rel)){
266
+ $rel .= '-highlander';
267
+ }
268
+ }
269
+ }
270
+ wp_reset_postdata();
271
+ }
272
+
273
  //content filtering
274
  if(empty($filter) || $filter == 'false'){
275
  $content = do_shortcode($content);
readme.txt CHANGED
@@ -3,9 +3,9 @@
3
  Contributors: twinpictures, baden03
4
  Donate link: https://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.8
8
- Stable tag: 1.7.5
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -50,6 +50,10 @@ No. Not even close.
50
 
51
  == Changelog ==
52
 
 
 
 
 
53
  = 1.7.5 =
54
  * fully tested with WordPress 4.8
55
 
@@ -338,4 +342,5 @@ Fixed auto-expand of urls with id-anchors
338
  * The plug-in came to be.
339
 
340
  == Upgrade Notice ==
341
- fully tested with WordPress 4.8
 
3
  Contributors: twinpictures, baden03
4
  Donate link: https://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.4
7
+ Tested up to: 4.8.1
8
+ Stable tag: 1.7.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
50
 
51
  == Changelog ==
52
 
53
+ = 1.7.6 =
54
+ * integrated collapse-commander expand templates
55
+ * fully tested with WordPress 4.8.1
56
+
57
  = 1.7.5 =
58
  * fully tested with WordPress 4.8
59
 
342
  * The plug-in came to be.
343
 
344
  == Upgrade Notice ==
345
+ * integrated collapse-commander expand templates
346
+ * fully tested with WordPress 4.8.1