Version Description
- Added slug and name to the fetching of category id from previous update.
Download this release
Release Info
Developer | fernandobt |
Plugin | List category posts |
Version | 0.18.1 |
Comparing to | |
See all releases |
Code changes from version 0.18 to 0.18.1
- include/CatList.php +7 -1
- list_cat_posts.php +1 -1
- readme.txt +4 -1
include/CatList.php
CHANGED
@@ -56,8 +56,14 @@ class CatList{
|
|
56 |
* by Eric Celeste / http://eric.clst.org
|
57 |
*/
|
58 |
private function get_category_id_by_name($cat_name){
|
|
|
|
|
|
|
|
|
59 |
$term = get_term_by('name', $cat_name, 'category');
|
60 |
-
|
|
|
|
|
61 |
}
|
62 |
|
63 |
public function get_category_id(){
|
56 |
* by Eric Celeste / http://eric.clst.org
|
57 |
*/
|
58 |
private function get_category_id_by_name($cat_name){
|
59 |
+
//We check if the name gets the category id, if not, we check the slug.
|
60 |
+
$term = get_term_by('name', $cat_name, 'category');
|
61 |
+
|
62 |
+
if (!$term):
|
63 |
$term = get_term_by('name', $cat_name, 'category');
|
64 |
+
endif;
|
65 |
+
|
66 |
+
return $term->term_id;
|
67 |
}
|
68 |
|
69 |
public function get_category_id(){
|
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.18
|
7 |
Author: Fernando Briano
|
8 |
Author URI: http://picandocodigo.net/
|
9 |
*/
|
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.18.1
|
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: 2.8
|
6 |
Tested up to: 3.1
|
7 |
-
Stable tag: 0.18
|
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.
|
@@ -137,6 +137,9 @@ Template system has changed. Custom templates should be stored in WordPress them
|
|
137 |
|
138 |
== Changelog ==
|
139 |
|
|
|
|
|
|
|
140 |
= 0.18 =
|
141 |
* Fixed category id bug. Reported and fixed by Eric Celeste / http://eric.clst.org, thanks!
|
142 |
* Improved template system a liitle bit, now you can pass an HTML tag and a CSS class to sorround each field on your template.
|
4 |
Tags: list, categories, posts, cms
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.1
|
7 |
+
Stable tag: 0.18.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.
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= 0.18.1 =
|
141 |
+
* Added slug and name to the fetching of category id from previous update.
|
142 |
+
|
143 |
= 0.18 =
|
144 |
* Fixed category id bug. Reported and fixed by Eric Celeste / http://eric.clst.org, thanks!
|
145 |
* Improved template system a liitle bit, now you can pass an HTML tag and a CSS class to sorround each field on your template.
|