Changeset 12096 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/archive-lesson-plan.php
- Timestamp:
- 09/28/2022 11:18:13 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/archive-lesson-plan.php
r12095 r12096 29 29 <hr> 30 30 31 <div class="row align-middle between section-lp_description"> 32 <p class="section-lp_text"> 33 <?php esc_html_e( 'Want to help others learn about WordPress? Read through, use, and remix these lesson plans.', 'wporg-learn' ); ?> 34 </p> 35 <?php 36 set_query_var( 'post_type', 'lesson-plan' ); 37 get_template_part( 'template-parts/component', 'archive-search' ); 38 ?> 31 <div class="section-lp_description"> 32 <div class="row align-middle between gutters"> 33 <p class="section-lp_text col-8"> 34 <?php esc_html_e( 'Want to help others learn about WordPress? Read through, use, and remix these lesson plans.', 'wporg-learn' ); ?> 35 </p> 36 <?php 37 set_query_var( 'post_type', 'lesson-plan' ); 38 get_template_part( 'template-parts/component', 'archive-search' ); 39 ?> 40 </div> 39 41 </div> 40 42 … … 48 50 ) ); 49 51 ?> 50 <div class="row lp-taxonomy categories"> 52 <div class="lp-taxonomy"> 53 <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Topic', 'wporg-learn' ); ?></h2> 54 <div class="lp-taxonomy-description"><?php echo esc_html__( 'Browse lesson plans by their high-level topic.', 'wporg-learn' ); ?></div> 51 55 <div class="card-grid card-grid_4"> 52 <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Topic', 'wporg-learn' ); ?></h2>53 <div class="lp-taxonomy-description"><?php echo esc_html__( 'Browse lesson plans by their high-level topic.', 'wporg-learn' ); ?></div>54 56 <?php foreach ( $categories as $category ) : 55 57 $is_sticky = get_term_meta( $category->term_id, 'sticky', true ); 56 58 if ( $is_sticky ) : 57 59 ?> 58 <div class="card"> 59 <a href="<?php echo esc_url( get_term_link( $category ) ); ?>"> 60 <?php 61 $category_icon = get_term_meta( $category->term_id, 'dashicon-class', true ) ?? 'wordpress-alt'; 62 ?> 63 <div class="icon"> 64 <span class="dashicons dashicons-<?php echo esc_attr( $category_icon ); ?>"></span> 60 <a class="card button" href="<?php echo esc_url( get_term_link( $category ) ); ?>"> 61 <?php $category_icon = get_term_meta( $category->term_id, 'dashicon-class', true ) ?? 'wordpress-alt'; ?> 62 <div> 63 <span aria-hidden="true" class="dashicons dashicons-<?php echo esc_attr( $category_icon ); ?>"></span> 65 64 </div> 66 < p class="taxonomy-title"><?php echo esc_html( $category->name ); ?></p>65 <?php echo esc_html( $category->name ); ?> 67 66 </a> 68 </div>69 67 <?php 70 68 endif; … … 79 77 ) ); 80 78 ?> 81 <div class="row lp-taxonomy"> 79 <div class="lp-taxonomy"> 80 <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Audience', 'wporg-learn' ); ?></h2> 81 <div class="lp-taxonomy-description"><?php echo esc_html__( "Browse lesson plans by the audience they're intended for.", 'wporg-learn' ); ?></div> 82 82 <div class="card-grid card-grid_4"> 83 <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Audience', 'wporg-learn' ); ?></h2>84 <div class="lp-taxonomy-description"><?php echo esc_html__( "Browse lesson plans by the audience they're intended for.", 'wporg-learn' ); ?></div>85 83 <?php foreach ( $audiences as $audience ) : 86 84 $is_sticky = get_term_meta( $audience->term_id, 'sticky', true ); 87 85 if ( $is_sticky ) : 88 86 ?> 89 <div class="card"> 90 <a href="<?php echo esc_url( get_term_link( $audience ) ); ?>"> 91 <div class="icon"> 87 <a class="card button" href="<?php echo esc_url( get_term_link( $audience ) ); ?>"> 88 <div> 92 89 <?php 93 90 $audience_icon = get_term_meta( $audience->term_id, 'dashicon-class', true ) ?? 'wordpress-alt'; 94 91 ?> 95 <span class="dashicons dashicons-<?php echo esc_attr( $audience_icon ); ?>"></span>92 <span aria-hidden="true" class="dashicons dashicons-<?php echo esc_attr( $audience_icon ); ?>"></span> 96 93 </div> 97 < p class="taxonomy-title"><?php echo esc_html( $audience->name ); ?></p>94 <?php echo esc_html( $audience->name ); ?> 98 95 </a> 99 </div>100 96 <?php 101 97 endif; … … 105 101 106 102 <div class="row lp-two-col between"> 107 <div class="lp- taxonomy">103 <div class="lp-level"> 108 104 <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Level', 'wporg-learn' ); ?></h2> 109 105 <div class="lp-taxonomy-description"><?php echo esc_html__( 'What experience partipants need.', 'wporg-learn' ); ?></div> … … 116 112 117 113 foreach ( $levels as $level ) : ?> 118 <li><a href="<?php echo esc_url( get_post_type_archive_link( 'lesson-plan' ) ) . '?level[]=' . esc_html( $level->term_id ); ?>"><?php echo esc_html( $level->name ); ?><span class="dashicons dashicons-arrow-right-alt2"></span></a></li> 114 <li> 115 <a class="button" href="<?php echo esc_url( get_post_type_archive_link( 'lesson-plan' ) ) . '?level[]=' . esc_html( $level->term_id ); ?>"> 116 <?php echo esc_html( $level->name ); ?><span aria-hidden="true" class="dashicons dashicons-arrow-right-alt2"></span> 117 </a> 118 </li> 119 119 <?php 120 120 endforeach; … … 134 134 ) ); 135 135 136 $duration_index = 0;136 $duration_index = 0; 137 137 $any_duration_arr = array(); 138 $lp_archive_url = get_post_type_archive_link( 'lesson-plan' );138 $lp_archive_url = get_post_type_archive_link( 'lesson-plan' ); 139 139 foreach ( $durations as $duration ) : 140 140 if ( $duration_index < 3 ) : 141 141 ?> 142 142 <li> 143 <a href="<?php echo esc_url( add_query_arg( array( 'duration[]' => $duration->term_id ), $lp_archive_url ) ); ?>">144 <?php echo esc_html( $duration->name ); ?><span class="dashicons dashicons-arrow-right-alt2"></span>143 <a class="button" href="<?php echo esc_url( add_query_arg( array( 'duration[]' => $duration->term_id ), $lp_archive_url ) ); ?>"> 144 <?php echo esc_html( $duration->name ); ?><span aria-hidden="true" class="dashicons dashicons-arrow-right-alt2"></span> 145 145 </a> 146 146 </li> … … 155 155 ?> 156 156 <li> 157 <a href="<?php echo esc_url( add_query_arg( $any_duration_arr, $lp_archive_url ) ); ?>">158 <?php echo esc_html__( ' Any (over 60m)', 'wporg-learn' ); ?><spanclass="dashicons dashicons-arrow-right-alt2"></span>157 <a class="button" href="<?php echo esc_url( add_query_arg( $any_duration_arr, $lp_archive_url ) ); ?>"> 158 <?php echo esc_html__( '60 mins or longer', 'wporg-learn' ); ?><span aria-hidden="true" class="dashicons dashicons-arrow-right-alt2"></span> 159 159 </a> 160 160 </li> … … 169 169 $instruction_types = get_terms( 'instruction_type', array( 170 170 'hide_empty' => false, 171 'orderby' => 'id',171 'orderby' => 'id', 172 172 ) ); 173 173 ?> 174 <div class="row lp-taxonomy"> 174 <div class="lp-taxonomy"> 175 <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Format', 'wporg-learn' ); ?></h2> 176 <div class="lp-taxonomy-description"><?php echo esc_html__( 'Browse lesson plans based on their format.', 'wporg-learn' ); ?></div> 175 177 <div class="card-grid card-grid_4"> 176 <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Format', 'wporg-learn' ); ?></h2>177 <div class="lp-taxonomy-description"><?php echo esc_html__( 'Browse lesson plans based on their format.', 'wporg-learn' ); ?></div>178 178 <?php foreach ( $instruction_types as $instruction_type ) : ?> 179 < div class="card">180 < p class="taxonomy-title"><a href="<?php echo esc_url( get_post_type_archive_link( 'lesson-plan' ) ) . '?type[]=' . esc_html( $instruction_type->term_id ); ?>"><?php echo esc_html( $instruction_type->name ); ?></a></p>181 </ div>179 <a class="card button" href="<?php echo esc_url( get_post_type_archive_link( 'lesson-plan' ) ) . '?type[]=' . esc_html( $instruction_type->term_id ); ?>"> 180 <?php echo esc_html( $instruction_type->name ); ?> 181 </a> 182 182 <?php endforeach; ?> 183 183 </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)