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 / assets / src / js / api.js

api.js in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.7, at assets/src/js/api.js

42 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * List API on backend
3 *
4 * @since 4.2.6
5 * @version 1.0.2
6 */
7
8 const lplistAPI = {};
9 let lp_rest_url;
10
11 if ( 'undefined' !== typeof lpDataAdmin ) {
12 lp_rest_url = lpDataAdmin.lp_rest_url;
13 lplistAPI.admin = {
14 apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices',
15 apiAddons: lp_rest_url + 'lp/v1/addon/all',
16 apiAddonAction: lp_rest_url + 'lp/v1/addon/action-n',
17 apiAddonsPurchase: lp_rest_url + 'lp/v1/addon/info-addons-purchase',
18 apiSearchCourses: lp_rest_url + 'lp/v1/admin/tools/search-course',
19 apiSearchUsers: lp_rest_url + 'lp/v1/admin/tools/search-user',
20 apiAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/assign-user-course',
21 apiUnAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/unassign-user-course',
22 };
23 }
24
25 if ( 'undefined' !== typeof lpData ) {
26 lp_rest_url = lpData.lp_rest_url;
27 lplistAPI.frontend = {
28 apiWidgets: lp_rest_url + 'lp/v1/widgets/api',
29 apiCourses: lp_rest_url + 'lp/v1/courses/archive-course', // Deprecated API, don't load from v4.3.7
30 apiAJAX: lp_rest_url + 'lp/v1/load_content_via_ajax/', // Deprecated since 4.3.0
31 apiProfileCoverImage: lp_rest_url + 'lp/v1/profile/cover-image',
32 };
33 }
34
35 if ( lp_rest_url ) {
36 lplistAPI.apiCourses = lp_rest_url + 'lp/v1/courses/';
37 lplistAPI.apiEditCoursesArchiveBlock = lp_rest_url + 'lp/v1/courses/edit-archive-block';
38 lplistAPI.apiCoursesSuggest = lp_rest_url + 'lp/v1/courses/courses-suggest';
39 }
40
41 export default lplistAPI;
42