List category posts - Version 0.16.1

Version Description

  • Fixed shortcode nesting.
Download this release

Release Info

Developer fernandobt
Plugin Icon 128x128 List category posts
Version 0.16.1
Comparing to
See all releases

Code changes from version 0.16 to 0.16.1

Files changed (2) hide show
  1. list_cat_posts.php +6 -5
  2. readme.txt +5 -2
list_cat_posts.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: List category posts
4
  Plugin URI: http://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/
5
  Description: List Category Posts allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
6
- Version: 0.16
7
  Author: Fernando Briano
8
  Author URI: http://picandocodigo.net/
9
  */
@@ -170,7 +170,7 @@ function lcp_display_post($single, $atts){
170
  }
171
 
172
  if ($atts['content']=='yes' && $single->post_content){
173
- $lcp_display_output.= lcp_content($single); // line tweaked to output filtered content
174
  }
175
 
176
  if ($atts['excerpt']=='yes' && !($atts['content']=='yes' && $single->post_content) ){
@@ -196,12 +196,13 @@ function lcp_showdate($single, $dateformat){
196
 
197
  function lcp_content($single){
198
  $lcp_content = $single->post_content;
 
199
  //Added to stop a post with catlist to display an infinite loop of catlist shortcode parsing
200
- if (preg_match("/\[catlist.*\]/", $lcp_content, $regmatch)){
201
  foreach ($regmatch as $match){
202
  $lcp_content = str_replace($match, '(...)',$lcp_content);
203
  }
204
- }
205
  $lcp_content = apply_filters('the_content', $lcp_content); // added to parse shortcodes
206
  $lcp_content = str_replace(']]>', ']]&gt', $lcp_content); // added to parse shortcodes
207
  return '<p>' . $lcp_content . '</p>';
@@ -255,7 +256,7 @@ function lcp_display_customfields($custom_key, $post_id){
255
  $my_custom_field = $custom_fields[$something];
256
  if (sizeof($my_custom_field) > 0 ):
257
  foreach ( $my_custom_field as $key => $value ){
258
- $lcp_customs .= $something. " : " . $value . "<br/>";
259
  }
260
  endif;
261
  }
3
  Plugin Name: List category posts
4
  Plugin URI: http://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/
5
  Description: List Category Posts allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
6
+ Version: 0.16.1
7
  Author: Fernando Briano
8
  Author URI: http://picandocodigo.net/
9
  */
170
  }
171
 
172
  if ($atts['content']=='yes' && $single->post_content){
173
+ $lcp_display_output.= lcp_content($single);
174
  }
175
 
176
  if ($atts['excerpt']=='yes' && !($atts['content']=='yes' && $single->post_content) ){
196
 
197
  function lcp_content($single){
198
  $lcp_content = $single->post_content;
199
+ //Need to put some more thought on this!
200
  //Added to stop a post with catlist to display an infinite loop of catlist shortcode parsing
201
+ /*if (preg_match("/\[catlist.*\]/", $lcp_content, $regmatch)){
202
  foreach ($regmatch as $match){
203
  $lcp_content = str_replace($match, '(...)',$lcp_content);
204
  }
205
+ }*/
206
  $lcp_content = apply_filters('the_content', $lcp_content); // added to parse shortcodes
207
  $lcp_content = str_replace(']]>', ']]&gt', $lcp_content); // added to parse shortcodes
208
  return '<p>' . $lcp_content . '</p>';
256
  $my_custom_field = $custom_fields[$something];
257
  if (sizeof($my_custom_field) > 0 ):
258
  foreach ( $my_custom_field as $key => $value ){
259
+ $lcp_customs .= "<div class=\"lcp-customfield\">" . $something. " : " . $value . "</div>";
260
  }
261
  endif;
262
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: fernandobt
3
  Donate Link: http://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/
4
  Tags: list, categories, posts, cms
5
  Requires at least: 2.8
6
- Tested up to: 3.0.1
7
- Stable tag: 0.16
8
 
9
  == Description ==
10
  List Category Posts is a simple WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments.
@@ -121,6 +121,9 @@ Template system has changed. Custom templates should be stored in wordpress them
121
 
122
  == Changelog ==
123
 
 
 
 
124
  = 0.16 =
125
  * Changed STYLESHEETPATH to TEMPLATEPATH to point to the parent theme.
126
  * Added support to display custom fields. (http://picod.net/wp03)
3
  Donate Link: http://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/
4
  Tags: list, categories, posts, cms
5
  Requires at least: 2.8
6
+ Tested up to: 3.1
7
+ Stable tag: 0.16.1
8
 
9
  == Description ==
10
  List Category Posts is a simple WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments.
121
 
122
  == Changelog ==
123
 
124
+ = 0.16.1 =
125
+ * Fixed shortcode nesting.
126
+
127
  = 0.16 =
128
  * Changed STYLESHEETPATH to TEMPLATEPATH to point to the parent theme.
129
  * Added support to display custom fields. (http://picod.net/wp03)