Version Description
- fixed filter_content toggle bug.
- even if content is not to be filtered, it will still be passed through do_shortcode function
Download this release
Release Info
Developer | baden03 |
Plugin | Collapse-O-Matic |
Version | 1.6.8 |
Comparing to | |
See all releases |
Code changes from version 1.6.7 to 1.6.8
- collapse-o-matic.php +28 -10
- readme.txt +9 -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.6.
|
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.
|
34 |
|
35 |
/**
|
36 |
* Used as prefix for options entry
|
@@ -199,7 +199,6 @@ class WP_Collapse_O_Matic {
|
|
199 |
'filter' => $options['filter_content'],
|
200 |
'tabindex' => $options['tabindex']
|
201 |
), $atts));
|
202 |
-
|
203 |
if(!empty($cid)){
|
204 |
$args = array(
|
205 |
'post_type' => 'expand-element',
|
@@ -227,20 +226,25 @@ class WP_Collapse_O_Matic {
|
|
227 |
|
228 |
//content
|
229 |
if(get_the_content()){
|
230 |
-
if(empty($filter)){
|
231 |
$content = get_the_content();
|
232 |
}else{
|
233 |
$content = apply_filters( 'the_content', get_the_content() );
|
234 |
-
|
235 |
}
|
236 |
}
|
237 |
}
|
238 |
}
|
239 |
wp_reset_postdata();
|
240 |
}
|
241 |
-
else
|
242 |
-
$
|
243 |
-
|
|
|
|
|
|
|
|
|
|
|
244 |
}
|
245 |
|
246 |
$ewo = '';
|
@@ -289,7 +293,14 @@ class WP_Collapse_O_Matic {
|
|
289 |
}
|
290 |
|
291 |
if($excerpt){
|
292 |
-
$excerpt =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
|
294 |
if($targpos == 'inline'){
|
295 |
$excerpt .= $eDiv;
|
@@ -303,7 +314,14 @@ class WP_Collapse_O_Matic {
|
|
303 |
}
|
304 |
//swapexcerpt
|
305 |
if($swapexcerpt !== false){
|
306 |
-
$swapexcerpt =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
$nibble .= '<'.$excerpttag.' id="swapexcerpt-'.$id.'" style="display:none;">'.$swapexcerpt.'</'.$excerpttag.'>';
|
308 |
}
|
309 |
}
|
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.8
|
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.8';
|
34 |
|
35 |
/**
|
36 |
* Used as prefix for options entry
|
199 |
'filter' => $options['filter_content'],
|
200 |
'tabindex' => $options['tabindex']
|
201 |
), $atts));
|
|
|
202 |
if(!empty($cid)){
|
203 |
$args = array(
|
204 |
'post_type' => 'expand-element',
|
226 |
|
227 |
//content
|
228 |
if(get_the_content()){
|
229 |
+
if(empty($filter) || $filter == 'false'){
|
230 |
$content = get_the_content();
|
231 |
}else{
|
232 |
$content = apply_filters( 'the_content', get_the_content() );
|
233 |
+
$content = str_replace( ']]>', ']]>', $content );
|
234 |
}
|
235 |
}
|
236 |
}
|
237 |
}
|
238 |
wp_reset_postdata();
|
239 |
}
|
240 |
+
else{
|
241 |
+
if(empty($filter) || $filter == 'false'){
|
242 |
+
$content = do_shortcode($content);
|
243 |
+
}
|
244 |
+
else{
|
245 |
+
$content = apply_filters( 'the_content', $content );
|
246 |
+
$content = str_replace( ']]>', ']]>', $content );
|
247 |
+
}
|
248 |
}
|
249 |
|
250 |
$ewo = '';
|
293 |
}
|
294 |
|
295 |
if($excerpt){
|
296 |
+
$excerpt = str_replace($placeholder_arr, $swapout_arr, $excerpt);
|
297 |
+
if(empty($filter) || $filter == 'false'){
|
298 |
+
$excerpt = do_shortcode($excerpt);
|
299 |
+
}
|
300 |
+
else{
|
301 |
+
$excerpt = apply_filters( 'the_content', $excerpt );
|
302 |
+
$excerpt = str_replace( ']]>', ']]>', $excerpt );
|
303 |
+
}
|
304 |
|
305 |
if($targpos == 'inline'){
|
306 |
$excerpt .= $eDiv;
|
314 |
}
|
315 |
//swapexcerpt
|
316 |
if($swapexcerpt !== false){
|
317 |
+
$swapexcerpt = str_replace($placeholder_arr, $swapout_arr, $swapexcerpt);
|
318 |
+
if(empty($filter) || $filter == 'false'){
|
319 |
+
$swapexcerpt = do_shortcode($swapexcerpt);
|
320 |
+
}
|
321 |
+
else{
|
322 |
+
$swapexcerpt = apply_filters( 'the_content', $swapexcerpt );
|
323 |
+
$swapexcerpt = str_replace( ']]>', ']]>', $swapexcerpt );
|
324 |
+
}
|
325 |
$nibble .= '<'.$excerpttag.' id="swapexcerpt-'.$id.'" style="display:none;">'.$swapexcerpt.'</'.$excerpttag.'>';
|
326 |
}
|
327 |
}
|
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.9
|
7 |
Tested up to: 4.2
|
8 |
-
Stable tag: 1.6.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -50,6 +50,10 @@ No. Not even close.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
|
|
53 |
= 1.6.7 =
|
54 |
* added filter_content to the options page, defaults to off
|
55 |
|
@@ -282,6 +286,10 @@ Fixed auto-expand of urls with id-anchors
|
|
282 |
|
283 |
== Upgrade Notice ==
|
284 |
|
|
|
|
|
|
|
|
|
285 |
= 1.6.7 =
|
286 |
* added filter_content to the options page, defaults to off
|
287 |
|
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.2
|
8 |
+
Stable tag: 1.6.8
|
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.8 =
|
54 |
+
* fixed filter_content toggle bug.
|
55 |
+
* even if content is not to be filtered, it will still be passed through do_shortcode function
|
56 |
+
|
57 |
= 1.6.7 =
|
58 |
* added filter_content to the options page, defaults to off
|
59 |
|
286 |
|
287 |
== Upgrade Notice ==
|
288 |
|
289 |
+
= 1.6.8 =
|
290 |
+
* fixed filter_content toggle bug.
|
291 |
+
* even if content is not to be filtered, it will still be passed through do_shortcode function
|
292 |
+
|
293 |
= 1.6.7 =
|
294 |
* added filter_content to the options page, defaults to off
|
295 |
|