public function theme_monthly_archive_options( $theme, $full_names = TRUE, $type = 'entry', $status = 'published' ) { $results = Posts::get( array( 'content_type' => $type, 'status' => $status, 'month_cts' => 1) ); foreach ( $results as $result ) { // add leading zeros $result->month= str_pad( $result->month, 2, 0, STR_PAD_LEFT ); // what format do we want to show the month in? if( $full_names ) { $display_month = HabariDateTime::date_create()->set_date( $result->year, $result->month, 1)->get( 'F' ); } else { $display_month = HabariDateTime::date_create()->set_date( $result->year, $result->month, 1)->get( 'M' ); } // do we want to show the count of posts? $archives[] = ''; } return implode( "\n", array_reverse( $archives ) ); }