PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.10
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.10
4.4.10 4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 All 142 releases
learnpress / inc / admin / views / themes / data-online.php

data-online.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.10, at inc/admin/views/themes/data-online.php

212 lines 6.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Data online for Themes page.
4 *
5 * @var array $themes Themes data.
6 * @since 4.4.7
7 * @version 1.0.0
8 */
9
10 use LearnPress\Helpers\Template;
11
12 defined( 'ABSPATH' ) || exit;
13 ?>
14
15 <div class="learn-press-themes">
16 <div class="lp-themes-toolbar lp-be-toolbar">
17 <div class="lp-themes-filter">
18 <button type="button" class="lp-themes-filter__toggle" aria-label="<?php esc_attr_e( 'Filter themes', 'learnpress' ); ?>" aria-expanded="false" aria-haspopup="true">
19 <svg class="lp-themes-filter__toggle-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>
20 <span><?php esc_html_e( 'Filter', 'learnpress' ); ?></span>
21 </button>
22 <div class="lp-themes-filter__menu lp-be-nav-tabs">
23
24 <button
25 type="button"
26 class="lp-themes-filter__item lp-be-nav-tab active"
27 data-category="all"
28 aria-pressed="true"
29 >
30 <?php esc_html_e( 'All Themes', 'learnpress' ); ?> <span class="lp-themes-filter__count"></span>
31 </button>
32
33 <button
34 type="button"
35 class="lp-themes-filter__item lp-be-nav-tab"
36 data-category="paid"
37 aria-pressed="false"
38 >
39 <?php esc_html_e( 'Paid Themes', 'learnpress' ); ?> <span class="lp-themes-filter__count"></span>
40 </button>
41
42 <button
43 type="button"
44 class="lp-themes-filter__item lp-be-nav-tab"
45 data-category="free"
46 aria-pressed="false"
47 >
48 <?php esc_html_e( 'Free Themes', 'learnpress' ); ?> <span class="lp-themes-filter__count"></span>
49 </button>
50
51 </div>
52 </div>
53 <div class="lp-themes-search lp-be-search">
54 <button type="button" class="lp-themes-search__btn lp-be-search__btn" aria-label="<?php esc_attr_e( 'Search themes', 'learnpress' ); ?>" aria-expanded="false" aria-controls="lp-themes-search__field">
55 <span class="lp-icon-search" aria-hidden="true"></span>
56 </button>
57 <div class="lp-themes-search__field lp-be-search__field" id="lp-themes-search__field">
58 <label class="lp-themes-search__input-wrap lp-be-search__input-wrap">
59 <span class="screen-reader-text"><?php esc_html_e( 'Search theme by name', 'learnpress' ); ?></span>
60 <span class="lp-themes-search__icon lp-be-search__icon lp-icon-search" aria-hidden="true"></span>
61 <input type="search" class="lp-themes-search__input lp-be-search__input" placeholder="<?php esc_attr_e( 'Search theme by name', 'learnpress' ); ?>" autocomplete="off" />
62 </label>
63 <button type="button" class="lp-themes-search__btn-clear lp-be-search__btn-clear" disabled><?php esc_html_e( 'Clear', 'learnpress' ); ?></button>
64 <button type="button" class="lp-themes-search__close lp-be-search__close" aria-label="<?php esc_attr_e( 'Close search', 'learnpress' ); ?>"><span aria-hidden="true">&times;</span></button>
65 </div>
66 </div>
67 </div>
68
69 <?php
70 if ( empty( $themes ) ) :
71 Template::print_message( __( 'No theme data available.', 'learnpress' ), 'info' );
72 ?>
73
74 <?php else : ?>
75 <div class="lp-themes-grid">
76
77 <?php foreach ( $themes as $theme ) : ?>
78
79 <div
80 class="lp-theme-card<?php echo ! empty( $theme['featured'] ) ? ' lp-theme-card--featured' : ''; ?>"
81 data-category="<?php echo esc_attr( strtolower( $theme['category'] ?? '' ) ); ?>"
82 >
83
84 <div class="lp-theme-card__thumbnail">
85
86 <?php
87 $fallback_image = LP_PLUGIN_URL . 'assets/images/no-image.png';
88 $theme_image = ! empty( $theme['image'] ) ? $theme['image'] : $fallback_image;
89 ?>
90
91 <img
92 src="<?php echo esc_url( $theme_image ); ?>"
93 data-fallback-src="<?php echo esc_url( $fallback_image ); ?>"
94 alt="<?php echo esc_attr( $theme['name'] ?? $theme['title'] ?? '' ); ?>"
95 loading="lazy"
96 />
97
98 <?php if ( ! empty( $theme['badge'] ) ) : ?>
99
100 <span class="lp-theme-card__badge">
101 <?php echo esc_html( $theme['badge'] ); ?>
102 </span>
103
104 <?php endif; ?>
105
106 </div>
107
108 <div class="lp-theme-card__content">
109
110 <h3 class="lp-theme-card__title">
111 <?php echo esc_html( $theme['title'] ?? '' ); ?>
112 </h3>
113
114 <p class="lp-theme-card__description">
115 <?php echo esc_html( $theme['description'] ?? '' ); ?>
116 </p>
117
118 <div class="lp-theme-card__footer">
119
120 <div class="lp-theme-card__price">
121
122 <?php if ( 'Free' === ( $theme['category'] ?? '' ) ) : ?>
123
124 <strong>
125 <?php esc_html_e( 'Free', 'learnpress' ); ?>
126 </strong>
127
128 <?php else : ?>
129
130 <strong>
131 $<?php echo esc_html( number_format_i18n( $theme['price'] ?? 0 ) ); ?>
132 </strong>
133
134 <?php if ( ! empty( $theme['old_price'] ) ) : ?>
135
136 <del>
137 $<?php echo esc_html( number_format_i18n( $theme['old_price'] ) ); ?>
138 </del>
139
140 <?php endif; ?>
141
142 <?php endif; ?>
143
144 </div>
145
146 <div class="lp-theme-card__meta">
147
148 <div class="lp-theme-card__rating">
149
150 <span class="lp-theme-card__star lp-icon-star" aria-hidden="true"></span>
151
152 <span>
153 <?php echo esc_html( $theme['rating'] ?? 0 ); ?>
154 </span>
155
156 <?php if ( ! empty( $theme['reviews'] ) ) : ?>
157
158 <span>
159 (<?php echo esc_html( number_format_i18n( $theme['reviews'] ) ); ?>)
160 </span>
161
162 <?php endif; ?>
163
164 </div>
165
166 <div class="lp-theme-card__sold">
167
168 <span class="lp-theme-card__cart lp-icon-shopping-cart" aria-hidden="true"></span>
169
170 <span>
171 <?php echo esc_html( number_format_i18n( $theme['sold'] ?? 0 ) ); ?>
172 </span>
173
174 </div>
175
176 </div>
177
178 </div>
179
180 <div class="lp-theme-card__actions">
181
182 <a
183 class="lp-theme-card__buy lp-be-btn lp-be-btn--primary"
184 href="<?php echo esc_url( $theme['buy_url'] ?? '#' ); ?>"
185 target="_blank"
186 rel="noopener noreferrer"
187 >
188 <?php echo esc_html( $theme['buy_text'] ?? __( 'Get Theme Now', 'learnpress' ) ); ?>
189 </a>
190
191 <a
192 class="lp-theme-card__demo lp-be-btn lp-be-btn--outline"
193 href="<?php echo esc_url( $theme['demo_url'] ?? '#' ); ?>"
194 target="_blank"
195 rel="noopener noreferrer"
196 >
197 <?php echo esc_html( $theme['demo_text'] ?? __( 'Demo', 'learnpress' ) ); ?>
198 </a>
199
200 </div>
201
202 </div>
203
204 </div>
205
206 <?php endforeach; ?>
207
208 </div>
209
210 <?php endif; ?>
211 </div>
212