function widget($args, $instance) { global $post; extract($args); $catid = apply_filters('catid', $instance['catid']); $newstitle = apply_filters('newstitle', $instance['newstitle']); $numnews = apply_filters('numnews', $instance['numnews']); if ($numnews == "") { $numnews = 3; } if ($newstitle == "") { $newstitle = "Latest News"; } echo $before_widget; echo $title = $before_title . $newstitle . $after_title; echo imediapixel_latestnews($title, $catid, $numnews, "date", 12, "square", 20); ?> <div class="clear"></div> <?php wp_reset_query(); echo $after_widget; }
function imediapixel_latestblog_shortcode($atts, $content = null) { global $post; extract(shortcode_atts(array("cat" => '', "num" => '', "orderby" => '', "text_limit" => '', "image_style" => '', "margin_bottom" => ''), $atts)); $text_limit = $text_limit ? $text_limit : 12; return imediapixel_latestnews("", $cat, $num, $orderby, $text_limit, $image_style, $margin_bottom); }