← All changes
|
templates/single-course/content-item/popup-header.php
+32
-20
4.1.7
→
4.4.9
View file →
| @@ -5,9 +5,9 @@ | ||
| 5 | 5 | * This template can be overridden by copying it to yourtheme/learnpress/single-course/header.php. |
| 6 | 6 | * |
| 7 | 7 | * @author ThimPress |
| 8 | 8 | * @package Learnpress/Templates |
| 9 | - * @version 4.0.3 | |
| 9 | + * @version 4.0.4 | |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | defined( 'ABSPATH' ) || exit(); |
| 13 | 13 | |
| @@ -17,33 +17,45 @@ | ||
| 17 | 17 | } |
| 18 | 18 | ?> |
| 19 | 19 | |
| 20 | 20 | <div id="popup-header"> |
| 21 | + <?php | |
| 22 | + /** | |
| 23 | + * @since 4.0.6 | |
| 24 | + * @see single-button-toggle-sidebar - 5 | |
| 25 | + */ | |
| 26 | + do_action( 'learn-press/single-button-toggle-sidebar' ); | |
| 27 | + ?> | |
| 21 | 28 | <div class="popup-header__inner"> |
| 22 | 29 | <h2 class="course-title"> |
| 23 | - <a href="<?php echo esc_url_raw( $course->get_permalink() ); ?>"><?php echo wp_kses_post( $course->get_title() ); ?></a> | |
| 30 | + <a | |
| 31 | + href="<?php echo esc_url_raw( $course->get_permalink() ); ?>"><?php echo wp_kses_post( $course->get_title() ); ?></a> | |
| 24 | 32 | </h2> |
| 25 | 33 | |
| 26 | 34 | <?php if ( $user->has_enrolled_or_finished( $course->get_id() ) ) : ?> |
| 27 | - <div class="items-progress" data-total-items="<?php echo esc_attr( $total_items ); ?>"> | |
| 28 | - <span class="number"> | |
| 29 | - <?php | |
| 30 | - echo | |
| 31 | - wp_sprintf( | |
| 32 | - __( | |
| 33 | - '<span class="items-completed">%1$s</span> of %2$d items', | |
| 34 | - 'learnpress' | |
| 35 | - ), | |
| 36 | - esc_html( $completed_items ), | |
| 37 | - esc_html( $course->count_items() ) | |
| 38 | - ); | |
| 39 | - ?> | |
| 40 | - </span> | |
| 41 | - <div class="learn-press-progress"> | |
| 42 | - <div class="learn-press-progress__active" data-value="<?php echo esc_attr( $percentage ); ?>%;"> | |
| 43 | - </div> | |
| 35 | + <div class="items-progress" data-total-items="<?php echo esc_attr( $total_items ); ?>"> | |
| 36 | + <span class="number"> | |
| 37 | + <?php | |
| 38 | + printf( | |
| 39 | + __( | |
| 40 | + '<span class="items-completed">%1$s</span> of %2$d items', | |
| 41 | + 'learnpress' | |
| 42 | + ), | |
| 43 | + esc_html( $completed_items ), | |
| 44 | + esc_html( $course->count_items() ) | |
| 45 | + ); | |
| 46 | + ?> | |
| 47 | + </span> | |
| 48 | + <div class="learn-press-progress"> | |
| 49 | + <div class="learn-press-progress__active" data-value="<?php echo esc_attr( $percentage ); ?>%;"> | |
| 44 | 50 | </div> |
| 45 | 51 | </div> |
| 52 | + </div> | |
| 46 | 53 | <?php endif; ?> |
| 47 | 54 | </div> |
| 48 | - <a href="<?php echo esc_url_raw( $course->get_permalink() ); ?>" class="back-course"><i class="fa fa-times"></i></a> | |
| 55 | + <a href="<?php echo esc_url_raw( $course->get_permalink() ); ?>" | |
| 56 | + class="back-course" | |
| 57 | + aria-label="<?php esc_attr_e( 'Back to course', 'learnpress' ); ?>" | |
| 58 | + > | |
| 59 | + <i class="lp-icon-times"></i> | |
| 60 | + </a> | |
| 49 | 61 | </div> |