PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.7.2
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.7.2
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 / sub-menus / class-lp-submenu-addons.php

class-lp-submenu-addons.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.7.2, at inc/admin/sub-menus/class-lp-submenu-addons.php

71 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class LP_Submenu_Addons
4 *
5 * @since 3.0.0
6 */
7 class LP_Submenu_Addons extends LP_Abstract_Submenu {
8
9 /**
10 * LP_Submenu_Addons constructor.
11 */
12 public function __construct() {
13 $this->id = 'learn-press-addons';
14 $this->menu_title = __( 'Add-ons', 'learnpress' );
15 $this->page_title = __( 'LearnPress Add-ons', 'learnpress' );
16 $this->priority = 20;
17
18 $this->add_ons_tabs();
19
20 parent::__construct();
21 }
22
23 public function add_ons_tabs() {
24 // Check is page addons
25 $current_page = LP_Helper::getUrlCurrent();
26 $pattern = '/.*page=learn-press-addons.*/';
27 $match = preg_match( $pattern, $current_page, $matches );
28 if ( ! $match ) {
29 return;
30 }
31
32 $tabs = array(
33 'more' => sprintf( __( 'Get more (%d)', 'learnpress' ), LP_Plugins_Helper::count_plugins() ),
34 'installed' => sprintf( __( 'Installed (%d)', 'learnpress' ), LP_Plugins_Helper::count_plugins( 'installed' ) ),
35 'themes' => sprintf( __( 'Themes (%d)', 'learnpress' ), LP_Plugins_Helper::count_themes() ),
36 );
37
38 $this->tabs = apply_filters(
39 'learn-press/admin/page-addons-tabs',
40 $tabs
41 );
42 }
43
44 public function page_content_installed() {
45 $this->page_content_search_form();
46 learn_press_admin_view( 'addons/html-plugins-installed' );
47 }
48
49 public function page_content_more() {
50 $this->page_content_search_form();
51 learn_press_admin_view( 'addons/html-plugins-more' );
52 }
53
54 public function page_content_themes() {
55 $this->page_content_search_form();
56 learn_press_admin_view( 'addons/html-themes' );
57 }
58
59 public function page_content_search_form() {
60 ?>
61
62 <p class="search-box">
63 <input type="text" class="lp-search-addon" value="" placeholder="<?php esc_attr_e( 'Search...', 'learnpress' ); ?>">
64 </p>
65
66 <?php
67 }
68 }
69
70 return new LP_Submenu_Addons();
71