PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.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 / config / profile-tabs.php

profile-tabs.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.7, at config/profile-tabs.php

114 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Profile tabs
4 *
5 * @since 4.2.6.4
6 * @version 1.0.1
7 */
8
9 use LearnPress\TemplateHooks\Profile\ProfileOrdersTemplate;
10 use LearnPress\TemplateHooks\Profile\ProfileOrderTemplate;
11 use LearnPress\TemplateHooks\Profile\ProfileQuizzesTemplate;
12 use LearnPress\TemplateHooks\Profile\ProfileStudentEnrolledTemplate;
13
14 $settings = LP_Settings::instance();
15 $default_settings = array(
16 'courses' => array(
17 'title' => esc_html__( 'Courses', 'learnpress' ),
18 'slug' => $settings->get( 'profile_endpoints.courses', 'courses' ),
19 'callback' => array( LP_Template_Profile::class, 'tab_courses' ),
20 'priority' => 1,
21 'icon' => '<i class="lp-icon-book-open"></i>',
22 ),
23 'my-courses' => array(
24 'title' => esc_html__( 'My Courses', 'learnpress' ),
25 'slug' => $settings->get( 'profile_endpoints.my-courses', 'my-courses' ),
26 'callback' => array( LP_Template_Profile::class, 'tab_my_courses' ),
27 'priority' => 1,
28 'icon' => '<i class="lp-icon-my-courses"></i>',
29 ),
30 'quizzes' => array(
31 'title' => esc_html__( 'Quizzes', 'learnpress' ),
32 'slug' => $settings->get( 'profile_endpoints.quizzes', 'quizzes' ),
33 'callback' => [ ProfileQuizzesTemplate::class, 'tab_content' ],
34 'priority' => 20,
35 'icon' => '<i class="lp-icon-puzzle-piece"></i>',
36 ),
37 'orders' => array(
38 'title' => esc_html__( 'Orders', 'learnpress' ),
39 'slug' => $settings->get( 'profile_endpoints.orders', 'orders' ),
40 'callback' => [ ProfileOrdersTemplate::class, 'tab_content' ],
41 'priority' => 25,
42 'icon' => '<i class="lp-icon-shopping-cart"></i>',
43 ),
44 'order-details' => array(
45 'title' => esc_html__( 'Order details', 'learnpress' ),
46 'slug' => $settings->get( 'profile_endpoints.order-details', 'order-details' ),
47 'hidden' => true,
48 'callback' => [ ProfileOrderTemplate::class, 'content' ],
49 'priority' => 30,
50 ),
51 'enrolled-students' => array(
52 'title' => __( 'Students', 'learnpress' ),
53 'slug' => 'enrolled-students',
54 'callback' => [ ProfileStudentEnrolledTemplate::class, 'tab_content' ],
55 'priority' => 35,
56 'icon' => '<i class="lp-icon-user-secret"></i>',
57 ),
58 'settings' => array(
59 'title' => esc_html__( 'Settings', 'learnpress' ),
60 'slug' => $settings->get( 'profile_endpoints.settings', 'settings' ),
61 'callback' => false,
62 'sections' => array(
63 'basic-information' => array(
64 'title' => esc_html__( 'General', 'learnpress' ),
65 'slug' => $settings->get( 'profile_endpoints.settings-basic-information', 'basic-information' ),
66 'callback' => false,
67 'priority' => 10,
68 'icon' => '<i class="lp-icon-home"></i>',
69 ),
70 'avatar' => array(
71 'title' => esc_html__( 'Avatar', 'learnpress' ),
72 'callback' => [ LP_Template_Profile::class, 'tab_avatar' ],
73 'slug' => $settings->get( 'profile_endpoints.settings-avatar', 'avatar' ),
74 'priority' => 20,
75 'icon' => '<i class="lp-icon-user-circle"></i>',
76 ),
77 'cover-image' => array(
78 'title' => esc_html__( 'Cover Image', 'learnpress' ),
79 'callback' => array( LP_Template_Profile::class, 'tab_cover_image' ),
80 'slug' => $settings->get( 'profile_endpoints.settings-cover-image', 'cover-image' ),
81 'priority' => 21,
82 'icon' => '<i class="lp-icon-file-picture"></i>',
83 ),
84 'change-password' => array(
85 'title' => esc_html__( 'Password', 'learnpress' ),
86 'slug' => $settings->get( 'profile_endpoints.settings-change-password', 'change-password' ),
87 'callback' => false,
88 'priority' => 30,
89 'icon' => '<i class="lp-icon-key"></i>',
90 ),
91 ),
92 'priority' => 90,
93 'icon' => '<i class="lp-icon-cog"></i>',
94 ),
95 'logout' => array(
96 'title' => esc_html__( 'Logout', 'learnpress' ),
97 'slug' => learn_press_profile_logout_slug(),
98 'icon' => '<i class="lp-icon-sign-out"></i>',
99 'priority' => 100,
100 ),
101 );
102
103 if ( 'yes' === LP_Profile::get_option_publish_profile() ) {
104 $default_settings['settings']['sections']['privacy'] = array(
105 'title' => esc_html__( 'Privacy', 'learnpress' ),
106 'slug' => $settings->get( 'profile_endpoints.settings-privacy', 'privacy' ),
107 'priority' => 40,
108 'callback' => false,
109 'icon' => '<i class="lp-icon-user-secret"></i>',
110 );
111 }
112
113 return apply_filters( 'learn-press/profile-tabs', $default_settings );
114