Changeset 10169 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/component-lesson-filters.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/component-lesson-filters.php
r10142 r10169 1 1 <?php 2 2 $terms = get_terms( array( 3 'taxonomy' => 'wporg_lesson_category',3 'taxonomy' => 'wporg_lesson_category', 4 4 'hide_empty' => false, 5 5 ) ); … … 9 9 10 10 <div class="wp-filter"> 11 <ul class="filter-links">12 <li>13 <a href="<?php echo esc_url( get_post_type_archive_link( 'lesson-plan' ) )?>" class="<?php echo ( 'all' === $current_term ) ? 'current' : ''; ?>">14 <?php_e( 'All', 'wporg-learn' ); ?>15 </a>16 </li>17 <?php foreach ( $terms as $term) : ?>18 <li>19 <a href="<?php echo get_term_link( $term, 'wporg_lesson_category' ); ?>" class="<?php echo ( $term->slug === $current_term ) ? 'current' : ''; ?>">20 <?php echo esc_html( $term->name ); ?>21 </a>22 </li>23 <?php endforeach; ?>24 </ul>11 <ul class="filter-links"> 12 <li> 13 <a href="<?php echo esc_url( get_post_type_archive_link( 'lesson-plan' ) ); ?>" class="<?php echo ( 'all' === $current_term ) ? 'current' : ''; ?>"> 14 <?php esc_html_e( 'All', 'wporg-learn' ); ?> 15 </a> 16 </li> 17 <?php foreach ( $terms as $t ) : ?> 18 <li> 19 <a href="<?php echo esc_url( get_term_link( $t, 'wporg_lesson_category' ) ); ?>" class="<?php echo ( $t->slug === $current_term ) ? 'current' : ''; ?>"> 20 <?php echo esc_html( $t->name ); ?> 21 </a> 22 </li> 23 <?php endforeach; ?> 24 </ul> 25 25 </div>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)