/**
  * Filters by date
  *
  * @param  integer $start_date
  * @param  integer $end_date
  * @return string
  */
 public static function date_filter($where = '')
 {
     // Build where statement
     $where .= vsprintf(" AND post_date >= '%s' AND post_date <= '%s'", array(date('Y-m-d', self::$dates['from_date']), date('Y-m-d', self::$dates['to_date'])));
     // Reset dates
     self::$dates = array();
     return $where;
 }
示例#2
0
<div class="posts widget row">
    <?php 
/**
 * This is a more complex widget and the templates need to be handled a little differently
 */
echo Posts_Widget::render(dirname(__FILE__), $args['id'], $widget['layout'], $widget);
?>
    <div class="clear"></div>
</div>