Changeset 10169 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/content-archive.php
- Timestamp:
- 08/13/2020 11:43:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/content-archive.php
r10131 r10169 8 8 */ 9 9 10 $topic_list = [];10 $topic_list = array(); 11 11 12 if ( wporg_post_type_is_workshop() ) {12 if ( wporg_post_type_is_workshop() ) { 13 13 $topics = get_taxonomy_values( get_the_ID(), 'topic' ); 14 14 15 if ( !empty( $topics ) ) {15 if ( ! empty( $topics ) ) { 16 16 $topic_list = explode( ',', $topics ); 17 17 } … … 20 20 ?> 21 21 22 <div class="lp-item <?php echo ( wporg_post_type_is_workshop() ? 'lp-item--full' : '' ) ?>">23 <div class="lp-item-wrap <?php echo ( wporg_post_type_is_workshop() ? 'lp-item-wrap--split' : '' ) ?>">22 <div class="lp-item <?php echo ( wporg_post_type_is_workshop() ? 'lp-item--full' : '' ); ?>"> 23 <div class="lp-item-wrap <?php echo ( wporg_post_type_is_workshop() ? 'lp-item-wrap--split' : '' ); ?>"> 24 24 <h2 class="h4"><a href="<?php echo esc_url( get_the_permalink() ); ?>"><?php the_title(); ?></a></h2> 25 25 <div class="lp-body"> 26 26 <div> 27 <p class="lp-excerpt <?php echo ( wporg_post_type_is_workshop() ? 'lp-excerpt--short' : '' ) ?>"><?php echo esc_attr( get_the_excerpt() ); ?></p>28 <?php if ( !empty( $topic_list ) ) : ?>29 <ul class="lp-topics <?php echo count( $topic_list ) > 4 ? 'lp-topics--split' : '' ; ?>">30 <?php foreach ( $topic_list as $topic ) : ?>31 <li><?php echo $topic; ?></li>27 <p class="lp-excerpt <?php echo ( wporg_post_type_is_workshop() ? 'lp-excerpt--short' : '' ); ?>"><?php echo esc_attr( get_the_excerpt() ); ?></p> 28 <?php if ( ! empty( $topic_list ) ) : ?> 29 <ul class="lp-topics <?php echo count( $topic_list ) > 4 ? 'lp-topics--split' : ''; ?>"> 30 <?php foreach ( $topic_list as $topic ) : ?> 31 <li><?php echo esc_html( $topic ); ?></li> 32 32 <?php endforeach; ?> 33 33 </ul> … … 35 35 </div> 36 36 <div class="lp-details"> 37 <ul class="lp-details-list <?php echo wporg_post_type_is_lesson() ? 'lp-details-list--split' : '' ?>"> 38 <?php 39 foreach( wporg_get_custom_taxonomies( get_the_ID() ) as $detail ) { 40 if( !empty( $detail[ 'values' ] ) ) { 41 include( locate_template( 'template-parts/component-taxonomy-item.php' ) ); 42 } 37 <ul class="lp-details-list <?php echo wporg_post_type_is_lesson() ? 'lp-details-list--split' : ''; ?>"> 38 <?php 39 foreach ( wporg_get_custom_taxonomies( get_the_ID() ) as $detail ) { 40 if ( ! empty( $detail['values'] ) ) { 41 include locate_template( 'template-parts/component-taxonomy-item.php' ); 43 42 } 43 } 44 44 ?> 45 45 </ul>
Note: See TracChangeset
for help on using the changeset viewer.