diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/widgets/feature-post-widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/widgets/feature-post-widget.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,126 @@ + "Features Posts widget for the Home Page. Place only in the 'Header Panel'.")); + } + + /** @see WP_Widget::widget */ + function widget($args, $instance) { + extract( $args ); + if(!($instance["post_category"])) : + $use_catId = 0; + else : + $use_category = $instance["post_category"]; + $use_catId = get_category_by_slug($use_category); + endif; + //Fetch the category for the widget + $post_args = array('numberposts' => '5', 'offest' => 0, 'orderby' => 'post_date', 'order' => 'DESC','cat' => $use_catId->term_id); + //Set the post Aguments and Query accordingly + $count = 1; + $ocmx_featured = get_posts($post_args); +?> +
+ +
+

post_date)); ?>

+

+ ID); ?> + post_title; ?> +

+
ID;?>
+
+ +
+
+ ID, "main_video", true); + $get_thumbnail = get_post_meta($post->ID, "other_media", true); + // Set our category + $category = get_the_category(); + // If we haven't used our custom image input, search for the first image in the post + $post_image = ""; + if($get_thumbnail == "" && (get_option("ocmx_auto_home_images") && get_option("ocmx_auto_home_images") !== "no")) : + $post_image = fetch_post_image($post->ID, "640", "2000"); + endif; + ?> +
class="no_display" id="feature-post-media-ID; ?>"> + + <?php the_title(); ?> + +
+ +
+ +
+ + + + +

+ \ No newline at end of file