PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.6.9.3
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.6.9.3
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-plugins-more.php

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

62 lines 1.4 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 add-ons available but haven't installed.
4 *
5 * @author ThimPress
6 * @package LearnPress/Views
7 * @version 3.0.0
8 */
9
10 defined( 'ABSPATH' ) || exit();
11
12 $last_checked = LP_Background_Query_Items::instance()->get_last_checked( 'plugins_tp' );
13 $check_url = wp_nonce_url( add_query_arg( 'force-check-update', 'yes' ), 'lp-check-updates' );
14 ?>
15
16 <p><?php printf( __( 'Last checked %1$s. <a href="%2$s">Check again</a>', 'learnpress' ), human_time_diff( $last_checked ), $check_url ); ?></p>
17
18 <?php
19
20
21 // get all free Learnpress plugins
22 $wp_plugins = LP_Plugins_Helper::get_plugins( 'free' );
23 // get all premium Learnpress plugins
24 $tp_plugins = LP_Plugins_Helper::get_plugins( 'premium' );
25
26 if ( ! ( $wp_plugins || $tp_plugins ) ) {
27 _e( 'There is no available add-ons.', 'learnpress' );
28
29 return;
30 }
31
32 $all_plugins = array(
33 array(
34 'key' => 'free',
35 'title' => __( 'Free add-ons', 'learnpress' ),
36 'items' => $wp_plugins,
37 ),
38 array(
39 'key' => 'premium',
40 'title' => __( 'Premium add-ons', 'learnpress' ),
41 'items' => $tp_plugins,
42 ),
43 );
44
45 foreach ( $all_plugins as $plugins ) {
46 if ( $plugins['items'] ) {
47 ?>
48 <h2>
49 <?php echo $plugins['title'] . ' (<span>' . sizeof( $plugins['items'] ) . '</span>)'; ?>
50 </h2>
51 <ul class="addons-browse widefat">
52 <?php
53 foreach ( $plugins['items'] as $file => $add_on ) {
54 include learn_press_get_admin_view( 'addons/html-loop-plugin' );
55 }
56 ?>
57 </ul>
58 <?php
59 }
60 }
61 ?>
62