Making WordPress.org


Ignore:
Timestamp:
08/13/2020 11:43:14 PM (6 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

https://github.com/WordPress/learn/compare/1accd3db38a60230689bdc157f9e82081d35d163...38e7793fd20434d72ca898988d017ba2009fb677

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  
    88 */
    99
    10 $topic_list = [];
     10$topic_list = array();
    1111
    12 if( wporg_post_type_is_workshop() ) {
     12if ( wporg_post_type_is_workshop() ) {
    1313    $topics = get_taxonomy_values( get_the_ID(), 'topic' );
    1414
    15     if( !empty( $topics ) ) {
     15    if ( ! empty( $topics ) ) {
    1616        $topic_list = explode( ',', $topics );
    1717    }
     
    2020?>
    2121
    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' : '' ); ?>">
    2424        <h2 class="h4"><a href="<?php echo esc_url( get_the_permalink() ); ?>"><?php the_title(); ?></a></h2>
    2525        <div class="lp-body">
    2626            <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>
    3232                    <?php endforeach; ?>
    3333                    </ul>
     
    3535            </div>
    3636            <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' );
    4342                        }
     43                    }
    4444                    ?>
    4545                </ul>
Note: See TracChangeset for help on using the changeset viewer.