diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/widgets/four-block-widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/widgets/four-block-widget.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,162 @@ + "Four block thumbnail widget for the Home Page. Place in the 'Index Header Panel'.")); + } + + /** @see WP_Widget::widget */ + function widget($args, $instance) { + extract( $args ); + $widget_title = esc_attr($instance["widget_title"]); + + if(!($instance["post_category"])) : + $use_catId = 0; + $cat_query = ""; + else : + $use_category = $instance["post_category"]; + $use_catId = get_category_by_slug($use_category); + $cat_query = "&category_name=".$use_catId->cat_name; + endif; + //Fetch the category for the widget + if(!($instance["post_offset"])) : + $use_offset = 0; + else : + $use_offset = $instance["post_offset"]; + endif; + + //Fetch the count for the widget + if(!($instance["post_count"])) : + $post_count = 4; + else : + $post_count = $instance["post_count"]; + endif; + + $ocmx_featured = new WP_Query("showposts=$post_count&post_type=post".$cat_query); + + //Set the post Aguments and Query accordingly + $count = 0; +?> +
+

+ +
+
+ +
+ +

+

+

+

+

+

+ +

+ \ No newline at end of file