PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.7.3.1
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.7.3.1
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 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / admin / views / addons / html-themes.php

html-themes.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.7.3.1, at inc/admin/views/addons/html-themes.php

58 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin View: Displaying all LearnPress's related themes.
4 *
5 * @author ThimPress
6 * @package LearnPress/Views
7 * @version 3.0.0
8 */
9
10 defined( 'ABSPATH' ) || exit();
11
12 // Thimpress Education themes
13 $education_themes = LP_Plugins_Helper::get_related_themes( 'education' );
14 // Thimpress other themes
15 $other_themes = LP_Plugins_Helper::get_related_themes( 'other' );
16
17 if ( ! ( $education_themes || $other_themes ) ) {
18 _e( 'No related themes.', 'learnpress' );
19 return;
20 }
21
22 $all_themes = array(
23 array(
24 'title' => __( 'Education Support', 'learnpress' ),
25 'items' => $education_themes,
26 ),
27 array(
28 'title' => __( 'Other', 'learnpress' ),
29 'items' => $other_themes,
30 ),
31 );
32
33 $lp_query_items_bg = new LP_Background_Query_Items();
34 $lp_query_items_bg->query_related_themes();
35
36 foreach ( $all_themes as $themes ) {
37 if ( $themes['items'] ) {
38 ?>
39 <h2><?php echo sprintf( '%s (<span>%s</span>)', esc_html( $themes['title'] ), sizeof( $themes['items'] ) ); ?></h2>
40 <ul class="addons-browse related-themes widefat">
41 <?php
42 foreach ( $themes['items'] as $key => $item ) {
43 $item['url'] = learn_press_get_item_referral( $item['id'] );
44
45 learn_press_admin_view(
46 'addons/html-loop-theme',
47 array(
48 'theme' => $item,
49 'ref' => '',
50 )
51 );
52 }
53 ?>
54 </ul>
55 <?php
56 }
57 }
58