Version Description
Download this release
Release Info
Developer | ZephyrWest |
Plugin | Category Posts Widget |
Version | 2.2 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.2
- cat-posts.php +2 -2
- readme.txt +1 -1
cat-posts.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Category Posts Widget
|
|
4 |
Plugin URI: http://jameslao.com/2009/07/29/category-posts-widget-2-0/
|
5 |
Description: Adds a widget that can display a specified number of posts from a single category. Can also set how many widgets to show.
|
6 |
Author: James Lao
|
7 |
-
Version: 2.
|
8 |
Author URI: http://jameslao.com/
|
9 |
*/
|
10 |
|
@@ -18,6 +18,7 @@ function CategoryPosts() {
|
|
18 |
* Displays category posts widget on blog.
|
19 |
*/
|
20 |
function widget($args, $instance) {
|
|
|
21 |
extract( $args );
|
22 |
|
23 |
// If not title, use the name of the category.
|
@@ -31,7 +32,6 @@ function widget($args, $instance) {
|
|
31 |
|
32 |
// Get array of post info.
|
33 |
query_posts("showposts=" . $instance["num"] . "&cat=" . $instance["cat"]);
|
34 |
-
global $post, $wp_query; // So we can get the post ID
|
35 |
|
36 |
echo $before_widget;
|
37 |
|
4 |
Plugin URI: http://jameslao.com/2009/07/29/category-posts-widget-2-0/
|
5 |
Description: Adds a widget that can display a specified number of posts from a single category. Can also set how many widgets to show.
|
6 |
Author: James Lao
|
7 |
+
Version: 2.2
|
8 |
Author URI: http://jameslao.com/
|
9 |
*/
|
10 |
|
18 |
* Displays category posts widget on blog.
|
19 |
*/
|
20 |
function widget($args, $instance) {
|
21 |
+
global $post, $wp_query;
|
22 |
extract( $args );
|
23 |
|
24 |
// If not title, use the name of the category.
|
32 |
|
33 |
// Get array of post info.
|
34 |
query_posts("showposts=" . $instance["num"] . "&cat=" . $instance["cat"]);
|
|
|
35 |
|
36 |
echo $before_widget;
|
37 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://jameslao.com/
|
|
4 |
Tags: category, posts, widget
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.8.2
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
Adds a widget that shows the most recent posts in a single category.
|
10 |
|
4 |
Tags: category, posts, widget
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.8.2
|
7 |
+
Stable tag: 2.2
|
8 |
|
9 |
Adds a widget that shows the most recent posts in a single category.
|
10 |
|