Skip to content

Instantly share code, notes, and snippets.

@scragz
Created January 20, 2011 05:56
Show Gist options
  • Save scragz/787480 to your computer and use it in GitHub Desktop.
Save scragz/787480 to your computer and use it in GitHub Desktop.
<?php
public function output( $post_object, $is_new_day = 1, $reverse = 1 ) {
if ( !empty( $this->asides ) && $is_new_day ) {
if ( $reverse )
$this->asides = array_reverse($this->asides);
?>
<article id="post-aside-<?php $this->asides[0]->post_date; ?>" class="aside hentry">
<?php
foreach ( $this->asides as $post ) {
?>
<?php echo '<div id="post-' . $post->ID . '" class="wp_entry"><header class="wp_entry_aside_meta"><a href="' . get_permalink($post->ID) . '"><span class="meta-nav">' . get_the_time('', $post) . ' &raquo;</span></a></header>' . wptexturize($post->post_content) . '</div>' ?>
<?php
}
?>
</article>
<?php
$this->previous_day = $this->set_date( $post_object->post_date );
$this->reset(); // Clear the array for next day
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment