Ticket #2065: 2065.2.patch
File 2065.2.patch, 3.6 KB (added by , 7 years ago) |
---|
-
themes/wordcamp-central-2012/functions.php
714 714 return $query; 715 715 } 716 716 717 public static function the_wordcamp_date( $wordcamp_id = 0 ) {717 public static function the_wordcamp_date( $wordcamp_id = 0, $show_year = false ) { 718 718 $start_day = wcpt_get_wordcamp_start_date( $wordcamp_id, 'j' ); 719 719 $start_month = wcpt_get_wordcamp_start_date( $wordcamp_id, 'F' ); 720 720 $end_day = wcpt_get_wordcamp_end_date( $wordcamp_id, 'j' ); 721 721 $end_month = wcpt_get_wordcamp_end_date( $wordcamp_id, 'F' ); 722 722 723 if ( $show_year ){ 724 $start_year = wcpt_get_wordcamp_start_date( $wordcamp_id, 'Y' ); 725 $end_year = wcpt_get_wordcamp_end_date( $wordcamp_id, 'Y' ); 726 } 727 723 728 echo "$start_month $start_day"; 724 729 if ( $end_day ) { 730 if ( $show_year && $start_year != $end_year ) 731 echo ", $start_year"; 725 732 echo '-'; 733 726 734 if ( $start_month != $end_month ) 727 735 echo "$end_month "; 728 736 729 737 echo $end_day; 730 } 738 739 if ( $show_year ) 740 echo ', $end_year'; 741 } // $end_day 731 742 } 732 743 733 744 /** -
themes/wordcamp-central-2012/template-schedule.php
37 37 ) ) 38 38 ) ) 39 39 ) : 40 global $wcpt_template; 41 $wordcamps = WordCamp_Central_Theme::group_wordcamps_by_year( $wcpt_template->posts ); 40 42 ?> 43 <?php foreach ( $wordcamps as $year => $posts ) : ?> 44 <h3 class="wc-schedule-year"><?php echo esc_html( $year ); ?></h3> 41 45 42 <ul class="wc-schedule-list">43 <?php while ( wcpt_wordcamps() ) : wcpt_the_wordcamp(); ?>46 <ul class="wc-schedule-list"> 47 <?php foreach ( $posts as $post ) : setup_postdata( $post ); ?> 44 48 45 <li>46 <a href="<?php echo esc_url( wcpt_get_wordcamp_url() ); ?>">47 <?php if ( has_post_thumbnail() ) : ?>48 <?php the_post_thumbnail( 'wccentral-thumbnail-small', array( 'class' => 'wc-image' ) ); ?>49 <?php else : ?>50 <div class="wc-image wp-post-image wordcamp-placeholder-thumb" title="<?php the_title(); ?>"></div>51 <?php endif; ?>49 <li> 50 <a href="<?php echo esc_url( wcpt_get_wordcamp_url() ); ?>"> 51 <?php if ( has_post_thumbnail() ) : ?> 52 <?php the_post_thumbnail( 'wccentral-thumbnail-small', array( 'class' => 'wc-image' ) ); ?> 53 <?php else : ?> 54 <div class="wc-image wp-post-image wordcamp-placeholder-thumb" title="<?php the_title(); ?>"></div> 55 <?php endif; ?> 52 56 53 <h2 class="wc-title"><?php wcpt_wordcamp_title(); ?></h2>54 <span class="wc-country"><?php wcpt_wordcamp_location(); ?></span>55 <span class="wc-date">56 <?php WordCamp_Central_Theme::the_wordcamp_date(); ?>57 </span>58 </a>59 </li>57 <h2 class="wc-title"><?php wcpt_wordcamp_title(); ?></h2> 58 <span class="wc-country"><?php wcpt_wordcamp_location(); ?></span> 59 <span class="wc-date"> 60 <?php WordCamp_Central_Theme::the_wordcamp_date(); ?> 61 </span> 62 </a> 63 </li> 60 64 61 <?php endwhile; // wcpt_wordcamps ?> 62 </ul> 65 <?php endforeach; // $posts as post ?> 66 </ul> 67 <?php wp_reset_postdata(); endforeach; ?> 68 63 69 <a href="<?php echo home_url( '/schedule/past-wordcamps/' ); ?>" class="wc-schedule-more">Past WordCamps →</a> 64 70 65 71 <?php endif; // wcpt_has_wordcamps ?>