Making WordPress.org


Ignore:
Timestamp:
09/28/2022 11:18:13 PM (4 years ago)
Author:
adamwood
Message:

Learn: Sync with git WordPress/learn@f49e45d

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  
    2929                <hr>
    3030
    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>
    3941                </div>
    4042
    … …  
    4850                ) );
    4951                ?>
    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>
    5155                        <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>
    5456                                <?php foreach ( $categories as $category ) :
    5557                                        $is_sticky = get_term_meta( $category->term_id, 'sticky', true );
    5658                                        if ( $is_sticky ) :
    5759                                                ?>
    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>
    6564                                                </div>
    66                                                 <p class="taxonomy-title"><?php echo esc_html( $category->name ); ?></p>
     65                                                <?php echo esc_html( $category->name ); ?>
    6766                                        </a>
    68                                 </div>
    6967                                                <?php
    7068                                        endif;
    … …  
    7977                ) );
    8078                ?>
    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>
    8282                        <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>
    8583                                <?php foreach ( $audiences as $audience ) :
    8684                                        $is_sticky = get_term_meta( $audience->term_id, 'sticky', true );
    8785                                        if ( $is_sticky ) :
    8886                                                ?>
    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>
    9289                                                        <?php
    9390                                                        $audience_icon = get_term_meta( $audience->term_id, 'dashicon-class', true ) ?? 'wordpress-alt';
    9491                                                        ?>
    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>
    9693                                                </div>
    97                                                 <p class="taxonomy-title"><?php echo esc_html( $audience->name ); ?></p>
     94                                                <?php echo esc_html( $audience->name ); ?>
    9895                                        </a>
    99                                 </div>
    10096                                                <?php
    10197                                endif;
    … …  
    105101
    106102                <div class="row lp-two-col between">
    107                         <div class="lp-taxonomy">
     103                        <div class="lp-level">
    108104                                <h2 class="h4 lp-taxonomy-header"><?php echo esc_html__( 'Level', 'wporg-learn' ); ?></h2>
    109105                                <div class="lp-taxonomy-description"><?php echo esc_html__( 'What experience partipants need.', 'wporg-learn' ); ?></div>
    … …  
    116112
    117113                                        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>
    119119                                                <?php
    120120                                        endforeach;
    … …  
    134134                                        ) );
    135135
    136                                         $duration_index = 0;
     136                                        $duration_index   = 0;
    137137                                        $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' );
    139139                                        foreach ( $durations as $duration ) :
    140140                                                if ( $duration_index < 3 ) :
    141141                                                        ?>
    142142                                        <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>
    145145                                                </a>
    146146                                        </li>
    … …  
    155155                                                ?>
    156156                                                <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' ); ?><span class="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>
    159159                                                        </a>
    160160                                                </li>
    … …  
    169169                $instruction_types = get_terms( 'instruction_type', array(
    170170                        'hide_empty' => false,
    171                         'orderby' => 'id',
     171                        'orderby'    => 'id',
    172172                ) );
    173173                ?>
    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>
    175177                        <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>
    178178                                <?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>
    182182                                <?php endforeach; ?>
    183183                        </div>
Note: See TracChangeset for help on using the changeset viewer.