List category posts - Version 0.36.2

Version Description

  • Fixed category_count for several categories.
Download this release

Release Info

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

Code changes from version 0.36.1 to 0.36.2

Files changed (3) hide show
  1. include/CatList.php +3 -3
  2. list_cat_posts.php +1 -1
  3. readme.txt +5 -1
include/CatList.php CHANGED
@@ -236,7 +236,7 @@ class CatList{
236
  $cat_title = get_cat_name($lcp_id);
237
  array_push($link, '<a href="' . $cat_link . '" title="' . $cat_title . '">' .
238
  ($this->lcp_not_empty('catlink_string') ? $this->params['catlink_string'] : $cat_title) .
239
- $this->get_category_count() . '</a>');
240
  }
241
 
242
  return implode(", ", $link);
@@ -260,9 +260,9 @@ class CatList{
260
 
261
 
262
 
263
- public function get_category_count(){
264
  if($this->lcp_not_empty('category_count') && $this->params['category_count'] == 'yes'):
265
- return ' (' . get_category($this->lcp_category_id)->category_count . ')';
266
  endif;
267
  }
268
 
236
  $cat_title = get_cat_name($lcp_id);
237
  array_push($link, '<a href="' . $cat_link . '" title="' . $cat_title . '">' .
238
  ($this->lcp_not_empty('catlink_string') ? $this->params['catlink_string'] : $cat_title) .
239
+ $this->get_category_count($lcp_id) . '</a>');
240
  }
241
 
242
  return implode(", ", $link);
260
 
261
 
262
 
263
+ public function get_category_count($id){
264
  if($this->lcp_not_empty('category_count') && $this->params['category_count'] == 'yes'):
265
+ return ' (' . get_category($id)->category_count . ')';
266
  endif;
267
  }
268
 
list_cat_posts.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: List category posts
4
  Plugin URI: https://github.com/picandocodigo/List-Category-Posts
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.36.1
7
  Author: Fernando Briano
8
  Author URI: http://picandocodigo.net/
9
 
3
  Plugin Name: List category posts
4
  Plugin URI: https://github.com/picandocodigo/List-Category-Posts
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.36.2
7
  Author: Fernando Briano
8
  Author URI: http://picandocodigo.net/
9
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate Link: http://picandocodigo.net/programacion/wordpress/list-category-posts
4
  Tags: list, categories, posts, cms
5
  Requires at least: 3.3
6
  Tested up to: 3.7.1
7
- Stable tag: 0.36.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -274,6 +274,10 @@ Template system has changed. Custom templates should be stored in WordPress them
274
 
275
  == Changelog ==
276
 
 
 
 
 
277
  = 0.36.1 =
278
 
279
  * Fixed catlink to display titles for all the categories when using more than one category.
4
  Tags: list, categories, posts, cms
5
  Requires at least: 3.3
6
  Tested up to: 3.7.1
7
+ Stable tag: 0.36.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
274
 
275
  == Changelog ==
276
 
277
+ = 0.36.2 =
278
+
279
+ * Fixed category_count for several categories.
280
+
281
  = 0.36.1 =
282
 
283
  * Fixed catlink to display titles for all the categories when using more than one category.