PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.7
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 4.2.1 All 138 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.7, at inc/admin/views/addons/html-plugins-more.php

53 lines 1.1 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 // get all free Learnpress plugins
13 $wp_plugins = LP_Plugins_Helper::get_plugins( 'free' );
14 // get all premium Learnpress plugins
15 $tp_plugins = LP_Plugins_Helper::get_plugins( 'premium' );
16
17 if ( ! ( $wp_plugins || $tp_plugins ) ) {
18 _e( 'There is no available add-ons.', 'learnpress' );
19
20 return;
21 }
22
23 $all_plugins = array(
24 array(
25 'key' => 'free',
26 'title' => __( 'Free add-ons', 'learnpress' ),
27 'items' => $wp_plugins,
28 ),
29 array(
30 'key' => 'premium',
31 'title' => __( 'Premium add-ons', 'learnpress' ),
32 'items' => $tp_plugins,
33 ),
34 );
35
36 foreach ( $all_plugins as $plugins ) {
37 if ( $plugins['items'] ) {
38 ?>
39 <h2>
40 <?php echo sprintf( '%s (<span>%s</span>)', esc_html( $plugins['title'] ), sizeof( $plugins['items'] ) ); ?>
41 </h2>
42 <ul class="addons-browse widefat">
43 <?php
44 foreach ( $plugins['items'] as $file => $add_on ) {
45 include learn_press_get_admin_view( 'addons/html-loop-plugin' );
46 }
47 ?>
48 </ul>
49 <?php
50 }
51 }
52 ?>
53