LearnPress – WordPress LMS Plugin - Version 4.1.6.6

Version Description

(2022-06-13) = ~ Fixed: security. ~ Added: option "Enable loading ajax Courses on the Archive Course page". ~ Added: option "No Page load Courses Ajax".

Download this release

Release Info

Developer ThimPress
Plugin Icon 128x128 LearnPress – WordPress LMS Plugin
Version 4.1.6.6
Comparing to
See all releases

Code changes from version 4.1.6.5 to 4.1.6.6

Files changed (121) hide show
  1. assets/js/admin/admin.min.js +1 -1
  2. assets/js/dist/frontend/checkout.js +6 -1
  3. assets/js/dist/frontend/checkout.min.js +1 -1
  4. assets/js/dist/frontend/courses.js +31 -11
  5. assets/js/dist/frontend/courses.min.js +1 -1
  6. assets/src/apps/js/frontend/checkout.js +5 -1
  7. assets/src/apps/js/frontend/courses.js +29 -10
  8. assets/src/js/admin/admin.js +15 -1
  9. config/settings/course.php +175 -0
  10. inc/abstract-settings.php +1 -1
  11. inc/abstracts/abstract-assets.php +1 -0
  12. inc/admin/class-lp-admin-ajax.php +0 -681
  13. inc/admin/class-lp-admin-assets.php +4 -2
  14. inc/admin/class-lp-setup-wizard.php +4 -4
  15. inc/admin/lp-admin-actions.php +10 -2
  16. inc/admin/lp-admin-functions.php +1 -1
  17. inc/admin/meta-box/class-lp-meta-box-helper.php +2 -2
  18. inc/admin/meta-box/fields/checkbox.php +14 -21
  19. inc/admin/meta-box/fields/course-permalink.php +1 -1
  20. inc/admin/meta-box/fields/list-emails.php +9 -7
  21. inc/admin/settings/class-lp-settings-payments.php +1 -1
  22. inc/admin/settings/class-lp-settings-profile.php +1 -1
  23. inc/admin/settings/email-groups/class-lp-settings-emails-group.php +1 -1
  24. inc/admin/sub-menus/class-lp-submenu-settings.php +2 -2
  25. inc/admin/sub-menus/class-lp-submenu-statistics.php +0 -25
  26. inc/admin/views/addons/html-themes.php +1 -1
  27. inc/admin/views/backend-user-profile.php +1 -1
  28. inc/admin/views/meta-boxes/fields/select.php +8 -4
  29. inc/admin/views/meta-boxes/order/details.php +2 -2
  30. inc/admin/views/meta-boxes/quiz/settings.php +1 -1
  31. inc/admin/views/setup/content.php +5 -5
  32. inc/admin/views/setup/setup-paypal.php +1 -1
  33. inc/admin/views/setup/steps/currency.php +3 -2
  34. inc/admin/views/setup/steps/pages.php +1 -1
  35. inc/admin/views/tools/html-cache.php +1 -1
  36. inc/admin/views/tools/html-cron.php +1 -1
  37. inc/admin/views/user/courses.php +2 -2
  38. inc/attributes/course.php +11 -9
  39. inc/class-lp-ajax.php +7 -3
  40. inc/class-lp-assets.php +3 -5
  41. inc/class-lp-checkout.php +3 -3
  42. inc/class-lp-debug.php +2 -2
  43. inc/class-lp-emails.php +1 -1
  44. inc/class-lp-forms-handler.php +2 -2
  45. inc/class-lp-hard-cache.php +1 -1
  46. inc/class-lp-helper.php +14 -3
  47. inc/class-lp-install.php +4 -2
  48. inc/class-lp-page-controller.php +186 -54
  49. inc/class-lp-query-search.php +5 -0
  50. inc/class-lp-query.php +3 -3
  51. inc/class-lp-schedules.php +0 -10
  52. inc/class-lp-settings.php +1 -1
  53. inc/course/abstract-course.php +4 -4
  54. inc/course/lp-course-functions.php +17 -12
  55. inc/curds/class-lp-user-curd.php +1 -1
  56. inc/custom-post-types/abstract.php +1 -224
  57. inc/custom-post-types/order.php +8 -6
  58. inc/emails/admin/class-lp-email-cancelled-order-admin.php +1 -1
  59. inc/emails/admin/class-lp-email-completed-order-admin.php +1 -1
  60. inc/emails/admin/class-lp-email-enrolled-course-admin.php +1 -1
  61. inc/emails/admin/class-lp-email-finished-course-admin.php +1 -1
  62. inc/emails/admin/class-lp-email-new-order-admin.php +1 -1
  63. inc/emails/class-lp-email.php +7 -7
  64. inc/external-plugin/elementor/widgets/login-form.php +1 -1
  65. inc/external-plugin/elementor/widgets/register-form.php +1 -1
  66. inc/gateways/class-lp-gateway-abstract.php +1 -1
  67. inc/gateways/paypal/class-lp-gateway-paypal-basic.php +22 -11
  68. inc/gateways/paypal/class-lp-gateway-paypal-security.php +28 -19
  69. inc/gateways/paypal/class-lp-gateway-paypal.php +1 -1
  70. inc/jwt/class-jwt-auth.php +1 -2
  71. inc/jwt/includes/class-jwt-public.php +0 -73
  72. inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php +2 -2
  73. inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php +22 -0
  74. inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php +5 -5
  75. inc/jwt/rest-api/version1/class-lp-rest-users-v1-controller.php +1 -1
  76. inc/lesson/lp-lesson-functions.php +2 -2
  77. inc/libraries/wp-background-process/classes/wp-async-request.php +1 -1
  78. inc/lp-core-functions.php +38 -54
  79. inc/lp-deprecated.php +43 -43
  80. inc/lp-template-functions.php +11 -11
  81. inc/lp-webhooks.php +1 -1
  82. inc/order/class-lp-order.php +4 -4
  83. inc/order/lp-order-functions.php +1 -1
  84. inc/question/class-lp-question.php +3 -2
  85. inc/quiz/class-lp-quiz.php +6 -2
  86. inc/quiz/lp-quiz-functions.php +1 -1
  87. inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php +49 -17
  88. inc/rest-api/v1/frontend/class-lp-rest-lazy-load-controller.php +2 -2
  89. inc/rest-api/v1/frontend/class-lp-rest-settings-controller.php +3 -3
  90. inc/rest-api/v1/frontend/class-lp-rest-users-controller.php +3 -3
  91. inc/settings/abstract-settings-page.php +127 -0
  92. inc/settings/class-lp-settings-courses.php +84 -0
  93. inc/templates/class-lp-template-course.php +33 -29
  94. inc/templates/class-lp-template-profile.php +3 -3
  95. inc/user-item/class-lp-user-item-quiz.php +1 -1
  96. inc/user/class-lp-profile-tabs.php +2 -2
  97. inc/user/class-lp-profile.php +15 -13
  98. inc/user/class-lp-user.php +1 -1
  99. inc/user/lp-user-functions.php +12 -40
  100. languages/learnpress.pot +727 -703
  101. learnpress.php +6 -3
  102. readme.txt +6 -1
  103. templates/archive-course.php +7 -1
  104. templates/content-quiz/js.php +1 -1
  105. templates/content-quiz/title.php +1 -1
  106. templates/loop/course/instructor.php +0 -1
  107. templates/loop/course/students.php +4 -1
  108. templates/profile/tabs/settings/basic-information.php +1 -1
  109. templates/single-course/buttons/continue.php +1 -1
  110. templates/single-course/buttons/external-link.php +4 -1
  111. templates/single-course/buttons/retry.php +4 -1
  112. templates/single-course/content-item.php +6 -2
  113. templates/single-course/content-item/popup-footer.php +2 -2
  114. templates/single-course/instructor.php +4 -1
  115. templates/single-course/meta/duration.php +1 -1
  116. templates/single-course/meta/instructor.php +4 -1
  117. templates/single-course/section/item-meta.php +6 -2
  118. templates/single-course/sidebar/user-time.php +2 -2
  119. templates/single-course/tabs/curriculum.php +1 -1
  120. templates/single-course/tabs/instructor.php +4 -1
  121. templates/single-course/tabs/overview.php +5 -3
assets/js/admin/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){const t=function(){e.ajax({url:"",data:{"lp-ajax":"toggle_item_preview",item_id:this.value,previewable:this.checked?"yes":"no",nonce:e(this).attr("data-nonce")},dataType:"text",success:function(e){e=LP.parseJSON(e)}})},a=function(t){const a=e(this).addClass("disabled");t.preventDefault(),e.post({url:a.attr("href"),data:{"lp-ajax":"create-pages"},dataType:"text",success:function(e){const t=a.closest(".lp-notice").html("<p>"+e+"</p>");setTimeout((function(){t.fadeOut()}),2e3)}})},n=function(t){t.preventDefault();e(this).closest(".lp-upgrade-notice").fadeOut(),e.post({url:"",data:{"lp-hide-upgrade-message":"yes"},success:function(e){}})},o=function(t){if(e(t.target).hasClass("buy-now"))return;t.preventDefault();const a=e(this).closest(".plugin-card");e(this).hasClass("updating-message")||(e(this).addClass("updating-message button-working disabled"),e.ajax({url:e(this).attr("href"),data:{},success:function(t){e.ajax({url:window.location.href,success:function(t){const n=e(t).find("#"+a.attr("id"));n.length?a.replaceWith(n):a.find(".plugin-action-buttons a").removeClass("updating-message button-working").html(learn_press_admin_localize.plugin_installed)}})}}))},l=function(e){return e.preventDefault(),!1};e.fn._filter_post_by_author=function(){const t=e("#post-search-input");if(!t.length)return;const a=e(t[0].form),n=e('<select name="author" id="author"></select>').insertAfter(t).select2({ajax:{url:window.location.href+"&lp-ajax=search-authors",dataType:"json",s:""},placeholder:"Search by user",minimumInputLength:3,allowClear:!0}).on("select2:select",(function(){e('input[name="author"]').val(n.val())}));a.on("submit",(function(){window.location.href.removeQueryVar("author").addQueryVar("author",n.val())}))};const s=()=>{e(".lp-button-upgrade").each((function(){e(this).on("click",(function(t){t.preventDefault(),e("#lp-update-db-modal").removeClass("lp-update-db-modal__hidden")}))})),e(".lp-update-db-modal__button").on("click",(function(t){t.preventDefault();const a=e(this),n=a.text(),o=a.data("loading"),l=e(".lp-update-db-modal__content-text").data("text");a.addClass("loading"),a.text(o);const s=()=>{e.ajax({url:lpGlobalSettings.ajax+"?action=lp_update_database",method:"GET",success(t){if("success"===t.status)return a.text(n),e(".lp-update-db-modal__content").addClass("lp-update-db-modal__success"),e(".lp-update-db-modal__content-text > h3").text(l),a.removeClass("loading"),!1;s()}})};s()}));e(".lp-update-db-modal__cancel").on("click",(function(t){t.preventDefault(),e("#lp-update-db-modal").addClass("lp-update-db-modal__hidden")}))},i=()=>{e(".lp-meta-box__file").each((t,a)=>{let n;const o=e(a).find(".lp-meta-box__file_input"),l=e(a).find(".lp-meta-box__file_list"),s=e(a).find(".btn-upload"),i=!!e(a).data("multil");e(s).on("click",e=>{e.preventDefault(),n||(n=wp.media({states:[new wp.media.controller.Library({filterable:"all",multiple:i})]}),n.on("select",(function(){const e=n.state().get("selection");let t=o.val();e.forEach((function(e){if((e=e.toJSON()).id)if(i?t=t?t+","+e.id:e.id:(t=e.id,l.empty()),"image"===e.type){const t=e.sizes&&e.sizes.thumbnail?e.sizes.thumbnail.url:e.url;l.append('<li class="lp-meta-box__file_list-item image" data-attachment_id="'+e.id+'"><img src="'+t+'" /><ul class="actions"><li><a href="#" class="delete"></a></li></ul></li>')}else l.append('<li class="lp-meta-box__file_list-item image" data-attachment_id="'+e.id+'"><img class="is_file" src="'+e.icon+'" /><span>'+e.filename+'</span><ul class="actions"><li><a href="#" class="delete"></a></li></ul></li>')})),c(),o.val(t)}))),n.open()}),i&&l.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"lp-metabox-sortable-placeholder",start(e,t){t.item.css("background-color","#f6f6f6")},stop(e,t){t.item.removeAttr("style")},update(){let t="";l.find("li.image").css("cursor","default").each((function(){const a=e(this).attr("data-attachment_id");t=t+a+","})),c(),o.val(t)}});const c=()=>{e(l).find("li.image").each((t,a)=>{e(a).find("a.delete").on("click",(function(){if(e(a).remove(),i){let t="";e(l).find("li.image").css("cursor","default").each((function(){const a=e(this).attr("data-attachment_id");t=t+a+","})),o.val(t)}else o.val("");return!1}))})};c()})};e(document).ready((function(){if(i(),s(),e(".learn-press-dropdown-pages").LP("DropdownPages"),e(".learn-press-advertisement-slider").LP("Advertisement","a","s").appendTo(e("#wpbody-content")),e(".learn-press-toggle-item-preview").on("change",t),e(".learn-press-tip").LP("QuickTip"),e(document).on("click","#learn-press-create-pages",a).on("click",".lp-upgrade-notice .close-notice",n).on("click",".plugin-action-buttons a",o).on("click","[data-remove-confirm]",l).on("mousedown",".lp-sortable-handle",(function(t){e("html, body").addClass("lp-item-moving"),e(t.target).closest(".lp-sortable-handle").css("cursor","inherit")})).on("mouseup",(function(t){e("html, body").removeClass("lp-item-moving"),e(".lp-sortable-handle").css("cursor","")})),e("#order-export__section").length){document.querySelectorAll(".tabs");const t=document.querySelectorAll(".tab"),a=document.querySelectorAll(".panel");function c(e){for(let e=0;e<t.length;e++)t[e].classList.remove("active");for(let e=0;e<a.length;e++)a[e].classList.remove("active");e.target.classList.add("active");const n=e.target.getAttribute("data-target");document.getElementById("panels").getElementsByClassName(n)[0].classList.add("active")}for(let e=0;e<t.length;e++)t[e].addEventListener("click",c,!1);const n=document.getElementById("myModal"),o=document.getElementById("order-export__button"),l=document.getElementsByClassName("close")[0];o.onclick=function(){n.style.display="block"},l.onclick=function(){n.style.display="none"},window.onclick=function(e){e.target==n&&(n.style.display="none")},e("#lp-invoice__content").length&&e("#lp-invoice__export").click((function(){const t=new jsPDF("p","pt","letter"),a={"#bypassme":(e,t)=>!0},n={top:80,bottom:60,left:40,width:522};t.fromHTML(e("#lp-invoice__content")[0],n.left,n.top,{width:n.width,elementHandlers:a},(function(e){const a=t.output("blob");window.open(URL.createObjectURL(a))}),n)})),e("#lp-invoice__update").click((function(){let t=e(this).data("id"),a=e('input[name="site_title"]'),n=e('input[name="order_date"]'),o=e('input[name="invoice_no"]'),l=e('input[name="order_customer"]'),s=e('input[name="order_email"]'),i=e('input[name="order_payment"]');a=a.is(":checked")?"check":"uncheck",n=n.is(":checked")?"check":"uncheck",o=o.is(":checked")?"check":"uncheck",l=l.is(":checked")?"check":"uncheck",s=s.is(":checked")?"check":"uncheck",i=i.is(":checked")?"check":"uncheck",e.ajax({type:"post",dataType:"html",url:"admin-ajax.php",data:{site_title:a,order_date:n,invoice_no:o,order_customer:l,order_email:s,order_id:t,order_payment:i,action:"learnpress_update_order_exports"},beforeSend(){e(".export-options__loading").addClass("active")},success(t){e("#lp-invoice__content").html(""),e("#lp-invoice__content").append(t),e(".export-options__loading").removeClass("active"),e(".options-tab").removeClass("active"),e(".preview-tab").addClass("active"),e("#panels .export-options").removeClass("active"),e("#panels .pdf-preview").addClass("active")},error(e,t,a){console.log("The following error occured: "+t,a)}})}))}if(e.fn._filter_post_by_author(),window.location.hash){const t=window.location.hash;if("#_lp_passing_grade"==t){const a=document.querySelector(t);e("html, body").animate({scrollTop:e(t).offset().top},900,"swing"),a.parentNode.style.border="2px solid orangered"}}}))}(jQuery);
1
+ !function(e){const t=function(){e.ajax({url:"",data:{"lp-ajax":"toggle_item_preview",item_id:this.value,previewable:this.checked?"yes":"no",nonce:e(this).attr("data-nonce")},dataType:"text",success:function(e){e=LP.parseJSON(e)}})},a=function(t){const a=e(this).addClass("disabled");t.preventDefault(),e.post({url:a.attr("href"),data:{"lp-ajax":"create-pages"},dataType:"text",success:function(e){const t=a.closest(".lp-notice").html("<p>"+e+"</p>");setTimeout((function(){t.fadeOut()}),2e3)}})},n=function(t){t.preventDefault();e(this).closest(".lp-upgrade-notice").fadeOut(),e.post({url:"",data:{"lp-hide-upgrade-message":"yes"},success:function(e){}})},o=function(t){if(e(t.target).hasClass("buy-now"))return;t.preventDefault();const a=e(this).closest(".plugin-card");e(this).hasClass("updating-message")||(e(this).addClass("updating-message button-working disabled"),e.ajax({url:e(this).attr("href"),data:{},success:function(t){e.ajax({url:window.location.href,success:function(t){const n=e(t).find("#"+a.attr("id"));n.length?a.replaceWith(n):a.find(".plugin-action-buttons a").removeClass("updating-message button-working").html(learn_press_admin_localize.plugin_installed)}})}}))},l=function(e){return e.preventDefault(),!1};e.fn._filter_post_by_author=function(){const t=e("#post-search-input");if(!t.length)return;const a=e(t[0].form),n=e('<select name="author" id="author"></select>').insertAfter(t).select2({ajax:{url:window.location.href+"&lp-ajax=search-authors",dataType:"json",s:""},placeholder:wp.i18n.__("Search by user","learnpress"),minimumInputLength:3,allowClear:!0}).on("select2:select",(function(){e('input[name="author"]').val(n.val())}));a.on("submit",(function(){window.location.href.removeQueryVar("author").addQueryVar("author",n.val())}))};const s=()=>{e(".lp-button-upgrade").each((function(){e(this).on("click",(function(t){t.preventDefault(),e("#lp-update-db-modal").removeClass("lp-update-db-modal__hidden")}))})),e(".lp-update-db-modal__button").on("click",(function(t){t.preventDefault();const a=e(this),n=a.text(),o=a.data("loading"),l=e(".lp-update-db-modal__content-text").data("text");a.addClass("loading"),a.text(o);const s=()=>{e.ajax({url:lpGlobalSettings.ajax+"?action=lp_update_database",method:"GET",success(t){if("success"===t.status)return a.text(n),e(".lp-update-db-modal__content").addClass("lp-update-db-modal__success"),e(".lp-update-db-modal__content-text > h3").text(l),a.removeClass("loading"),!1;s()}})};s()}));e(".lp-update-db-modal__cancel").on("click",(function(t){t.preventDefault(),e("#lp-update-db-modal").addClass("lp-update-db-modal__hidden")}))},i=()=>{e(".lp-meta-box__file").each((t,a)=>{let n;const o=e(a).find(".lp-meta-box__file_input"),l=e(a).find(".lp-meta-box__file_list"),s=e(a).find(".btn-upload"),i=!!e(a).data("multil");e(s).on("click",e=>{e.preventDefault(),n||(n=wp.media({states:[new wp.media.controller.Library({filterable:"all",multiple:i})]}),n.on("select",(function(){const e=n.state().get("selection");let t=o.val();e.forEach((function(e){if((e=e.toJSON()).id)if(i?t=t?t+","+e.id:e.id:(t=e.id,l.empty()),"image"===e.type){const t=e.sizes&&e.sizes.thumbnail?e.sizes.thumbnail.url:e.url;l.append('<li class="lp-meta-box__file_list-item image" data-attachment_id="'+e.id+'"><img src="'+t+'" /><ul class="actions"><li><a href="#" class="delete"></a></li></ul></li>')}else l.append('<li class="lp-meta-box__file_list-item image" data-attachment_id="'+e.id+'"><img class="is_file" src="'+e.icon+'" /><span>'+e.filename+'</span><ul class="actions"><li><a href="#" class="delete"></a></li></ul></li>')})),c(),o.val(t)}))),n.open()}),i&&l.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"lp-metabox-sortable-placeholder",start(e,t){t.item.css("background-color","#f6f6f6")},stop(e,t){t.item.removeAttr("style")},update(){let t="";l.find("li.image").css("cursor","default").each((function(){const a=e(this).attr("data-attachment_id");t=t+a+","})),c(),o.val(t)}});const c=()=>{e(l).find("li.image").each((t,a)=>{e(a).find("a.delete").on("click",(function(){if(e(a).remove(),i){let t="";e(l).find("li.image").css("cursor","default").each((function(){const a=e(this).attr("data-attachment_id");t=t+a+","})),o.val(t)}else o.val("");return!1}))})};c()})};e(document).ready((function(){if(i(),s(),e(".learn-press-dropdown-pages").LP("DropdownPages"),e(".learn-press-advertisement-slider").LP("Advertisement","a","s").appendTo(e("#wpbody-content")),e(".learn-press-toggle-item-preview").on("change",t),e(".learn-press-tip").LP("QuickTip"),e(document).on("click","#learn-press-create-pages",a).on("click",".lp-upgrade-notice .close-notice",n).on("click",".plugin-action-buttons a",o).on("click","[data-remove-confirm]",l).on("mousedown",".lp-sortable-handle",(function(t){e("html, body").addClass("lp-item-moving"),e(t.target).closest(".lp-sortable-handle").css("cursor","inherit")})).on("mouseup",(function(t){e("html, body").removeClass("lp-item-moving"),e(".lp-sortable-handle").css("cursor","")})),e("#order-export__section").length){document.querySelectorAll(".tabs");const t=document.querySelectorAll(".tab"),a=document.querySelectorAll(".panel");function c(e){for(let e=0;e<t.length;e++)t[e].classList.remove("active");for(let e=0;e<a.length;e++)a[e].classList.remove("active");e.target.classList.add("active");const n=e.target.getAttribute("data-target");document.getElementById("panels").getElementsByClassName(n)[0].classList.add("active")}for(let e=0;e<t.length;e++)t[e].addEventListener("click",c,!1);const n=document.getElementById("myModal"),o=document.getElementById("order-export__button"),l=document.getElementsByClassName("close")[0];o.onclick=function(){n.style.display="block"},l.onclick=function(){n.style.display="none"},window.onclick=function(e){e.target==n&&(n.style.display="none")},e("#lp-invoice__content").length&&e("#lp-invoice__export").click((function(){const t=new jsPDF("p","pt","letter"),a={"#bypassme":(e,t)=>!0},n={top:80,bottom:60,left:40,width:522};t.fromHTML(e("#lp-invoice__content")[0],n.left,n.top,{width:n.width,elementHandlers:a},(function(e){const a=t.output("blob");window.open(URL.createObjectURL(a))}),n)})),e("#lp-invoice__update").click((function(){let t=e(this).data("id"),a=e('input[name="site_title"]'),n=e('input[name="order_date"]'),o=e('input[name="invoice_no"]'),l=e('input[name="order_customer"]'),s=e('input[name="order_email"]'),i=e('input[name="order_payment"]');a=a.is(":checked")?"check":"uncheck",n=n.is(":checked")?"check":"uncheck",o=o.is(":checked")?"check":"uncheck",l=l.is(":checked")?"check":"uncheck",s=s.is(":checked")?"check":"uncheck",i=i.is(":checked")?"check":"uncheck",e.ajax({type:"post",dataType:"html",url:"admin-ajax.php",data:{site_title:a,order_date:n,invoice_no:o,order_customer:l,order_email:s,order_id:t,order_payment:i,action:"learnpress_update_order_exports"},beforeSend(){e(".export-options__loading").addClass("active")},success(t){e("#lp-invoice__content").html(""),e("#lp-invoice__content").append(t),e(".export-options__loading").removeClass("active"),e(".options-tab").removeClass("active"),e(".preview-tab").addClass("active"),e("#panels .export-options").removeClass("active"),e("#panels .pdf-preview").addClass("active")},error(e,t,a){console.log("The following error occured: "+t,a)}})}))}if(e.fn._filter_post_by_author(),window.location.hash){const t=window.location.hash;if("#_lp_passing_grade"==t){const a=document.querySelector(t);e("html, body").animate({scrollTop:e(t).offset().top},900,"swing"),a.parentNode.style.border="2px solid orangered"}}e("input").on("click",(function(t){const a=e(t.target),n=a.attr("id").replace("learn_press_",""),o=e(".show_if_"+n);a.is(":checked")?o.show():o.hide()}))}))}(jQuery);
assets/js/dist/frontend/checkout.js CHANGED
@@ -176,7 +176,12 @@ var __webpack_exports__ = {};
176
  message = '<div class="learn-press-message ' + (typeof wrap === 'string' ? wrap : '') + '">' + message + '</div>';
177
  }
178
 
179
- $formCheckout.prepend(message);
 
 
 
 
 
180
  $('html, body').animate({
181
  scrollTop: $formCheckout.offset().top - 100
182
  }, 1000);
176
  message = '<div class="learn-press-message ' + (typeof wrap === 'string' ? wrap : '') + '">' + message + '</div>';
177
  }
178
 
179
+ if (Array.isArray(message)) {
180
+ message.map(msg => $formCheckout.prepend('<div class="learn-press-message error">' + msg + '</div>'));
181
+ } else {
182
+ $formCheckout.prepend('<div class="learn-press-message error">' + message + '</div>');
183
+ }
184
+
185
  $('html, body').animate({
186
  scrollTop: $formCheckout.offset().top - 100
187
  }, 1000);
assets/js/dist/frontend/checkout.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"use strict";void 0===window.LP&&(window.LP={});const n=LP.Checkout=function(t){const n=e("#learn-press-checkout-form"),s=e("#learn-press-checkout-login"),o=e("#learn-press-checkout-register"),i=e(".payment-methods"),r=e("#learn-press-checkout-place-order"),c=e('input[name="guest_email"]');let a="";void 0===String.prototype.isEmail&&(String.prototype.isEmail=function(){return new RegExp("^[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&'*+\\/0-9=?A-Z^_`a-z{|}~]+.[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+$").test(this)});const l=function(){const t=n.toggle().is(":visible");s.toggle(!t),o.toggle(!t),e("#learn-press-button-guest-checkout").toggle(!t)},u=function(t){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d(),e.isPlainObject(t)?Object.keys(t).reverse().forEach((e=>{const s=t[e];let o=Array.isArray(s)?s[0]:s;const i=Array.isArray(s)?s[1]:"";o='<div class="learn-press-message '+("string"==typeof i?i:"")+'">'+o+"</div>",n.prepend(o)})):(s&&(t='<div class="learn-press-message '+("string"==typeof s?s:"")+'">'+t+"</div>"),n.prepend(t),e("html, body").animate({scrollTop:n.offset().top-100},1e3),e(document).trigger("learn-press/checkout-error"))},d=function(){e(".learn-press-error, .learn-press-notice, .learn-press-message").remove()},g=function(e,t){t=o.find(".learn-press-form-register").toggle(t).is(":visible"),o.find('.checkout-form-register-toggle[data-toggle="show"]').toggle(!t),e&&(e.preventDefault(),h(null,!t))},h=function(e,t){t=s.find(".learn-press-form-login").toggle(t).is(":visible"),s.find('.checkout-form-login-toggle[data-toggle="show"]').toggle(!t),e&&(e.preventDefault(),g(null,!t))};r.on("click",(function(e){})),e(".lp-button-guest-checkout").on("click",l),e("#learn-press-button-cancel-guest-checkout").on("click",l),c.on("keyup changex",(function(){this.value.isEmail()&&(this.timer&&clearTimeout(this.timer),c.addClass("loading"),this.timer=setTimeout((function(){e.post({url:window.location.href,data:{"lp-ajax":"checkout-user-email-exists",email:c.val()},success(t){const n=LP.parseJSON(t);c.removeClass("loading"),e(".lp-guest-checkout-output").remove(),n&&n.output&&c.after(n.output)}})}),500))})).trigger("changex"),i.on("change select",'input[name="payment_method"]',(function(){const t=e(this).val(),n=i.children().filter(".selected").removeClass("selected"),s=n.find("#payment_method_"+a).data("order_button_text");n.find(".payment-method-form").slideUp(),n.end().filter("#learn-press-payment-method-"+t).addClass("selected").find(".payment-method-form").hide().slideDown(),a=n.find("payment_method").val(),s&&r.html(s)})),n.on("submit",(function(s){if(s.preventDefault(),i.length>0&&!i.find('input[name="payment_method"]:checked').val())return u("Please select payment method",!0),!1;let o={};(n.find('input[name="checkout-account-switch-form"]:checked').length=0)||(o=e.extend(o,function(){const t=n.find('input[name="checkout-account-switch-form"]:checked').val();return e("#checkout-account-"+t).serializeJSON()}(),e(".learn-press-checkout-comment").serializeJSON())),o=e.extend(o,e("#checkout-payment").serializeJSON()),d();const c=r.text(),a=new URL(t.ajaxurl);return a.searchParams.set("lp-ajax","checkout"),e.ajax({url:a,dataType:"html",data:o,type:"POST",beforeSend(){e("#learn-press-checkout-place-order").addClass("loading"),r.html(t.i18n_processing)},success(n){(n=LP.parseJSON(n)).messages?function(t){u(t);const n=Object.keys(t)[0];e('input[name="'+n+'"]:visible').trigger("focus")}(n.messages):n.message&&u('<div class="learn-press-message error">'+n.message+"</div>"),e("#learn-press-checkout-place-order").removeClass("loading"),"success"===n.result?n.redirect&&n.redirect.match(/https?/)&&(r.html(t.i18n_redirecting),window.location=n.redirect):r.html(c)},error(t,n,s){e("#learn-press-checkout-place-order").removeClass("loading"),u('<div class="learn-press-message error">'+s+"</div>"),r.html(c),LP.unblockContent()}}),!1})),i.children(".selected").find('input[name="payment_method"]').trigger("select"),s.on("click",".checkout-form-login-toggle",h),o.on("click",".checkout-form-register-toggle",g),o.find("input").each((function(){if(-1!==e.inArray(e(this).attr("type").toLowerCase(),["text","email","number"])&&e(this).val())return g(),!1})),s.find('input:not([type="hidden"])').each((function(){if(-1!==e.inArray(e(this).attr("type").toLowerCase(),["text","email","number"])&&e(this).val())return h(),!1})),o.length&&!s.length?g():!o.length&&s.length&&h(),n.on("change",'input[name="checkout-account-switch-form"]',(function(){e(this).next().find('input:not([type="hidden"]):visible').first().trigger("focus")})).on("change","#guest_email",(function(){n.find("#reg_email").val(this.value)})).on("change","#reg_email",(function(){n.find("#guest_email").val(this.value)})),setTimeout((function(){n.find('input:not([type="hidden"]):visible').first().trigger("focus")}),300)};e(document).ready((function(){"undefined"!=typeof lpCheckoutSettings&&(LP.$checkout=new n(lpCheckoutSettings))}))}(jQuery);
1
+ !function(e,t){"use strict";void 0===window.LP&&(window.LP={});const n=LP.Checkout=function(t){const n=e("#learn-press-checkout-form"),s=e("#learn-press-checkout-login"),r=e("#learn-press-checkout-register"),i=e(".payment-methods"),o=e("#learn-press-checkout-place-order"),a=e('input[name="guest_email"]');let c="";void 0===String.prototype.isEmail&&(String.prototype.isEmail=function(){return new RegExp("^[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&'*+\\/0-9=?A-Z^_`a-z{|}~]+.[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+$").test(this)});const l=function(){const t=n.toggle().is(":visible");s.toggle(!t),r.toggle(!t),e("#learn-press-button-guest-checkout").toggle(!t)},u=function(t){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d(),e.isPlainObject(t)?Object.keys(t).reverse().forEach((e=>{const s=t[e];let r=Array.isArray(s)?s[0]:s;const i=Array.isArray(s)?s[1]:"";r='<div class="learn-press-message '+("string"==typeof i?i:"")+'">'+r+"</div>",n.prepend(r)})):(s&&(t='<div class="learn-press-message '+("string"==typeof s?s:"")+'">'+t+"</div>"),Array.isArray(t)?t.map((e=>n.prepend('<div class="learn-press-message error">'+e+"</div>"))):n.prepend('<div class="learn-press-message error">'+t+"</div>"),e("html, body").animate({scrollTop:n.offset().top-100},1e3),e(document).trigger("learn-press/checkout-error"))},d=function(){e(".learn-press-error, .learn-press-notice, .learn-press-message").remove()},g=function(e,t){t=r.find(".learn-press-form-register").toggle(t).is(":visible"),r.find('.checkout-form-register-toggle[data-toggle="show"]').toggle(!t),e&&(e.preventDefault(),m(null,!t))},m=function(e,t){t=s.find(".learn-press-form-login").toggle(t).is(":visible"),s.find('.checkout-form-login-toggle[data-toggle="show"]').toggle(!t),e&&(e.preventDefault(),g(null,!t))};o.on("click",(function(e){})),e(".lp-button-guest-checkout").on("click",l),e("#learn-press-button-cancel-guest-checkout").on("click",l),a.on("keyup changex",(function(){this.value.isEmail()&&(this.timer&&clearTimeout(this.timer),a.addClass("loading"),this.timer=setTimeout((function(){e.post({url:window.location.href,data:{"lp-ajax":"checkout-user-email-exists",email:a.val()},success(t){const n=LP.parseJSON(t);a.removeClass("loading"),e(".lp-guest-checkout-output").remove(),n&&n.output&&a.after(n.output)}})}),500))})).trigger("changex"),i.on("change select",'input[name="payment_method"]',(function(){const t=e(this).val(),n=i.children().filter(".selected").removeClass("selected"),s=n.find("#payment_method_"+c).data("order_button_text");n.find(".payment-method-form").slideUp(),n.end().filter("#learn-press-payment-method-"+t).addClass("selected").find(".payment-method-form").hide().slideDown(),c=n.find("payment_method").val(),s&&o.html(s)})),n.on("submit",(function(s){if(s.preventDefault(),i.length>0&&!i.find('input[name="payment_method"]:checked').val())return u("Please select payment method",!0),!1;let r={};(n.find('input[name="checkout-account-switch-form"]:checked').length=0)||(r=e.extend(r,function(){const t=n.find('input[name="checkout-account-switch-form"]:checked').val();return e("#checkout-account-"+t).serializeJSON()}(),e(".learn-press-checkout-comment").serializeJSON())),r=e.extend(r,e("#checkout-payment").serializeJSON()),d();const a=o.text(),c=new URL(t.ajaxurl);return c.searchParams.set("lp-ajax","checkout"),e.ajax({url:c,dataType:"html",data:r,type:"POST",beforeSend(){e("#learn-press-checkout-place-order").addClass("loading"),o.html(t.i18n_processing)},success(n){(n=LP.parseJSON(n)).messages?function(t){u(t);const n=Object.keys(t)[0];e('input[name="'+n+'"]:visible').trigger("focus")}(n.messages):n.message&&u('<div class="learn-press-message error">'+n.message+"</div>"),e("#learn-press-checkout-place-order").removeClass("loading"),"success"===n.result?n.redirect&&n.redirect.match(/https?/)&&(o.html(t.i18n_redirecting),window.location=n.redirect):o.html(a)},error(t,n,s){e("#learn-press-checkout-place-order").removeClass("loading"),u('<div class="learn-press-message error">'+s+"</div>"),o.html(a),LP.unblockContent()}}),!1})),i.children(".selected").find('input[name="payment_method"]').trigger("select"),s.on("click",".checkout-form-login-toggle",m),r.on("click",".checkout-form-register-toggle",g),r.find("input").each((function(){if(-1!==e.inArray(e(this).attr("type").toLowerCase(),["text","email","number"])&&e(this).val())return g(),!1})),s.find('input:not([type="hidden"])').each((function(){if(-1!==e.inArray(e(this).attr("type").toLowerCase(),["text","email","number"])&&e(this).val())return m(),!1})),r.length&&!s.length?g():!r.length&&s.length&&m(),n.on("change",'input[name="checkout-account-switch-form"]',(function(){e(this).next().find('input:not([type="hidden"]):visible').first().trigger("focus")})).on("change","#guest_email",(function(){n.find("#reg_email").val(this.value)})).on("change","#reg_email",(function(){n.find("#guest_email").val(this.value)})),setTimeout((function(){n.find('input:not([type="hidden"]):visible').first().trigger("focus")}),300)};e(document).ready((function(){"undefined"!=typeof lpCheckoutSettings&&(LP.$checkout=new n(lpCheckoutSettings))}))}(jQuery);
assets/js/dist/frontend/courses.js CHANGED
@@ -6,6 +6,11 @@ var __webpack_exports__ = {};
6
  const urlCourses = lpGlobalSettings.courses_url || '';
7
  const urlCurrent = document.location.href;
8
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
 
 
 
 
 
9
 
10
  if (lpGlobalSettings.is_course_archive) {
11
  const queryString = window.location.search;
@@ -24,19 +29,22 @@ const lpArchiveAddQueryArgs = (endpoint, args) => {
24
  };
25
 
26
  const lpArchiveCourse = () => {
27
- const elements = document.querySelectorAll('.lp-archive-course-skeleton');
 
28
 
29
- if (!elements.length) {
30
  return;
31
  }
32
 
33
- lpArchiveRequestCourse(filterCourses);
34
- };
 
35
 
36
- let skeleton;
37
- let skeletonClone;
38
- let isLoading = false;
39
- let firstLoad = 1;
 
40
 
41
  window.lpArchiveRequestCourse = (args, callBackSuccess) => {
42
  const wpRestUrl = lpGlobalSettings.lp_rest_url;
@@ -45,6 +53,10 @@ window.lpArchiveRequestCourse = (args, callBackSuccess) => {
45
  return;
46
  }
47
 
 
 
 
 
48
  const archive = document.querySelector('.lp-archive-courses');
49
  const archiveCourse = archive && archive.querySelector('div.lp-archive-courses .lp-content-area');
50
  const listCourse = archiveCourse && archiveCourse.querySelector('ul.learn-press-courses');
@@ -60,7 +72,6 @@ window.lpArchiveRequestCourse = (args, callBackSuccess) => {
60
  isLoading = true;
61
 
62
  if (!skeletonClone) {
63
- skeleton = document.querySelector('.lp-archive-course-skeleton');
64
  skeletonClone = skeleton.outerHTML;
65
  } else {
66
  listCourse.append(skeleton); // return;
@@ -103,8 +114,8 @@ window.lpArchiveRequestCourse = (args, callBackSuccess) => {
103
  }).catch(error => {
104
  listCourse.innerHTML += `<div class="lp-ajax-message error" style="display:block">${error.message || 'Error: Query lp/v1/courses/archive-course'}</div>`;
105
  }).finally(() => {
106
- isLoading = false;
107
- skeleton && skeleton.remove();
108
  jQuery('form.search-courses button').removeClass('loading');
109
 
110
  if (!firstLoad) {
@@ -133,6 +144,10 @@ const lpArchiveSearchCourse = () => {
133
  const btn = s.querySelector('[type="submit"]');
134
  let timeOutSearch;
135
  search.addEventListener('keyup', event => {
 
 
 
 
136
  event.preventDefault();
137
  const s = event.target.value.trim();
138
 
@@ -163,6 +178,11 @@ const lpArchivePaginationCourse = () => {
163
  paginationEle.length > 0 && paginationEle.forEach(ele => ele.addEventListener('click', event => {
164
  event.preventDefault();
165
  event.stopPropagation();
 
 
 
 
 
166
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
167
  const urlString = event.currentTarget.getAttribute('href');
168
 
6
  const urlCourses = lpGlobalSettings.courses_url || '';
7
  const urlCurrent = document.location.href;
8
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
9
+ let skeleton;
10
+ let skeletonClone;
11
+ let isLoading = false;
12
+ let firstLoad = 1;
13
+ let elNoLoadAjaxFirst = null;
14
 
15
  if (lpGlobalSettings.is_course_archive) {
16
  const queryString = window.location.search;
29
  };
30
 
31
  const lpArchiveCourse = () => {
32
+ skeleton = document.querySelector('.lp-archive-course-skeleton');
33
+ elNoLoadAjaxFirst = document.querySelector('.no-first-load-ajax');
34
 
35
+ if (!skeleton) {
36
  return;
37
  }
38
 
39
+ if (skeleton && !elNoLoadAjaxFirst) {
40
+ lpArchiveRequestCourse(filterCourses);
41
+ }
42
 
43
+ if (elNoLoadAjaxFirst) {
44
+ lpArchivePaginationCourse();
45
+ lpArchiveSearchCourse();
46
+ }
47
+ };
48
 
49
  window.lpArchiveRequestCourse = (args, callBackSuccess) => {
50
  const wpRestUrl = lpGlobalSettings.lp_rest_url;
53
  return;
54
  }
55
 
56
+ if (!skeleton) {
57
+ return;
58
+ }
59
+
60
  const archive = document.querySelector('.lp-archive-courses');
61
  const archiveCourse = archive && archive.querySelector('div.lp-archive-courses .lp-content-area');
62
  const listCourse = archiveCourse && archiveCourse.querySelector('ul.learn-press-courses');
72
  isLoading = true;
73
 
74
  if (!skeletonClone) {
 
75
  skeletonClone = skeleton.outerHTML;
76
  } else {
77
  listCourse.append(skeleton); // return;
114
  }).catch(error => {
115
  listCourse.innerHTML += `<div class="lp-ajax-message error" style="display:block">${error.message || 'Error: Query lp/v1/courses/archive-course'}</div>`;
116
  }).finally(() => {
117
+ isLoading = false; // skeleton && skeleton.remove();
118
+
119
  jQuery('form.search-courses button').removeClass('loading');
120
 
121
  if (!firstLoad) {
144
  const btn = s.querySelector('[type="submit"]');
145
  let timeOutSearch;
146
  search.addEventListener('keyup', event => {
147
+ if (skeleton) {
148
+ skeleton.style.display = 'block';
149
+ }
150
+
151
  event.preventDefault();
152
  const s = event.target.value.trim();
153
 
178
  paginationEle.length > 0 && paginationEle.forEach(ele => ele.addEventListener('click', event => {
179
  event.preventDefault();
180
  event.stopPropagation();
181
+
182
+ if (skeleton) {
183
+ skeleton.style.display = 'block';
184
+ }
185
+
186
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
187
  const urlString = event.currentTarget.getAttribute('href');
188
 
assets/js/dist/frontend/courses.min.js CHANGED
@@ -1 +1 @@
1
- !function(){lpGlobalSettings.courses_url;const e=document.location.href;let t=JSON.parse(window.localStorage.getItem("lp_filter_courses"))||{};lpGlobalSettings.is_course_archive&&(window.location.search.length||-1!==e.search("page")||(t={}));const r=(e,t)=>{const r=new URL(e);return Object.keys(t).forEach((e=>{r.searchParams.set(e,t[e])})),r};let o,s,n=!1,c=1;window.lpArchiveRequestCourse=(e,t)=>{const u=lpGlobalSettings.lp_rest_url;if(!u)return;const i=document.querySelector(".lp-archive-courses"),p=i&&i.querySelector("div.lp-archive-courses .lp-content-area"),d=p&&p.querySelector("ul.learn-press-courses");if(!d)return;if(n)return;n=!0,s?d.append(o):(o=document.querySelector(".lp-archive-course-skeleton"),s=o.outerHTML);const h=r(u+"lp/v1/courses/archive-course",{...lpArchiveSkeleton,...e});wp.apiFetch({path:"lp/v1/courses/archive-course"+h.search,method:"GET"}).then((e=>{void 0!==e.data.content&&d&&(d.innerHTML=e.data.content||"");const r=e.data.pagination;a();const o=document.querySelector(".learn-press-pagination");if(o&&o.remove(),void 0!==r){const e=(new DOMParser).parseFromString(r,"text/html").querySelector(".learn-press-pagination");e&&(d.after(e),l())}wp.hooks.doAction("lp-js-get-courses",e),"function"==typeof t&&t(e)})).catch((e=>{d.innerHTML+=`<div class="lp-ajax-message error" style="display:block">${e.message||"Error: Query lp/v1/courses/archive-course"}</div>`})).finally((()=>{if(n=!1,o&&o.remove(),jQuery("form.search-courses button").removeClass("loading"),c)c=0;else{const e={behavior:"smooth"};i.scrollIntoView(e)}window.localStorage.setItem("lp_filter_courses",JSON.stringify(e));const t=r(document.location,e);window.history.pushState("","",t)}))};const a=()=>{const e=document.querySelectorAll("form.search-courses");let t=JSON.parse(window.localStorage.getItem("lp_filter_courses"))||{};e.forEach((e=>{const r=e.querySelector('input[name="c_search"]'),o=e.querySelector('[type="submit"]');let s;r.addEventListener("keyup",(e=>{e.preventDefault();const r=e.target.value.trim();(!r||r&&r.length>2)&&(void 0!==s&&clearTimeout(s),s=setTimeout((function(){o.classList.add("loading"),t.c_search=r,t.paged=1,lpArchiveRequestCourse({...t})}),800))})),e.addEventListener("submit",(t=>{t.preventDefault();const r=e.querySelector('input[name="c_search"]');r&&r.dispatchEvent(new Event("keyup"))}))}))},l=()=>{const e=document.querySelectorAll(".lp-archive-courses .learn-press-pagination .page-numbers");e.length>0&&e.forEach((t=>t.addEventListener("click",(r=>{r.preventDefault(),r.stopPropagation();let o=JSON.parse(window.localStorage.getItem("lp_filter_courses"))||{};if(r.currentTarget.getAttribute("href")){const s=[...e].filter((e=>e.classList.contains("current"))),n=r.currentTarget.textContent||t.classList.contains("next")&&parseInt(s[0].textContent)+1||t.classList.contains("prev")&&parseInt(s[0].textContent)-1;o.paged=n,lpArchiveRequestCourse({...o})}}))))};document.addEventListener("DOMContentLoaded",(function(e){document.querySelectorAll(".lp-archive-course-skeleton").length&&lpArchiveRequestCourse(t),(()=>{const e=document.querySelectorAll('.lp-archive-courses input[name="lp-switch-layout-btn"]');e.length>0&&e.forEach((e=>e.addEventListener("change",(e=>{e.preventDefault();const t=e.target.value;if(t){const e=document.querySelector(".lp-archive-courses .learn-press-courses[data-layout]");e&&(e.dataset.layout=t),LP.Cookies.set("courses-layout",t)}}))))})(),(()=>{const e=LP.Cookies.get("courses-layout"),t=document.querySelectorAll('.lp-courses-bar .switch-layout [name="lp-switch-layout-btn"]');t.length>0&&[...t].map((t=>t.value===e&&(t.checked=!0)))})()}))}();
1
+ !function(){lpGlobalSettings.courses_url;const e=document.location.href;let t,r,o=JSON.parse(window.localStorage.getItem("lp_filter_courses"))||{},s=!1,n=1,c=null;lpGlobalSettings.is_course_archive&&(window.location.search.length||-1!==e.search("page")||(o={}));const a=(e,t)=>{const r=new URL(e);return Object.keys(t).forEach((e=>{r.searchParams.set(e,t[e])})),r};window.lpArchiveRequestCourse=(e,o)=>{const c=lpGlobalSettings.lp_rest_url;if(!c)return;if(!t)return;const i=document.querySelector(".lp-archive-courses"),p=i&&i.querySelector("div.lp-archive-courses .lp-content-area"),d=p&&p.querySelector("ul.learn-press-courses");if(!d)return;if(s)return;s=!0,r?d.append(t):r=t.outerHTML;const h=a(c+"lp/v1/courses/archive-course",{...lpArchiveSkeleton,...e});wp.apiFetch({path:"lp/v1/courses/archive-course"+h.search,method:"GET"}).then((e=>{void 0!==e.data.content&&d&&(d.innerHTML=e.data.content||"");const t=e.data.pagination;l();const r=document.querySelector(".learn-press-pagination");if(r&&r.remove(),void 0!==t){const e=(new DOMParser).parseFromString(t,"text/html").querySelector(".learn-press-pagination");e&&(d.after(e),u())}wp.hooks.doAction("lp-js-get-courses",e),"function"==typeof o&&o(e)})).catch((e=>{d.innerHTML+=`<div class="lp-ajax-message error" style="display:block">${e.message||"Error: Query lp/v1/courses/archive-course"}</div>`})).finally((()=>{if(s=!1,jQuery("form.search-courses button").removeClass("loading"),n)n=0;else{const e={behavior:"smooth"};i.scrollIntoView(e)}window.localStorage.setItem("lp_filter_courses",JSON.stringify(e));const t=a(document.location,e);window.history.pushState("","",t)}))};const l=()=>{const e=document.querySelectorAll("form.search-courses");let r=JSON.parse(window.localStorage.getItem("lp_filter_courses"))||{};e.forEach((e=>{const o=e.querySelector('input[name="c_search"]'),s=e.querySelector('[type="submit"]');let n;o.addEventListener("keyup",(e=>{t&&(t.style.display="block"),e.preventDefault();const o=e.target.value.trim();(!o||o&&o.length>2)&&(void 0!==n&&clearTimeout(n),n=setTimeout((function(){s.classList.add("loading"),r.c_search=o,r.paged=1,lpArchiveRequestCourse({...r})}),800))})),e.addEventListener("submit",(t=>{t.preventDefault();const r=e.querySelector('input[name="c_search"]');r&&r.dispatchEvent(new Event("keyup"))}))}))},u=()=>{const e=document.querySelectorAll(".lp-archive-courses .learn-press-pagination .page-numbers");e.length>0&&e.forEach((r=>r.addEventListener("click",(o=>{o.preventDefault(),o.stopPropagation(),t&&(t.style.display="block");let s=JSON.parse(window.localStorage.getItem("lp_filter_courses"))||{};if(o.currentTarget.getAttribute("href")){const t=[...e].filter((e=>e.classList.contains("current"))),n=o.currentTarget.textContent||r.classList.contains("next")&&parseInt(t[0].textContent)+1||r.classList.contains("prev")&&parseInt(t[0].textContent)-1;s.paged=n,lpArchiveRequestCourse({...s})}}))))};document.addEventListener("DOMContentLoaded",(function(e){t=document.querySelector(".lp-archive-course-skeleton"),c=document.querySelector(".no-first-load-ajax"),t&&(t&&!c&&lpArchiveRequestCourse(o),c&&(u(),l())),(()=>{const e=document.querySelectorAll('.lp-archive-courses input[name="lp-switch-layout-btn"]');e.length>0&&e.forEach((e=>e.addEventListener("change",(e=>{e.preventDefault();const t=e.target.value;if(t){const e=document.querySelector(".lp-archive-courses .learn-press-courses[data-layout]");e&&(e.dataset.layout=t),LP.Cookies.set("courses-layout",t)}}))))})(),(()=>{const e=LP.Cookies.get("courses-layout"),t=document.querySelectorAll('.lp-courses-bar .switch-layout [name="lp-switch-layout-btn"]');t.length>0&&[...t].map((t=>t.value===e&&(t.checked=!0)))})()}))}();
assets/src/apps/js/frontend/checkout.js CHANGED
@@ -183,7 +183,11 @@
183
  message = '<div class="learn-press-message ' + ( typeof ( wrap ) === 'string' ? wrap : '' ) + '">' + message + '</div>';
184
  }
185
 
186
- $formCheckout.prepend( message );
 
 
 
 
187
 
188
  $( 'html, body' ).animate( {
189
  scrollTop: ( $formCheckout.offset().top - 100 ),
183
  message = '<div class="learn-press-message ' + ( typeof ( wrap ) === 'string' ? wrap : '' ) + '">' + message + '</div>';
184
  }
185
 
186
+ if ( Array.isArray( message ) ) {
187
+ message.map( ( msg ) => $formCheckout.prepend( '<div class="learn-press-message error">' + msg + '</div>') );
188
+ } else {
189
+ $formCheckout.prepend( '<div class="learn-press-message error">' + message + '</div>' );
190
+ }
191
 
192
  $( 'html, body' ).animate( {
193
  scrollTop: ( $formCheckout.offset().top - 100 ),
assets/src/apps/js/frontend/courses.js CHANGED
@@ -1,6 +1,11 @@
1
  const urlCourses = lpGlobalSettings.courses_url || '';
2
  const urlCurrent = document.location.href;
3
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
 
 
 
 
 
4
 
5
  if( lpGlobalSettings.is_course_archive ) {
6
  const queryString = window.location.search;
@@ -21,19 +26,23 @@ const lpArchiveAddQueryArgs = ( endpoint, args ) => {
21
  };
22
 
23
  const lpArchiveCourse = () => {
24
- const elements = document.querySelectorAll( '.lp-archive-course-skeleton' );
 
25
 
26
- if ( ! elements.length ) {
27
  return;
28
  }
29
 
30
- lpArchiveRequestCourse( filterCourses );
 
 
 
 
 
 
 
31
  };
32
 
33
- let skeleton;
34
- let skeletonClone;
35
- let isLoading = false;
36
- let firstLoad = 1;
37
  window.lpArchiveRequestCourse = ( args, callBackSuccess ) => {
38
  const wpRestUrl = lpGlobalSettings.lp_rest_url;
39
 
@@ -41,6 +50,10 @@ window.lpArchiveRequestCourse = ( args, callBackSuccess ) => {
41
  return;
42
  }
43
 
 
 
 
 
44
  const archive = document.querySelector( '.lp-archive-courses' );
45
  const archiveCourse = archive && archive.querySelector( 'div.lp-archive-courses .lp-content-area' );
46
  const listCourse = archiveCourse && archiveCourse.querySelector( 'ul.learn-press-courses' );
@@ -56,10 +69,9 @@ window.lpArchiveRequestCourse = ( args, callBackSuccess ) => {
56
  isLoading = true;
57
 
58
  if ( ! skeletonClone ) {
59
- skeleton = document.querySelector( '.lp-archive-course-skeleton' );
60
  skeletonClone = skeleton.outerHTML;
61
  } else {
62
- listCourse.append(skeleton);
63
  // return;
64
  }
65
 
@@ -102,7 +114,7 @@ window.lpArchiveRequestCourse = ( args, callBackSuccess ) => {
102
  listCourse.innerHTML += `<div class="lp-ajax-message error" style="display:block">${ error.message || 'Error: Query lp/v1/courses/archive-course' }</div>`;
103
  } ).finally( () => {
104
  isLoading = false;
105
- skeleton && skeleton.remove();
106
 
107
  jQuery( 'form.search-courses button' ).removeClass( 'loading' );
108
 
@@ -132,6 +144,9 @@ const lpArchiveSearchCourse = () => {
132
  let timeOutSearch;
133
 
134
  search.addEventListener( 'keyup', ( event ) => {
 
 
 
135
  event.preventDefault();
136
 
137
  const s = event.target.value.trim();
@@ -168,6 +183,10 @@ const lpArchivePaginationCourse = () => {
168
  event.preventDefault();
169
  event.stopPropagation();
170
 
 
 
 
 
171
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
172
 
173
  const urlString = event.currentTarget.getAttribute( 'href' );
1
  const urlCourses = lpGlobalSettings.courses_url || '';
2
  const urlCurrent = document.location.href;
3
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
4
+ let skeleton;
5
+ let skeletonClone;
6
+ let isLoading = false;
7
+ let firstLoad = 1;
8
+ let elNoLoadAjaxFirst = null;
9
 
10
  if( lpGlobalSettings.is_course_archive ) {
11
  const queryString = window.location.search;
26
  };
27
 
28
  const lpArchiveCourse = () => {
29
+ skeleton = document.querySelector( '.lp-archive-course-skeleton' );
30
+ elNoLoadAjaxFirst = document.querySelector( '.no-first-load-ajax' );
31
 
32
+ if ( ! skeleton ) {
33
  return;
34
  }
35
 
36
+ if ( skeleton && ! elNoLoadAjaxFirst ) {
37
+ lpArchiveRequestCourse( filterCourses );
38
+ }
39
+
40
+ if ( elNoLoadAjaxFirst ) {
41
+ lpArchivePaginationCourse();
42
+ lpArchiveSearchCourse();
43
+ }
44
  };
45
 
 
 
 
 
46
  window.lpArchiveRequestCourse = ( args, callBackSuccess ) => {
47
  const wpRestUrl = lpGlobalSettings.lp_rest_url;
48
 
50
  return;
51
  }
52
 
53
+ if ( ! skeleton ) {
54
+ return;
55
+ }
56
+
57
  const archive = document.querySelector( '.lp-archive-courses' );
58
  const archiveCourse = archive && archive.querySelector( 'div.lp-archive-courses .lp-content-area' );
59
  const listCourse = archiveCourse && archiveCourse.querySelector( 'ul.learn-press-courses' );
69
  isLoading = true;
70
 
71
  if ( ! skeletonClone ) {
 
72
  skeletonClone = skeleton.outerHTML;
73
  } else {
74
+ listCourse.append( skeleton );
75
  // return;
76
  }
77
 
114
  listCourse.innerHTML += `<div class="lp-ajax-message error" style="display:block">${ error.message || 'Error: Query lp/v1/courses/archive-course' }</div>`;
115
  } ).finally( () => {
116
  isLoading = false;
117
+ // skeleton && skeleton.remove();
118
 
119
  jQuery( 'form.search-courses button' ).removeClass( 'loading' );
120
 
144
  let timeOutSearch;
145
 
146
  search.addEventListener( 'keyup', ( event ) => {
147
+ if( skeleton ) {
148
+ skeleton.style.display = 'block';
149
+ }
150
  event.preventDefault();
151
 
152
  const s = event.target.value.trim();
183
  event.preventDefault();
184
  event.stopPropagation();
185
 
186
+ if( skeleton ) {
187
+ skeleton.style.display = 'block';
188
+ }
189
+
190
  let filterCourses = JSON.parse(window.localStorage.getItem('lp_filter_courses')) || {};
191
 
192
  const urlString = event.currentTarget.getAttribute( 'href' );
assets/src/js/admin/admin.js CHANGED
@@ -104,7 +104,7 @@
104
  dataType: 'json',
105
  s: '',
106
  },
107
- placeholder: 'Search by user',
108
  minimumInputLength: 3,
109
  allowClear: true,
110
  } ).on( 'select2:select', function() {
@@ -496,6 +496,20 @@
496
  ele.parentNode.style.border = '2px solid orangered';
497
  }
498
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
  };
500
 
501
  $( document ).ready( onReady );
104
  dataType: 'json',
105
  s: '',
106
  },
107
+ placeholder: wp.i18n.__( 'Search by user', 'learnpress' ),
108
  minimumInputLength: 3,
109
  allowClear: true,
110
  } ).on( 'select2:select', function() {
496
  ele.parentNode.style.border = '2px solid orangered';
497
  }
498
  }
499
+
500
+ // Show/hide meta-box field with type checkbox
501
+ $( 'input' ).on( 'click' , function ( e ) {
502
+ const el = $( e.target );
503
+ const id = el.attr( 'id' );
504
+ const classHide = id.replace('learn_press_', '');
505
+ const elHide = $(`.show_if_${classHide}`);
506
+
507
+ if ( el.is(':checked') ) {
508
+ elHide.show();
509
+ } else {
510
+ elHide.hide();
511
+ }
512
+ });
513
  };
514
 
515
  $( document ).ready( onReady );
config/settings/course.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Settings Courses
4
+ */
5
+ $generate_course_thumbnail = get_option( 'learn_press_generate_course_thumbnail', 'no' );
6
+ $des_option_redirect_finish_course = wp_sprintf(
7
+ '%s<br>%s',
8
+ esc_html__( 'The site will be redirected to the URL added after clicking finish course button.', 'learnpress' ),
9
+ esc_html__( 'Set blank, the site will be redirected to the single course page', 'learnpress' )
10
+ );
11
+
12
+ return apply_filters(
13
+ 'learn-press/courses-settings-fields',
14
+ array_merge(
15
+ apply_filters(
16
+ 'learn-press/course-settings-fields/general',
17
+ array(
18
+ array(
19
+ 'title' => esc_html__( 'General', 'learnpress' ),
20
+ 'type' => 'title',
21
+ ),
22
+ 'review_course' => array(
23
+ 'title' => esc_html__( 'Review courses', 'learnpress' ),
24
+ 'desc' => esc_html__( 'Courses created by instructors will be pending in review first.', 'learnpress' ),
25
+ 'id' => 'required_review',
26
+ 'default' => 'yes',
27
+ 'type' => 'checkbox',
28
+ ),
29
+ 'auto_start' => array(
30
+ 'title' => esc_html__( 'Auto start', 'learnpress' ),
31
+ 'id' => 'auto_enroll',
32
+ 'default' => 'yes',
33
+ 'type' => 'checkbox',
34
+ 'desc' => esc_html__( 'Students will get started courses immediately after successfully purchased.', 'learnpress' ),
35
+ ),
36
+ 'enable_popup_confirm_finish' => array(
37
+ 'title' => __( 'Enable confirmation popup finish course, complete item', 'learnpress' ),
38
+ 'desc' => __( 'Show confirmation popup before finishing course or completing item.', 'learnpress' ),
39
+ 'id' => 'enable_popup_confirm_finish',
40
+ 'default' => 'yes',
41
+ 'type' => 'checkbox',
42
+ ),
43
+ 'archive_courses_layout' => array(
44
+ 'title' => esc_html__( 'Archive page layout', 'learnpress' ),
45
+ 'desc' => esc_html__( 'Type display list course on Course Archive page', 'learnpress' ),
46
+ 'id' => 'archive_courses_layout',
47
+ 'default' => 'list',
48
+ 'type' => 'select',
49
+ 'options' => learn_press_courses_layouts(),
50
+ ),
51
+ 'archive_course_limit' => array(
52
+ 'title' => esc_html__( 'Courses per page', 'learnpress' ),
53
+ 'desc' => esc_html__( 'Number of courses displayed per page.', 'learnpress' ),
54
+ 'id' => 'archive_course_limit',
55
+ 'default' => '8',
56
+ 'type' => 'number',
57
+ 'custom_attributes' => array(
58
+ 'min' => '1',
59
+ ),
60
+ 'css' => 'min-width: 50px; width: 50px;',
61
+ ),
62
+ 'courses_load_ajax' => array(
63
+ 'title' => esc_html__( 'Enable loading ajax Courses on the Course Archive page', 'learnpress' ),
64
+ 'desc' => __( 'On/Off <i>loading ajax Courses</i>', 'learnpress' ),
65
+ 'id' => 'courses_load_ajax',
66
+ 'default' => 'yes',
67
+ 'type' => 'checkbox',
68
+ ),
69
+ 'course_no_first_page_ajax' => array(
70
+ 'title' => esc_html__( 'Not run Ajax when reloading Course Archive page', 'learnpress' ),
71
+ 'desc' => esc_html__( 'Ajax is only applied when selecting pagination, filtering, searching and sorting. Not applicable when reloading Course Archive page.', 'learnpress' ),
72
+ 'id' => 'courses_first_no_ajax',
73
+ 'default' => 'no',
74
+ 'type' => 'checkbox',
75
+ 'show_if_checked' => 'courses_load_ajax',
76
+ ),
77
+ 'course_thumbnail_dimensions' => array(
78
+ 'title' => esc_html__( 'Thumbnail dimensions', 'learnpress' ),
79
+ 'id' => 'course_thumbnail_dimensions',
80
+ 'default' => array( 500, 300, 'yes' ),
81
+ 'type' => 'image-dimensions',
82
+ ),
83
+ 'course_finish_redirect' => array(
84
+ 'title' => esc_html__( 'Redirect when finish course', 'learnpress' ),
85
+ 'id' => 'course_finish_redirect',
86
+ 'default' => '',
87
+ 'type' => 'url',
88
+ 'placeholder' => 'https://learnpress.com/',
89
+ 'desc' => $des_option_redirect_finish_course,
90
+ ),
91
+ array(
92
+ 'type' => 'sectionend',
93
+ ),
94
+ )
95
+ ),
96
+ apply_filters(
97
+ 'learn-press/course-settings-fields/curriculum',
98
+ array(
99
+ array(
100
+ 'type' => 'title',
101
+ 'title' => esc_html__( 'Curriculum Settings', 'learnpress' ),
102
+ 'id' => 'lp_metabox_curriculum_setting',
103
+ ),
104
+ 'section_per_page' => array(
105
+ 'title' => esc_html__( 'Section Per Page', 'learnpress' ),
106
+ 'id' => 'section_per_page',
107
+ 'default' => 2,
108
+ 'type' => 'number',
109
+ 'desc' => esc_html__( 'Number of sections displayed per page ( Enter -1 for display all sections).', 'learnpress' ),
110
+ ),
111
+ 'course_item_per_page' => array(
112
+ 'title' => esc_html__( 'Course Item Per Page', 'learnpress' ),
113
+ 'id' => 'course_item_per_page',
114
+ 'default' => 5,
115
+ 'type' => 'number',
116
+ 'desc' => esc_html__( 'Number of course items displayed per page in section ( Enter -1 for display all course items).', 'learnpress' ),
117
+ ),
118
+ array(
119
+ 'type' => 'sectionend',
120
+ 'id' => 'lp_metabox_curriculum_setting',
121
+ ),
122
+ )
123
+ ),
124
+ apply_filters(
125
+ 'learn-press/course-settings-fields/single',
126
+ array(
127
+ array(
128
+ 'title' => esc_html__( 'Permalinks', 'learnpress' ),
129
+ 'type' => 'title',
130
+ ),
131
+ array(
132
+ 'title' => esc_html__( 'Course', 'learnpress' ),
133
+ 'type' => 'course-permalink',
134
+ 'default' => '',
135
+ 'id' => 'course_base',
136
+ ),
137
+ 'lesson_slug' => array(
138
+ 'title' => esc_html__( 'Lesson', 'learnpress' ),
139
+ 'type' => 'text',
140
+ 'id' => 'lesson_slug',
141
+ 'desc' => sprintf( 'e.g. %s/course/sample-course/<code>lessons</code>/sample-lesson/', home_url() ),
142
+ 'default' => 'lessons',
143
+ 'placeholder' => 'lesson',
144
+ ),
145
+ 'quiz_slug' => array(
146
+ 'title' => esc_html__( 'Quiz', 'learnpress' ),
147
+ 'type' => 'text',
148
+ 'id' => 'quiz_slug',
149
+ 'desc' => sprintf( 'e.g. %s/course/sample-course/<code>quizzes</code>/sample-quiz/', home_url() ),
150
+ 'default' => 'quizzes',
151
+ 'placeholder' => 'quizzes',
152
+ ),
153
+ 'course_category_base' => array(
154
+ 'title' => esc_html__( 'Category base', 'learnpress' ),
155
+ 'id' => 'course_category_base',
156
+ 'default' => 'course-category',
157
+ 'type' => 'text',
158
+ 'placeholder' => 'course-category',
159
+ 'desc' => sprintf( 'e.g. %s/course/%s/sample-course/', home_url(), '<code>course-category</code>' ),
160
+ ),
161
+ 'course_tag_base' => array(
162
+ 'title' => esc_html__( 'Tag base', 'learnpress' ),
163
+ 'id' => 'course_tag_base',
164
+ 'default' => 'course-tag',
165
+ 'type' => 'text',
166
+ 'placeholder' => 'course-tag',
167
+ 'desc' => sprintf( 'e.g. %s/course/%s/sample-course/', home_url(), '<code>course-tag</code>' ),
168
+ ),
169
+ array(
170
+ 'type' => 'sectionend',
171
+ ),
172
+ )
173
+ )
174
+ )
175
+ );
inc/abstract-settings.php CHANGED
@@ -192,7 +192,7 @@ abstract class LP_Abstract_Settings {
192
 
193
  // Single value
194
  } else {
195
- $option_value = LP()->settings()->get( preg_replace( '!^learn_press_!', '', $option_name ), null );
196
  }
197
 
198
  if ( is_array( $option_value ) ) {
192
 
193
  // Single value
194
  } else {
195
+ $option_value = LP_Settings::instance()->get( preg_replace( '!^learn_press_!', '', $option_name ), null );
196
  }
197
 
198
  if ( is_array( $option_value ) ) {
inc/abstracts/abstract-assets.php CHANGED
@@ -124,6 +124,7 @@ abstract class LP_Abstract_Assets {
124
  * Path translate of a string on file ".pot" if have must map to js/dist
125
  */
126
  wp_set_script_translations( 'lp-quiz', 'learnpress' );
 
127
  }
128
 
129
  /**
124
  * Path translate of a string on file ".pot" if have must map to js/dist
125
  */
126
  wp_set_script_translations( 'lp-quiz', 'learnpress' );
127
+ wp_set_script_translations( 'lp-admin', 'learnpress' );
128
  }
129
 
130
  /**
inc/admin/class-lp-admin-ajax.php CHANGED
@@ -117,170 +117,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
117
  }
118
  }
119
 
120
- /**
121
- * @editor tungnx
122
- * @model 4.1.4 comment - not use
123
- */
124
- /*public static function sync_calculate_course_results() {
125
- if ( ! isset( $_REQUEST['sync'] ) ) {
126
- return;
127
- }
128
-
129
- $sync = LP_Helper::sanitize_params_submitted( $_REQUEST['sync'] );
130
-
131
- if ( empty( $sync ) ) {
132
- die();
133
- }
134
-
135
- global $wpdb;
136
- $api = LP_Repair_Database::instance();
137
-
138
- if ( $sync === 'get-users' ) {
139
- $query = $wpdb->prepare(
140
- "
141
- SELECT ID
142
- FROM {$wpdb->users}
143
- WHERE 1
144
- ",
145
- 1
146
- );
147
-
148
- $users = $wpdb->get_col( $query );
149
-
150
- learn_press_send_json( array( 'users' => $users ) );
151
- }
152
-
153
- $api->calculate_course_results( $sync );
154
- learn_press_send_json( array( 'result' => 'success' ) );
155
-
156
- die();
157
- }*/
158
-
159
- /**
160
- * Sync orders for each course
161
- *
162
- * @since 3.1.0
163
- * @editor tungnx
164
- * @modify 4.1.4 comment - not use
165
- */
166
- /*public static function sync_course_orders() {
167
- if ( empty( $_REQUEST['sync'] ) ) {
168
- die();
169
- }
170
-
171
- global $wpdb;
172
- $api = LP_Repair_Database::instance();
173
- $sync = $_REQUEST['sync'];
174
-
175
- if ( $sync === 'get-courses' ) {
176
- learn_press_send_json( array( 'courses' => $api->get_all_courses() ) );
177
- }
178
-
179
- $api->sync_course_orders( $sync );
180
- learn_press_send_json( array( 'result' => 'success' ) );
181
-
182
- die();
183
- }*/
184
-
185
- /**
186
- * Sync orders for each user
187
- *
188
- * @since 3.1.0
189
- * @editor tungnx
190
- * @modify 4.1.4 comment - not use
191
- */
192
- /*public static function sync_user_orders() {
193
- if ( empty( $_REQUEST['sync'] ) ) {
194
- die();
195
- }
196
-
197
- global $wpdb;
198
- $api = LP_Repair_Database::instance();
199
- $sync = $_REQUEST['sync'];
200
-
201
- if ( $sync === 'get-users' ) {
202
- $query = $wpdb->prepare(
203
- "
204
- SELECT ID
205
- FROM {$wpdb->users}
206
- WHERE 1
207
- ",
208
- 1
209
- );
210
-
211
- $users = $wpdb->get_col( $query );
212
-
213
- learn_press_send_json( array( 'users' => $users ) );
214
- }
215
-
216
- $api->sync_user_orders( $sync );
217
- learn_press_send_json( array( 'result' => 'success' ) );
218
-
219
- die();
220
- }*/
221
-
222
- /**
223
- * Remap final quiz for each course
224
- *
225
- * @since 3.1.0
226
- * @editor tungnx
227
- * @deprecated 4.1.5
228
- */
229
- /*public static function sync_course_final_quiz() {
230
- if ( empty( $_REQUEST['sync'] ) ) {
231
- die();
232
- }
233
-
234
- global $wpdb;
235
- $api = LP_Repair_Database::instance();
236
- $sync = $_REQUEST['sync'];
237
-
238
- if ( $sync === 'get-courses' ) {
239
- learn_press_send_json( array( 'courses' => $api->get_all_courses() ) );
240
- }
241
-
242
- $api->sync_course_final_quiz( $sync );
243
- learn_press_send_json( array( 'result' => 'success' ) );
244
-
245
- die();
246
- }*/
247
-
248
- /**
249
- * @editor tungnx
250
- * @comment 4.1.4 comment - not use
251
- */
252
- /*public static function sync_remove_older_data() {
253
- $api = LP_Repair_Database::instance();
254
- $api->remove_older_post_meta();
255
- learn_press_send_json( array( 'result' => 'success' ) );
256
- die();
257
- }*/
258
-
259
- /**
260
- * Get html of order status to display in WP Dashboad
261
- * @editor tungnx
262
- * @modify 4.1.4 comment - not use
263
- */
264
- /*public static function dashboard_order_status() {
265
- learn_press_admin_view( 'dashboard/order-status' );
266
- die();
267
- }*/
268
-
269
- /**
270
- * @editor tungnx
271
- * @modify 4.1.4 comment - not use
272
- */
273
- /*public static function dashboard_plugin_status() {
274
- $dashboard = new LP_Admin_Dashboard();
275
- $plugin_data = $dashboard->get_data();
276
- if ( ! $plugin_data || is_wp_error( $plugin_data ) ) {
277
- learn_press_admin_view( 'dashboard/plugin-status/html-no-data' );
278
- } else {
279
- learn_press_admin_view( 'dashboard/plugin-status/html-results', array( 'plugin_data' => $plugin_data ) );
280
- }
281
- die();
282
- }*/
283
-
284
  /**
285
  * Search user on some pages on the Backend
286
  */
@@ -366,61 +202,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
366
  learn_press_send_json_success( $result );
367
  }
368
 
369
- /**
370
- * Send data to join newsletter or dismiss.
371
- *
372
- * [
373
- * This function has deprecated since 3.2.6 from this class.
374
- * Please check class LP_Admin and hook learn-press/dismissed-notice-response for more details.
375
- * Newsletter function be hooked to the hook above to send subscription when
376
- * notice has already dismissed.
377
- * ]
378
- *
379
- * @deprecated
380
- *
381
- * @since 3.0.10
382
- * @editable tungnx
383
- * @model 4.1.4 comment - not use
384
- */
385
- /*public static function join_newsletter() {
386
- $context = LP_Request::get_string( 'context' );
387
- if ( ! $context || $context != 'newsletter' ) {
388
- update_option( 'learn-press-dismissed-newsletter-button', 1 );
389
- learn_press_send_json_success( __( 'Dismissed!', 'learnpress' ) );
390
- }
391
- $user = learn_press_get_current_user();
392
- if ( ! $user || $user->get_email() == '' ) {
393
- learn_press_send_json_error( __( 'Fail while joining newsletter! Please try again!', 'learnpress' ) );
394
- }
395
- $url = 'https://thimpress.com/mailster/subscribe';
396
- $response = wp_remote_post(
397
- $url,
398
- array(
399
- 'method' => 'POST',
400
- 'timeout' => 45,
401
- 'redirection' => 5,
402
- 'httpversion' => '1.0',
403
- 'blocking' => true,
404
- 'headers' => array(),
405
- 'body' => array(
406
- '_referer' => 'extern',
407
- '_nonce' => '4b266caf7b',
408
- 'formid' => '19',
409
- 'email' => $user->get_email(),
410
- 'website' => site_url(),
411
- ),
412
- 'cookies' => array(),
413
- )
414
- );
415
- if ( is_wp_error( $response ) ) {
416
- $error_message = $response->get_error_message();
417
- learn_press_send_json_error( __( 'Something went wrong: ', 'learnpress' ) . $error_message );
418
- } else {
419
- update_option( 'learn-press-dismissed-newsletter-button', 1 );
420
- learn_press_send_json_success( __( 'Thank you for subscribing! Please check and click the confirmation link from the email we\'ve just sent to your mail box.', 'learnpress' ) );
421
- }
422
- }*/
423
-
424
  /**
425
  * Duplicate course, lesson, quiz, question.
426
  *
@@ -547,30 +328,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
547
  learn_press_send_json( $response );
548
  }
549
 
550
- /**
551
- * Toggle lesson preview.
552
- */
553
- /*public static function toggle_item_preview() {
554
- $id = learn_press_get_request( 'item_id' );
555
- if ( in_array(
556
- get_post_type( $id ),
557
- apply_filters(
558
- 'learn-press/reviewable-post-types',
559
- array(
560
- 'lp_lesson',
561
- 'lp_quiz',
562
- )
563
- )
564
- ) && wp_verify_nonce( learn_press_get_request( 'nonce' ), 'learn-press-toggle-item-preview' )
565
- ) {
566
- $previewable = learn_press_get_request( 'previewable' );
567
- if ( is_null( $previewable ) ) {
568
- $previewable = '0';
569
- }
570
- update_post_meta( $id, '_lp_preview', $previewable );
571
- }
572
- }*/
573
-
574
  /**
575
  * Search items by requesting params.
576
  */
@@ -809,57 +566,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
809
  $statistic->load_chart();
810
  }
811
 
812
- /**
813
- * @param $query
814
- *
815
- * @editor tungnx
816
- * @model 4.1.4 comment - not use
817
- */
818
- /*public static function search_users() {
819
- if ( ! current_user_can( 'edit_lp_orders' ) ) {
820
- die( - 1 );
821
- }
822
-
823
- $term = LP_Helper::sanitize_params_submitted( $_REQUEST['term'] );
824
-
825
- if ( empty( $term ) ) {
826
- die( __FILE__ . '::' . __FUNCTION__ );
827
-
828
- }
829
-
830
- $found_customers = array();
831
-
832
- add_action( 'pre_user_query', array( __CLASS__, 'json_search_customer_name' ) );
833
-
834
- $customers_query = new WP_User_Query(
835
- apply_filters(
836
- 'learn_press_search_customers_query',
837
- array(
838
- 'fields' => 'all',
839
- 'orderby' => 'display_name',
840
- 'search' => '*' . $term . '*',
841
- 'search_columns' => array( 'ID', 'user_login', 'user_email', 'user_nicename' ),
842
- )
843
- )
844
- );
845
-
846
- remove_action( 'pre_user_query', array( __CLASS__, 'json_search_customer_name' ) );
847
-
848
- $customers = $customers_query->get_results();
849
-
850
- if ( ! empty( $customers ) ) {
851
- foreach ( $customers as $customer ) {
852
- $found_customers[] = array(
853
- 'label' => $customer->display_name . ' (#' . $customer->ID . ' &ndash; ' . sanitize_email( $customer->user_email ) . ')',
854
- 'value' => $customer->ID,
855
- );
856
- }
857
- }
858
-
859
- echo json_encode( $found_customers );
860
- die();
861
- }*/
862
-
863
  public static function json_search_customer_name( $query ) {
864
  global $wpdb;
865
 
@@ -874,38 +580,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
874
  $query->query_where .= $wpdb->prepare( ' OR user_name.meta_value LIKE %s ', '%' . $term . '%' );
875
  }
876
 
877
- /**
878
- * Dismiss notice
879
- *
880
- * @update 3.2.6
881
- * @editor tungnx
882
- * @comment 4.1.4 comment - not use
883
- */
884
- /*public static function dismiss_notice() {
885
- $name = learn_press_get_request( 'name' );
886
- $value = learn_press_get_request( 'value' );
887
- $expired = learn_press_get_request( 'expired' );
888
-
889
- // LP_Admin_Notice::instance()->dismiss_notice_2( $name, $value, $expired );
890
-
891
- die();
892
- }*/
893
-
894
- /*
895
- * comment by tungnnx
896
- * @reason not uses - low security
897
- * @since 3.2.6.8
898
- */
899
- /*
900
- public static function plugin_action() {
901
- $url = learn_press_get_request( 'url' );
902
- ob_start();
903
- wp_remote_get( $url );
904
- ob_get_clean();
905
- echo wp_remote_get( admin_url( 'admin.php?page=learn-press-addons&tab=installed' ) );
906
- die();
907
- }*/
908
-
909
  /**
910
  * create new page on LP Settings
911
  *
@@ -955,179 +629,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
955
  learn_press_send_json( $response );
956
  }
957
 
958
- /**
959
- * Create LP static pages
960
- *
961
- * @editor tungnx
962
- * @model 4.1.4 comment - not use
963
- */
964
- /*public static function create_pages() {
965
- check_admin_referer( 'create-pages' );
966
-
967
- $pages = LP_Request::get_list_array( 'pages' );
968
- $pages = array_fill_keys( $pages, '' );
969
- $all_pages = learn_press_static_page_ids();
970
- $page_names = learn_press_static_pages();
971
-
972
- if ( empty( $pages ) ) {
973
- $pages = $all_pages;
974
- }
975
-
976
- foreach ( $pages as $id => $page_id ) {
977
- if ( ! empty( $all_pages[ $id ] ) ) {
978
- continue;
979
- }
980
-
981
- $page_id = LP_Helper::create_page( isset( $page_names[ $id ] ) ? $page_names[ $id ] : ucfirst( $id ), $id );
982
- }
983
-
984
- LP()->flush_rewrite_rules();
985
-
986
- echo esc_html__( 'The required pages are successfully created.', 'learnpress' );
987
-
988
- die();
989
- }*/
990
-
991
- /**
992
- * Install sample data or dismiss the notice depending on user's option
993
- */
994
- /*public static function install_sample_data() {
995
- $yes = ! empty( $_REQUEST['yes'] ) ? $_REQUEST['yes'] : '';
996
- $response = array( 'result' => 'fail' );
997
- $retry_button = sprintf( '<a href="" class="button yes" data-action="yes">%s</a>', __( 'Please try again.', 'learnpress' ) );
998
- $dismiss_button = sprintf( '<a href="" class="button disabled no" data-action="no">%s</a>', __( 'Cancel', 'learnpress' ) );
999
- $buttons = sprintf( '<p>%s %s</p>', $retry_button, $dismiss_button );
1000
- if ( 'no' == $yes ) {
1001
- set_transient( 'learn_press_install_sample_data', 'off', 12 * HOUR_IN_SECONDS );
1002
- } else {
1003
- $result = array( 'status' => 'activate' );// learn_press_install_and_active_add_on( 'learnpress-import-export' );
1004
- if ( 'activate' == $result['status'] ) {
1005
- // copy dummy-data.xml to import folder of the add-on
1006
- lpie_mkdir( lpie_import_path() );
1007
- if ( file_exists( lpie_import_path() ) ) {
1008
- $import_source = LP_PLUGIN_PATH . '/dummy-data/dummy-data.xml';
1009
- $file = 'dummy-data-' . time() . '.xml';
1010
- $copy = lpie_import_path() . '/' . $file;
1011
- copy( $import_source, $copy );
1012
- if ( file_exists( $copy ) ) {
1013
- $url = admin_url( 'admin-ajax.php?page=learn_press_import_export&tab=import-course' );
1014
- $postdata = array(
1015
- 'step' => 2,
1016
- 'action' => 'learn_press_import',
1017
- 'import-file' => 'import/' . $file,
1018
- 'nonce' => wp_create_nonce( 'lpie-import-file' ),
1019
- 'x' => 1,
1020
- );
1021
- $response['url'] = $url = $url . '&' . http_build_query( $postdata ) . "\n";
1022
- $response['result'] = 'success';
1023
- $response['message'] = sprintf( '<p>%s <a href="edit.php?post_type=lp_course">%s</a> </p>', __( 'Successfully import sample data.', 'learnpress' ), __( 'View courses', 'learnpress' ) );
1024
- }
1025
- }
1026
- if ( $response['result'] == 'fail' ) {
1027
- $response['message'] = sprintf( '<p>%s</p>%s', __( 'Failed to import sample data. Please try again.', 'learnpress' ), $buttons );
1028
- }
1029
- } else {
1030
- $response['result'] = 'fail';
1031
- $response['message'] = sprintf( '<p>%s</p>', __( 'Unknown error when installing/activating Import/Export add-on. Please try again!', 'learnpress' ) ) . $buttons;
1032
- }
1033
- }
1034
- learn_press_send_json( $response );
1035
- die();
1036
- }*/
1037
-
1038
- /**
1039
- * Activate a bundle of add-ons, if an add-on is not installed then install it first
1040
- *
1041
- * @editor tungnx
1042
- * @model 4.1.4 comment - not use
1043
- */
1044
- /*public static function bundle_activate_add_ons() {
1045
- global $learn_press_add_ons;
1046
- include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // for plugins_api..
1047
- $response = array( 'addons' => array() );
1048
-
1049
- if ( ! current_user_can( 'activate_plugins' ) ) {
1050
- $response['error'] = __( 'You do not have the permission to deactivate plugins on this site.', 'learnpress' );
1051
- } else {
1052
-
1053
- $add_ons = $learn_press_add_ons['bundle_activate'];
1054
-
1055
- if ( $add_ons ) {
1056
- foreach ( $add_ons as $slug ) {
1057
- $response['addons'][ $slug ] = learn_press_install_and_active_add_on( $slug );
1058
- }
1059
- }
1060
- }
1061
- learn_press_send_json( $response );
1062
- }*/
1063
-
1064
- /**
1065
- * Activate a bundle of add-ons, if an add-on is not installed then install it first
1066
- *
1067
- * @editor tungnx
1068
- * @model 4.1.4 comment - not use
1069
- */
1070
- /*public static function bundle_activate_add_on() {
1071
- $response = array();
1072
- include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // for plugins_api..
1073
- if ( ! current_user_can( 'activate_plugins' ) ) {
1074
- $response['error'] = __( 'You do not have the permission to deactivate plugins on this site.', 'learnpress' );
1075
- } else {
1076
- $slug = ! empty( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : null;
1077
- $response[ $slug ] = learn_press_install_and_active_add_on( $slug );
1078
- }
1079
- learn_press_send_json( $response );
1080
- }*/
1081
-
1082
- /**
1083
- * @editor tungnx
1084
- * @reason not use
1085
- * @deprecated 4.0.0.
1086
- */
1087
- /*
1088
- public static function plugin_install() {
1089
- $plugin_name = ! empty( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
1090
- $response = learn_press_install_add_on( $plugin_name );
1091
- learn_press_send_json( $response );
1092
- die();
1093
- }*/
1094
-
1095
- /*
1096
- * @editor tungnx
1097
- * @reason not use
1098
- * @since 3.2.6.8
1099
- */
1100
- /*
1101
- public static function update_add_on_status() {
1102
- $plugin = ! empty( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
1103
- $t = ! empty( $_REQUEST['t'] ) ? $_REQUEST['t'] : '';
1104
- $response = array();
1105
- if ( ! current_user_can( 'activate_plugins' ) ) {
1106
- $response['error'] = __( 'You do not have the permission to deactivate plugins on this site.', 'learnpress' );
1107
- }
1108
- if ( $plugin && $t ) {
1109
- if ( $t == 'activate' ) {
1110
- activate_plugin( $plugin, false, is_network_admin() );
1111
- } else {
1112
- deactivate_plugins( $plugin, false, is_network_admin() );
1113
- }
1114
- $is_activate = is_plugin_active( $plugin );
1115
- $response['status'] = $is_activate ? 'activate' : 'deactivate';
1116
-
1117
- }
1118
- wp_send_json( $response );
1119
- die();
1120
- }*/
1121
-
1122
- /**
1123
- * Output the image to browser with text and params passed via $_GET
1124
- */
1125
- /*public static function dummy_image() {
1126
- $text = LP_Helper::sanitize_params_submitted( $_REQUEST['text'] ?? '' );
1127
- learn_press_text_image( $text, $_GET );
1128
- die();
1129
- }*/
1130
-
1131
  /**
1132
  * Get edit|view link of a page
1133
  */
@@ -1158,176 +659,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
1158
  die();
1159
  }
1160
 
1161
- /**
1162
- * @editor tungnx
1163
- * @model 4.1.4 comment - not use
1164
- */
1165
- /*public static function ignore_setting_up() {
1166
- update_option( '_lpr_ignore_setting_up', 1, true );
1167
- die;
1168
- }*/
1169
-
1170
- /**
1171
- * @editor tungnx
1172
- * @model 4.1.4 comment - not use
1173
- */
1174
- /*public static function remove_notice_popup() {
1175
- if ( isset( $_POST['action'] ) && $_POST['action'] === 'learnpress_remove_notice_popup' && isset( $_POST['slug'] ) && ! empty( $_POST['slug'] ) && isset( $_POST['user'] ) && ! empty( $_POST['user'] ) ) {
1176
- $slug = 'learnpress_notice_' . $_POST['slug'] . '_' . $_POST['user'];
1177
- set_transient( $slug, true, 30 * DAY_IN_SECONDS );
1178
- }
1179
-
1180
- wp_die();
1181
- }*/
1182
-
1183
- /*
1184
- public static function update_order_status() {
1185
-
1186
- $order_id = learn_press_get_request( 'order_id' );
1187
- $value = learn_press_get_request( 'value' );
1188
-
1189
- $order = array(
1190
- 'ID' => $order_id,
1191
- 'post_status' => $value,
1192
- );
1193
-
1194
- wp_update_post( $order ) ? $response['success'] = true : $response['success'] = false;
1195
-
1196
- learn_press_send_json( $response );
1197
-
1198
- die();
1199
- }*/
1200
-
1201
- /**
1202
- * Upload avatar of user
1203
- *
1204
- * @editor tungnx
1205
- * @modify 4.1.5
1206
- */
1207
- // public static function upload_user_avatar() {
1208
- // $user_id = get_current_user_id();
1209
-
1210
- // if ( ! $user_id ) {
1211
- // return;
1212
- // }
1213
-
1214
- // $file = $_FILES['lp-upload-avatar'];
1215
- // $upload_dir = learn_press_user_profile_picture_upload_dir();
1216
-
1217
- // add_filter( 'upload_dir', array( __CLASS__, '_user_avatar_upload_dir' ), 10000 );
1218
-
1219
- // $file_info_arr = explode( '.', $file['name'] );
1220
- // $file_info_arr_length = count( $file_info_arr );
1221
- // $file_ext_index = $file_info_arr_length - 1;
1222
- // $file_ext = $file_info_arr[ $file_ext_index ];
1223
- // $file['name'] = $user_id . '.' . $file_ext;
1224
-
1225
- // // Delete old image if exists
1226
- // $path_img = get_user_meta( $user_id, '_lp_profile_picture', true );
1227
- // if ( $path_img ) {
1228
- // $path = $upload_dir['basedir'] . '/' . $path_img;
1229
- // if ( file_exists( $path ) ) {
1230
- // @unlink( $path );
1231
- // }
1232
- // }
1233
-
1234
- // $result = wp_handle_upload(
1235
- // $file,
1236
- // array(
1237
- // 'test_form' => false,
1238
- // )
1239
- // );
1240
-
1241
- // remove_filter( 'upload_dir', array( __CLASS__, '_user_avatar_upload_dir' ), 10000 );
1242
- // if ( is_array( $result ) ) {
1243
- // $result['name'] = $upload_dir['subdir'] . '/' . basename( $result['file'] );
1244
- // update_user_meta( $user_id, '_lp_profile_picture', $result['name'] );
1245
- // unset( $result['file'] );
1246
- // } else {
1247
- // $result = array(
1248
- // 'error' => __( 'Profile picture upload failed', 'learnpress' ),
1249
- // );
1250
- // }
1251
- // learn_press_send_json( $result );
1252
- // }
1253
-
1254
- // /**
1255
- // * Crop avatar of user
1256
- // *
1257
- // * @editor tungnx
1258
- // * @return void
1259
- // */
1260
- // public static function save_uploaded_user_avatar() {
1261
- // $avatar_data = wp_parse_args(
1262
- // LP_Request::get( 'lp-user-avatar-crop' ),
1263
- // array(
1264
- // 'name' => '',
1265
- // 'width' => '',
1266
- // 'height' => '',
1267
- // 'points' => '',
1268
- // 'nonce' => '',
1269
- // )
1270
- // );
1271
-
1272
- // $current_user_id = get_current_user_id();
1273
-
1274
- // if ( ! wp_verify_nonce( $avatar_data['nonce'], 'save-uploaded-profile-' . $current_user_id ) ) {
1275
- // die( 'ERROR VERIFY NONCE!' );
1276
- // }
1277
-
1278
- // $url = learn_press_update_user_profile_avatar();
1279
- // if ( $url ) {
1280
- // learn_press_send_json(
1281
- // array(
1282
- // 'success' => true,
1283
- // 'avatar' => sprintf( '<img src="%s" />', $url ),
1284
- // )
1285
- // );
1286
- // };
1287
-
1288
- // wp_die();
1289
- // }
1290
-
1291
- // /**
1292
- // * Remove avatar of user
1293
- // *
1294
- // * @author tungnx
1295
- // * @since 4.1.5
1296
- // * @version 1.0.0
1297
- // * @return void
1298
- // */
1299
- // public static function remove_avatar() {
1300
- // $response = new LP_REST_Response();
1301
-
1302
- // try {
1303
- // $user_id = get_current_user_id();
1304
- // if ( ! $user_id ) {
1305
- // throw new Exception( __( 'User is invalid', 'learnpress' ) );
1306
- // }
1307
-
1308
- // // Delete old image if exists
1309
- // $path_img = get_user_meta( $user_id, '_lp_profile_picture', true );
1310
- // if ( $path_img ) {
1311
- // $upload_dir = learn_press_user_profile_picture_upload_dir();
1312
- // $path = $upload_dir['basedir'] . '/' . $path_img;
1313
- // if ( file_exists( $path ) ) {
1314
- // unlink( $path );
1315
- // $response->status = 'success';
1316
- // }
1317
- // }
1318
- // } catch ( Throwable $e ) {
1319
- // $response->message = $e->getMessage();
1320
- // }
1321
-
1322
- // wp_send_json( $response );
1323
- // }
1324
-
1325
- // public static function _user_avatar_upload_dir( $dir ) {
1326
- // $dir = learn_press_user_profile_picture_upload_dir();
1327
-
1328
- // return $dir;
1329
- // }
1330
-
1331
  /**
1332
  * Export Order invoice to PDF
1333
  *
@@ -1336,12 +667,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
1336
  */
1337
  public static function update_order_exports() {
1338
  $order_id = absint( $_POST['order_id'] );
1339
- //$site_title = LP_Helper::sanitize_params_submitted( $_POST['site_title'] );
1340
- //$order_date = LP_Helper::sanitize_params_submitted( $_POST['order_date'] );
1341
- //$invoice_no = LP_Helper::sanitize_params_submitted( $_POST['invoice_no'] );
1342
- //$order_customer = LP_Helper::sanitize_params_submitted( $_POST['order_customer'] );
1343
- //$order_email = LP_Helper::sanitize_params_submitted( $_POST['order_email'] );
1344
- //$order_payment = LP_Helper::sanitize_params_submitted( $_POST['order_payment'] );
1345
  $order = learn_press_get_order( $order_id );
1346
  $currency_symbol = learn_press_get_currency_symbol( $order->get_currency() );
1347
 
@@ -1359,11 +684,5 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
1359
  }
1360
  }
1361
 
1362
- // if ( defined( 'DOING_AJAX' ) ) {
1363
- // add_action( 'wp_ajax_learnpress_upload-user-avatar', array( 'LP_Admin_Ajax', 'upload_user_avatar' ) );
1364
- // add_action( 'wp_ajax_learnpress_save-uploaded-user-avatar', array( 'LP_Admin_Ajax', 'save_uploaded_user_avatar' ) );
1365
- // add_action( 'wp_ajax_learnpress_remove-avatar', array( 'LP_Admin_Ajax', 'remove_avatar' ) );
1366
- // }
1367
-
1368
  add_action( 'init', array( 'LP_Admin_Ajax', 'init' ) );
1369
  }
117
  }
118
  }
119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  /**
121
  * Search user on some pages on the Backend
122
  */
202
  learn_press_send_json_success( $result );
203
  }
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  /**
206
  * Duplicate course, lesson, quiz, question.
207
  *
328
  learn_press_send_json( $response );
329
  }
330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  /**
332
  * Search items by requesting params.
333
  */
566
  $statistic->load_chart();
567
  }
568
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
569
  public static function json_search_customer_name( $query ) {
570
  global $wpdb;
571
 
580
  $query->query_where .= $wpdb->prepare( ' OR user_name.meta_value LIKE %s ', '%' . $term . '%' );
581
  }
582
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
583
  /**
584
  * create new page on LP Settings
585
  *
629
  learn_press_send_json( $response );
630
  }
631
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
632
  /**
633
  * Get edit|view link of a page
634
  */
659
  die();
660
  }
661
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
  /**
663
  * Export Order invoice to PDF
664
  *
667
  */
668
  public static function update_order_exports() {
669
  $order_id = absint( $_POST['order_id'] );
 
 
 
 
 
 
670
  $order = learn_press_get_order( $order_id );
671
  $currency_symbol = learn_press_get_currency_symbol( $order->get_currency() );
672
 
684
  }
685
  }
686
 
 
 
 
 
 
 
687
  add_action( 'init', array( 'LP_Admin_Ajax', 'init' ) );
688
  }
inc/admin/class-lp-admin-assets.php CHANGED
@@ -62,14 +62,14 @@ class LP_Admin_Assets extends LP_Abstract_Assets {
62
  protected function _get_scripts(): array {
63
  $lp_admin_js = new LP_Asset_Key(
64
  $this->url( self::$_folder_source . 'js/admin/admin' . self::$_min_assets . '.js' ),
65
- array( 'learn-press-global', 'lp-utils', 'wp-color-picker', 'jspdf' ),
66
  array(),
67
  0,
68
  1
69
  );
70
  $lp_admin_js->exclude_screen( array( 'plugin-install' ) );
71
 
72
- return apply_filters(
73
  'learn-press/admin-default-scripts',
74
  array(
75
  // need build if change source vue
@@ -277,6 +277,8 @@ class LP_Admin_Assets extends LP_Abstract_Assets {
277
  ),
278
  )
279
  );
 
 
280
  }
281
 
282
  /**
62
  protected function _get_scripts(): array {
63
  $lp_admin_js = new LP_Asset_Key(
64
  $this->url( self::$_folder_source . 'js/admin/admin' . self::$_min_assets . '.js' ),
65
+ array( 'learn-press-global', 'lp-utils', 'wp-color-picker', 'jspdf', 'vue-libs', 'wp-i18n' ),
66
  array(),
67
  0,
68
  1
69
  );
70
  $lp_admin_js->exclude_screen( array( 'plugin-install' ) );
71
 
72
+ $scripts = apply_filters(
73
  'learn-press/admin-default-scripts',
74
  array(
75
  // need build if change source vue
277
  ),
278
  )
279
  );
280
+
281
+ return $scripts;
282
  }
283
 
284
  /**
inc/admin/class-lp-setup-wizard.php CHANGED
@@ -56,7 +56,7 @@ class LP_Setup_Wizard {
56
  */
57
  public static function get_price_format() {
58
  self::instance()->save();
59
- LP()->settings()->refresh();
60
  echo learn_press_format_price( 1234.56, true );
61
  die();
62
  }
@@ -123,7 +123,7 @@ class LP_Setup_Wizard {
123
  $this->save();
124
 
125
  // Refresh new changes
126
- // LP()->settings()->refresh();
127
 
128
  $assets = learn_press_admin_assets();
129
 
@@ -314,7 +314,7 @@ class LP_Setup_Wizard {
314
  $at ++;
315
  }
316
 
317
- return add_query_arg( 'step', $steps[ $at ], admin_url( $this->_base_url ) );
318
  }
319
 
320
  /**
@@ -330,7 +330,7 @@ class LP_Setup_Wizard {
330
  $at --;
331
  }
332
 
333
- return add_query_arg( 'step', $steps[ $at ], admin_url( $this->_base_url ) );
334
  }
335
 
336
  /**
56
  */
57
  public static function get_price_format() {
58
  self::instance()->save();
59
+ // LP_Settings::instance()->refresh();
60
  echo learn_press_format_price( 1234.56, true );
61
  die();
62
  }
123
  $this->save();
124
 
125
  // Refresh new changes
126
+ // LP_Settings::instance()->refresh();
127
 
128
  $assets = learn_press_admin_assets();
129
 
314
  $at ++;
315
  }
316
 
317
+ return esc_url( add_query_arg( 'step', $steps[ $at ], admin_url( $this->_base_url ) ) );
318
  }
319
 
320
  /**
330
  $at --;
331
  }
332
 
333
+ return esc_url( add_query_arg( 'step', $steps[ $at ], admin_url( $this->_base_url ) ) );
334
  }
335
 
336
  /**
inc/admin/lp-admin-actions.php CHANGED
@@ -261,9 +261,17 @@ function learn_press_admin_course_tabs() {
261
  echo '<h2 class="nav-tab-wrapper lp-nav-tab-wrapper">';
262
 
263
  foreach ( $admin_tabs_on_page[ $current_page_id ] as $admin_tab_id ) {
264
-
265
  $class = ( $admin_tabs[ $admin_tab_id ]['id'] == $current_page_id ) ? 'nav-tab nav-tab-active' : 'nav-tab';
266
- echo '<a href="' . admin_url( $admin_tabs[ $admin_tab_id ]['link'] ) . '" class="' . $class . ' nav-tab-' . $admin_tabs[ $admin_tab_id ]['id'] . '">' . $admin_tabs[ $admin_tab_id ]['name'] . '</a>';
 
 
 
 
 
 
 
 
 
267
  }
268
 
269
  echo '</h2>';
261
  echo '<h2 class="nav-tab-wrapper lp-nav-tab-wrapper">';
262
 
263
  foreach ( $admin_tabs_on_page[ $current_page_id ] as $admin_tab_id ) {
 
264
  $class = ( $admin_tabs[ $admin_tab_id ]['id'] == $current_page_id ) ? 'nav-tab nav-tab-active' : 'nav-tab';
265
+ // echo '<a href="' . admin_url( $admin_tabs[ $admin_tab_id ]['link'] ) . '" class="' . $class . ' nav-tab-' . $admin_tabs[ $admin_tab_id ]['id'] . '">' . $admin_tabs[ $admin_tab_id ]['name'] . '</a>';
266
+ echo wp_kses(
267
+ sprintf(
268
+ '<a href="%s" class="%s">%s</a>',
269
+ admin_url( $admin_tabs[ $admin_tab_id ]['link'] ),
270
+ $class . ' nav-tab-' . $admin_tabs[ $admin_tab_id ]['id'],
271
+ $admin_tabs[ $admin_tab_id ]['name']
272
+ ),
273
+ true
274
+ );
275
  }
276
 
277
  echo '</h2>';
inc/admin/lp-admin-functions.php CHANGED
@@ -650,7 +650,7 @@ function learn_press_footer_advertisement() {
650
  }
651
 
652
  // Disable shuffle themes for 3 days
653
- $shuffle = LP()->settings()->get( 'ad_shuffle_themes' );
654
 
655
  if ( ! $shuffle ) {
656
  if ( wp_next_scheduled( 'learn-press/schedule-enable-shuffle-themes' ) === false ) {
650
  }
651
 
652
  // Disable shuffle themes for 3 days
653
+ $shuffle = LP_Settings::instance()->get( 'ad_shuffle_themes' );
654
 
655
  if ( ! $shuffle ) {
656
  if ( wp_next_scheduled( 'learn-press/schedule-enable-shuffle-themes' ) === false ) {
inc/admin/meta-box/class-lp-meta-box-helper.php CHANGED
@@ -308,7 +308,7 @@ if ( ! class_exists( 'LP_Meta_Box_Helper' ) ) {
308
  $option_value = $option_values[ $key ];
309
 
310
  if ( is_array( $option_value ) && isset( $key_child )
311
- && array_key_exists( $key_child, $option_value ) ) {
312
  $option_value = $option_value[ $key_child ];
313
  }
314
  } else {
@@ -316,7 +316,7 @@ if ( ! class_exists( 'LP_Meta_Box_Helper' ) ) {
316
  }
317
  } else {
318
  // Single value
319
- $option_value = LP()->settings->get( preg_replace( '!^learn_press_!', '', $option_name ), null );
320
  }
321
 
322
  if ( ! is_array( $option_value ) && ! is_null( $option_value ) ) {
308
  $option_value = $option_values[ $key ];
309
 
310
  if ( is_array( $option_value ) && isset( $key_child )
311
+ && array_key_exists( $key_child, $option_value ) ) {
312
  $option_value = $option_value[ $key_child ];
313
  }
314
  } else {
316
  }
317
  } else {
318
  // Single value
319
+ $option_value = LP_Settings::instance()->get( preg_replace( '!^learn_press_!', '', $option_name ), null );
320
  }
321
 
322
  if ( ! is_array( $option_value ) && ! is_null( $option_value ) ) {
inc/admin/meta-box/fields/checkbox.php CHANGED
@@ -1,30 +1,23 @@
1
  <?php
2
- $option_value = $value['value'];
3
- $visibility_class = array();
4
-
5
- if ( ! isset( $value['hide_if_checked'] ) ) {
6
- $value['hide_if_checked'] = false;
7
- }
8
 
9
- if ( ! isset( $value['show_if_checked'] ) ) {
10
- $value['show_if_checked'] = false;
11
  }
12
 
13
- if ( 'yes' === $value['hide_if_checked'] || 'yes' === $value['show_if_checked'] ) {
14
- $visibility_class[] = 'hidden_option';
15
- }
16
 
17
- if ( 'option' === $value['hide_if_checked'] ) {
18
- $visibility_class[] = 'hide_options_if_checked';
19
- }
20
 
21
- if ( 'option' === $value['show_if_checked'] ) {
22
- $visibility_class[] = 'show_options_if_checked';
 
23
  }
24
  ?>
25
 
26
  <?php if ( ! isset( $value['checkboxgroup'] ) || 'start' === $value['checkboxgroup'] ) : ?>
27
- <tr valign="top" class="<?php echo esc_attr( implode( ' ', $visibility_class ) ); ?>">
28
  <th scope="row" class="titledesc"><?php echo $value['title']; ?></th>
29
  <td class="forminp forminp-checkbox">
30
  <fieldset>
@@ -41,12 +34,12 @@ if ( 'option' === $value['show_if_checked'] ) {
41
  name="<?php echo esc_attr( $value['id'] ); ?>"
42
  id="<?php echo esc_attr( $value['id'] ); ?>"
43
  type="checkbox"
44
- class="<?php echo esc_attr( isset( $value['class'] ) ? $value['class'] : '' ); ?>"
45
  value="1"
46
  <?php checked( $option_value, 'yes' ); ?>
47
- <?php echo implode( ' ', $custom_attributes ); ?>
48
- /> <?php echo $description; ?>
49
- </label> <?php echo $tooltip_html; ?>
50
 
51
  <?php if ( ! isset( $value['checkboxgroup'] ) || 'end' === $value['checkboxgroup'] ) : ?>
52
  </fieldset>
1
  <?php
 
 
 
 
 
 
2
 
3
+ if ( ! isset( $value ) ) {
4
+ return;
5
  }
6
 
7
+ $option_value = $value['value'];
8
+ $visibility_class = array();
 
9
 
10
+ if ( isset( $value['show_if_checked'] ) ) {
11
+ $visibility_class[] = 'show_if_' . $value['show_if_checked'];
 
12
 
13
+ if ( 'no' === LP_Settings::get_option( $value['show_if_checked'] ) ) {
14
+ $visibility_class[] = 'hidden';
15
+ }
16
  }
17
  ?>
18
 
19
  <?php if ( ! isset( $value['checkboxgroup'] ) || 'start' === $value['checkboxgroup'] ) : ?>
20
+ <tr class="<?php echo esc_attr( implode( ' ', $visibility_class ) ); ?>">
21
  <th scope="row" class="titledesc"><?php echo $value['title']; ?></th>
22
  <td class="forminp forminp-checkbox">
23
  <fieldset>
34
  name="<?php echo esc_attr( $value['id'] ); ?>"
35
  id="<?php echo esc_attr( $value['id'] ); ?>"
36
  type="checkbox"
37
+ class="<?php echo esc_attr( $value['class'] ?? '' ); ?>"
38
  value="1"
39
  <?php checked( $option_value, 'yes' ); ?>
40
+ <?php echo implode( ' ', $custom_attributes ?? array() ); ?>
41
+ /> <?php echo $description ?? ''; ?>
42
+ </label> <?php echo $tooltip_html ?? ''; ?>
43
 
44
  <?php if ( ! isset( $value['checkboxgroup'] ) || 'end' === $value['checkboxgroup'] ) : ?>
45
  </fieldset>
inc/admin/meta-box/fields/course-permalink.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  flush_rewrite_rules();
3
 
4
- $settings = LP()->settings;
5
  global $wp_post_types;
6
 
7
  if ( ! empty( $wp_post_types[ LP_COURSE_CPT ] ) ) {
1
  <?php
2
  flush_rewrite_rules();
3
 
4
+ $settings = LP_Settings::instance();
5
  global $wp_post_types;
6
 
7
  if ( ! empty( $wp_post_types[ LP_COURSE_CPT ] ) ) {
inc/admin/meta-box/fields/list-emails.php CHANGED
@@ -16,17 +16,19 @@
16
  $group = '';
17
 
18
  if ( $email->group ) {
19
- $url = add_query_arg(
20
- array(
21
- 'section' => $email->group->group_id,
22
- 'sub-section' => $email->id,
23
- ),
24
- admin_url( 'admin.php?page=learn-press-settings&tab=emails' )
 
 
25
  );
26
 
27
  $group = $email->group;
28
  } else {
29
- $url = add_query_arg( array( 'section' => $email->id ), admin_url( 'admin.php?page=learn-press-settings&tab=emails' ) );
30
  }
31
  ?>
32
 
16
  $group = '';
17
 
18
  if ( $email->group ) {
19
+ $url = esc_url(
20
+ add_query_arg(
21
+ array(
22
+ 'section' => $email->group->group_id,
23
+ 'sub-section' => $email->id,
24
+ ),
25
+ admin_url( 'admin.php?page=learn-press-settings&tab=emails' )
26
+ )
27
  );
28
 
29
  $group = $email->group;
30
  } else {
31
+ $url = esc_url( add_query_arg( array( 'section' => $email->id ), admin_url( 'admin.php?page=learn-press-settings&tab=emails' ) ) );
32
  }
33
  ?>
34
 
inc/admin/settings/class-lp-settings-payments.php CHANGED
@@ -110,7 +110,7 @@ class LP_Settings_Payments extends LP_Abstract_Settings_Page {
110
  'default' => 'lp-order-received',
111
  'placeholder' => 'lp-order-received',
112
  'type' => 'text',
113
- 'desc' => sprintf( 'e.g. %s', "{$checkout_url}<code>" . LP()->settings()->get( 'checkout_endpoints.lp_order_received', 'lp-order-received' ) . '</code>' ),
114
  ),
115
  )
116
  );
110
  'default' => 'lp-order-received',
111
  'placeholder' => 'lp-order-received',
112
  'type' => 'text',
113
+ 'desc' => sprintf( 'e.g. %s', "{$checkout_url}<code>" . LP_Settings::instance()->get( 'checkout_endpoints.lp_order_received', 'lp-order-received' ) . '</code>' ),
114
  ),
115
  )
116
  );
inc/admin/settings/class-lp-settings-profile.php CHANGED
@@ -33,7 +33,7 @@ class LP_Settings_Profile extends LP_Abstract_Settings_Page {
33
  * @return array
34
  */
35
  public function get_settings( $section = null, $tab = null ) {
36
- $settings = LP()->settings();
37
  $user = wp_get_current_user();
38
  $username = $user->user_login;
39
  $settings_slug = $settings->get( 'profile_endpoints.settings', 'settings' );
33
  * @return array
34
  */
35
  public function get_settings( $section = null, $tab = null ) {
36
+ $settings = LP_Settings::instance();
37
  $user = wp_get_current_user();
38
  $username = $user->user_login;
39
  $settings_slug = $settings->get( 'profile_endpoints.settings', 'settings' );
inc/admin/settings/email-groups/class-lp-settings-emails-group.php CHANGED
@@ -61,7 +61,7 @@ class LP_Settings_Emails_Group extends LP_Settings {
61
  if ( $current == $email->id ) {
62
  echo '<li class="active"><span>' . $email . '</span></li>';
63
  } else {
64
- echo '<li><a href="' . add_query_arg( 'sub-section', $email->id ) . '">' . $email . '</a></li>';
65
  }
66
  }
67
 
61
  if ( $current == $email->id ) {
62
  echo '<li class="active"><span>' . $email . '</span></li>';
63
  } else {
64
+ echo '<li><a href="' . esc_url( add_query_arg( 'sub-section', $email->id ) ) . '">' . $email . '</a></li>';
65
  }
66
  }
67
 
inc/admin/sub-menus/class-lp-submenu-settings.php CHANGED
@@ -23,7 +23,7 @@ class LP_Submenu_Settings extends LP_Abstract_Submenu {
23
  'learn-press/admin/settings-tabs-array',
24
  array(
25
  'general' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-general.php',
26
- 'courses' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-courses.php',
27
  'profile' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-profile.php',
28
  'payments' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-payments.php',
29
  'emails' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-emails.php',
@@ -91,7 +91,7 @@ class LP_Submenu_Settings extends LP_Abstract_Submenu {
91
  do_action( 'learn-press/update-settings/updated', $this );
92
 
93
  // Filter redirect
94
- $redirect = apply_filters( 'learn-press/update-settings/redirect', add_query_arg( 'settings-updated', 'yes' ), $this );
95
 
96
  if ( $redirect ) {
97
  wp_redirect( $redirect );
23
  'learn-press/admin/settings-tabs-array',
24
  array(
25
  'general' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-general.php',
26
+ 'courses' => new LP_Settings_Courses(),
27
  'profile' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-profile.php',
28
  'payments' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-payments.php',
29
  'emails' => include_once LP_PLUGIN_PATH . 'inc/admin/settings/class-lp-settings-emails.php',
91
  do_action( 'learn-press/update-settings/updated', $this );
92
 
93
  // Filter redirect
94
+ $redirect = apply_filters( 'learn-press/update-settings/redirect', esc_url( add_query_arg( 'settings-updated', 'yes' ) ), $this );
95
 
96
  if ( $redirect ) {
97
  wp_redirect( $redirect );
inc/admin/sub-menus/class-lp-submenu-statistics.php CHANGED
@@ -213,31 +213,6 @@ class LP_Submenu_Statistics extends LP_Abstract_Submenu {
213
  learn_press_send_json( $response );
214
  }
215
 
216
- /**
217
- *
218
- */
219
- /*public function scripts() {
220
- if ( LP_Request::get( 'page' ) !== 'learn-press-statistics' ) {
221
- return;
222
- }
223
- wp_enqueue_style( 'learn-press-statistic', LP_CSS_URL . 'admin/statistic.css' );
224
-
225
- $exclude_assets = LP()->settings()->get( 'exclude_admin_libraries' );
226
-
227
- if ( ! $exclude_assets || ! in_array( 'chartjs', $exclude_assets ) ) {
228
- wp_enqueue_script( 'learn-press-chart', LP_JS_URL . 'vendor/chart.min.js' );
229
- }
230
-
231
- wp_enqueue_script(
232
- 'learn-press-statistic',
233
- LP_JS_URL . 'admin/pages/statistic.js',
234
- array(
235
- 'jquery',
236
- 'jquery-ui-datepicker',
237
- )
238
- );
239
- }*/
240
-
241
  public function page_content_courses() {
242
  learn_press_admin_view( 'statistics/courses' );
243
  }
213
  learn_press_send_json( $response );
214
  }
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  public function page_content_courses() {
217
  learn_press_admin_view( 'statistics/courses' );
218
  }
inc/admin/views/addons/html-themes.php CHANGED
@@ -10,7 +10,7 @@
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>
10
  defined( 'ABSPATH' ) || exit();
11
 
12
  $last_checked = LP_Background_Query_Items::instance()->get_last_checked( 'plugins_tp' );
13
+ $check_url = wp_nonce_url( esc_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>
inc/admin/views/backend-user-profile.php CHANGED
@@ -28,7 +28,7 @@ $custom_profile = lp_get_user_custom_register_fields( $user->ID );
28
  <table class="form-table">
29
  <tbody>
30
  <?php
31
- $custom_fields = LP()->settings()->get( 'register_profile_fields' );
32
 
33
  if ( $custom_fields ) {
34
  foreach ( $custom_fields as $field ) {
28
  <table class="form-table">
29
  <tbody>
30
  <?php
31
+ $custom_fields = LP_Settings::instance()->get( 'register_profile_fields' );
32
 
33
  if ( $custom_fields ) {
34
  foreach ( $custom_fields as $field ) {
inc/admin/views/meta-boxes/fields/select.php CHANGED
@@ -119,13 +119,17 @@ class LP_Meta_Box_Select_Field extends LP_Meta_Box_Field {
119
  add_post_meta( $post_id, $this->id, $level_id, false );
120
  }
121
  } else {
122
- $multilple = ! empty( $this->extra['multiple'] ) ? true : false;
123
-
124
- if ( ! isset( $_POST[ $this->id ] ) && ! $multilple ) {
125
  return;
126
  }
127
 
128
- $value = ! empty( $_POST[ $this->id ] ) ? LP_Helper::sanitize_params_submitted( $_POST[ $this->id ] ) : array();
 
 
 
 
 
 
129
 
130
  update_post_meta( $post_id, $this->id, $value );
131
  }
119
  add_post_meta( $post_id, $this->id, $level_id, false );
120
  }
121
  } else {
122
+ if ( ! isset( $_POST[ $this->id ] ) ) {
 
 
123
  return;
124
  }
125
 
126
+ $value = ! empty( $_POST[ $this->id ] ) ? sanitize_text_field( wp_unslash( $_POST[ $this->id ] ) ) : '';
127
+
128
+ $multilple = ! empty( $this->extra['multiple'] ) ? true : false;
129
+
130
+ if ( $multilple ) {
131
+ $value = ! empty( $_POST[ $this->id ] ) ? LP_Helper::sanitize_params_submitted( $_POST[ $this->id ] ) : array();
132
+ }
133
 
134
  update_post_meta( $post_id, $this->id, $value );
135
  }
inc/admin/views/meta-boxes/order/details.php CHANGED
@@ -141,7 +141,7 @@ $user_ip = $order->get_user_ip_address();
141
  <?php $note = $post->post_excerpt; ?>
142
  <?php if ( ! empty( $note ) ) : ?>
143
  <label><?php esc_html_e( 'Customer Note', 'learnpress' ); ?></label>
144
- <p class="order-note description"><?php echo $note; ?></p>
145
  <?php endif; ?>
146
  </div>
147
  </div>
@@ -166,7 +166,7 @@ $user_ip = $order->get_user_ip_address();
166
  <?php endforeach; ?>
167
  <?php endif; ?>
168
 
169
- <tr class="no-order-items<?php echo $items ? ' hide-if-js' : ''; ?>">
170
  <td colspan="4"><?php esc_html_e( 'No order items', 'learnpress' ); ?></td>
171
  </tr>
172
  </tbody>
141
  <?php $note = $post->post_excerpt; ?>
142
  <?php if ( ! empty( $note ) ) : ?>
143
  <label><?php esc_html_e( 'Customer Note', 'learnpress' ); ?></label>
144
+ <p class="order-note description"><?php echo wp_kses_post( $note ); ?></p>
145
  <?php endif; ?>
146
  </div>
147
  </div>
166
  <?php endforeach; ?>
167
  <?php endif; ?>
168
 
169
+ <tr class="no-order-items<?php echo esc_attr( $items ) ? ' hide-if-js' : ''; ?>">
170
  <td colspan="4"><?php esc_html_e( 'No order items', 'learnpress' ); ?></td>
171
  </tr>
172
  </tbody>
inc/admin/views/meta-boxes/quiz/settings.php CHANGED
@@ -15,7 +15,7 @@ class LP_Meta_Box_Quiz extends LP_Meta_Box {
15
  array(
16
  '_lp_duration' => new LP_Meta_Box_Duration_Field(
17
  esc_html__( 'Duration', 'learnpress' ),
18
- 'Set 0 for no limit, larger than 0 for limit',
19
  '0',
20
  array(
21
  'default_time' => 'minute',
15
  array(
16
  '_lp_duration' => new LP_Meta_Box_Duration_Field(
17
  esc_html__( 'Duration', 'learnpress' ),
18
+ esc_html__( 'Set 0 for no limit, larger than 0 for limit', 'learnpress' ),
19
  '0',
20
  array(
21
  'default_time' => 'minute',
inc/admin/views/setup/content.php CHANGED
@@ -19,8 +19,8 @@ if ( ! isset( $steps ) ) {
19
  <div class="lp-setup-nav">
20
  <ul class="lp-setup-steps">
21
  <?php foreach ( $steps as $key => $step ) { ?>
22
- <li class="<?php echo $wizard->get_current_step() == $key ? 'active' : ''; ?>">
23
- <span><?php echo $step['title']; ?></span>
24
  </li>
25
  <?php } ?>
26
  </ul>
@@ -37,12 +37,12 @@ if ( ! isset( $steps ) ) {
37
  <input type="hidden" name="lp-setup-nonce"
38
  value="<?php echo wp_create_nonce( 'lp-setup-step-' . $step['slug'] ); ?>">
39
  <input type="hidden" name="lp-setup-step"
40
- value="<?php echo $step['slug']; ?>">
41
  <?php call_user_func( $step['callback'] ); ?>
42
  <?php if ( ! $wizard->is_last_step() ) { ?>
43
  <div class="buttons">
44
  <?php if ( ! $wizard->is_first_step() && ! ( array_key_exists( 'back_button', $step ) && $step['back_button'] === false ) ) { ?>
45
- <a class="button button-prev" href="<?php echo $wizard->get_prev_url(); ?>">
46
  <?php
47
  if ( ! empty( $step['next_button'] ) ) {
48
  echo $step['back_button'];
@@ -53,7 +53,7 @@ if ( ! isset( $steps ) ) {
53
  </a>
54
  <?php } ?>
55
  <?php if ( ! $wizard->is_last_step() && ! ( array_key_exists( 'next_button', $step ) && $step['next_button'] === false ) ) { ?>
56
- <a class="button button-next button-primary" href="<?php echo $wizard->get_next_url(); ?>">
57
  <?php
58
  if ( ! empty( $step['next_button'] ) ) {
59
  echo $step['next_button'];
19
  <div class="lp-setup-nav">
20
  <ul class="lp-setup-steps">
21
  <?php foreach ( $steps as $key => $step ) { ?>
22
+ <li class="<?php echo esc_attr( $wizard->get_current_step() == $key ? 'active' : '' ); ?>">
23
+ <span><?php echo esc_html( $step['title'] ); ?></span>
24
  </li>
25
  <?php } ?>
26
  </ul>
37
  <input type="hidden" name="lp-setup-nonce"
38
  value="<?php echo wp_create_nonce( 'lp-setup-step-' . $step['slug'] ); ?>">
39
  <input type="hidden" name="lp-setup-step"
40
+ value="<?php echo esc_attr( $step['slug'] ); ?>">
41
  <?php call_user_func( $step['callback'] ); ?>
42
  <?php if ( ! $wizard->is_last_step() ) { ?>
43
  <div class="buttons">
44
  <?php if ( ! $wizard->is_first_step() && ! ( array_key_exists( 'back_button', $step ) && $step['back_button'] === false ) ) { ?>
45
+ <a class="button button-prev" href="<?php echo esc_url( $wizard->get_prev_url() ); ?>">
46
  <?php
47
  if ( ! empty( $step['next_button'] ) ) {
48
  echo $step['back_button'];
53
  </a>
54
  <?php } ?>
55
  <?php if ( ! $wizard->is_last_step() && ! ( array_key_exists( 'next_button', $step ) && $step['next_button'] === false ) ) { ?>
56
+ <a class="button button-next button-primary" href="<?php echo esc_url( $wizard->get_next_url() ); ?>">
57
  <?php
58
  if ( ! empty( $step['next_button'] ) ) {
59
  echo $step['next_button'];
inc/admin/views/setup/setup-paypal.php CHANGED
@@ -9,7 +9,7 @@
9
 
10
  defined( 'ABSPATH' ) or exit;
11
 
12
- $settings = LP()->settings();
13
 
14
  ?>
15
  <table>
9
 
10
  defined( 'ABSPATH' ) or exit;
11
 
12
+ $settings = LP_Settings::instance();
13
 
14
  ?>
15
  <table>
inc/admin/views/setup/steps/currency.php CHANGED
@@ -9,7 +9,8 @@
9
 
10
  defined( 'ABSPATH' ) or exit;
11
 
12
- $settings = LP()->settings()->refresh();
 
13
  $currency = $settings->get( 'currency', 'USD' );
14
  $preview_price = '';
15
  ?>
@@ -68,4 +69,4 @@ $preview_price = '';
68
  <div id="preview-price"><?php echo learn_press_format_price( 1234.56, true ); ?></div>
69
  </td>
70
  </tr>
71
- </table>
9
 
10
  defined( 'ABSPATH' ) or exit;
11
 
12
+ // $settings = LP_Settings::instance()->refresh();
13
+ $settings = LP_Settings::instance();
14
  $currency = $settings->get( 'currency', 'USD' );
15
  $preview_price = '';
16
  ?>
69
  <div id="preview-price"><?php echo learn_press_format_price( 1234.56, true ); ?></div>
70
  </td>
71
  </tr>
72
+ </table>
inc/admin/views/setup/steps/pages.php CHANGED
@@ -9,7 +9,7 @@
9
 
10
  defined( 'ABSPATH' ) or exit;
11
 
12
- $settings = LP()->settings();
13
  ?>
14
  <h2><?php _e( 'Static Pages', 'learnpress' ); ?></h2>
15
 
9
 
10
  defined( 'ABSPATH' ) or exit;
11
 
12
+ $settings = LP_Settings::instance();
13
  ?>
14
  <h2><?php _e( 'Static Pages', 'learnpress' ); ?></h2>
15
 
inc/admin/views/tools/html-cache.php CHANGED
@@ -17,7 +17,7 @@ defined( 'ABSPATH' ) || die();
17
 
18
  <label>
19
  <input type="checkbox" name="enable_hard_cache"
20
- value="1" <?php checked( LP()->settings()->get( 'enable_hard_cache' ), 'yes' ); ?>>
21
  <?php _e( 'Enable/Disable hard cache', 'learnpress' ); ?>
22
  </label>
23
  <p class="tools-button">
17
 
18
  <label>
19
  <input type="checkbox" name="enable_hard_cache"
20
+ value="1" <?php checked( LP_Settings::instance()->get( 'enable_hard_cache' ), 'yes' ); ?>>
21
  <?php _e( 'Enable/Disable hard cache', 'learnpress' ); ?>
22
  </label>
23
  <p class="tools-button">
inc/admin/views/tools/html-cron.php CHANGED
@@ -17,7 +17,7 @@ defined( 'ABSPATH' ) or die();
17
  <input type="text" class="widefat" value="<?php echo esc_attr( learn_press_get_cron_url() ); ?>">
18
  <p class="description"><?php esc_html_e( 'Use this url to setup cronjob on your server.', 'learnpress' ); ?></p>
19
  <br/>
20
- <a class="button" href="<?php echo wp_nonce_url( add_query_arg( 'generate-cron-url', '1' ) ); ?>"><?php esc_html_e( 'Generate new url', 'learnpress' ); ?></a>
21
  </td>
22
  </tr>
23
 
17
  <input type="text" class="widefat" value="<?php echo esc_attr( learn_press_get_cron_url() ); ?>">
18
  <p class="description"><?php esc_html_e( 'Use this url to setup cronjob on your server.', 'learnpress' ); ?></p>
19
  <br/>
20
+ <a class="button" href="<?php echo wp_nonce_url( esc_url( add_query_arg( 'generate-cron-url', '1' ) ) ); ?>"><?php esc_html_e( 'Generate new url', 'learnpress' ); ?></a>
21
  </td>
22
  </tr>
23
 
inc/admin/views/user/courses.php CHANGED
@@ -15,8 +15,8 @@ if ( ! isset( $user_id ) ) {
15
 
16
  $profile = LP_Profile::instance( $user_id );
17
  $user = $profile->get_user();
18
- $slug_profile_courses = LP()->settings()->get( 'profile_endpoints.courses', 'courses' );
19
- $link_user_profile = add_query_arg( [ 'tab' => 'enrolled' ], learn_press_user_profile_link( $user_id ) . $slug_profile_courses );
20
  echo wp_sprintf( '<p><b>%s</b> <a href="%s" target="_blank">%s</a></p>', __( 'Course list of user enrolled', 'learnpress' ), $link_user_profile, __( 'View', 'learnpress' ) );
21
 
22
  return;
15
 
16
  $profile = LP_Profile::instance( $user_id );
17
  $user = $profile->get_user();
18
+ $slug_profile_courses = LP_Settings::instance()->get( 'profile_endpoints.courses', 'courses' );
19
+ $link_user_profile = esc_url( add_query_arg( [ 'tab' => 'enrolled' ], learn_press_user_profile_link( $user_id ) . $slug_profile_courses ) );
20
  echo wp_sprintf( '<p><b>%s</b> <a href="%s" target="_blank">%s</a></p>', __( 'Course list of user enrolled', 'learnpress' ), $link_user_profile, __( 'View', 'learnpress' ) );
21
 
22
  return;
inc/attributes/course.php CHANGED
@@ -223,16 +223,18 @@ if ( ! class_exists( 'LP_Course_Attributes' ) ) {
223
  * @return string
224
  */
225
  public function terms_row_actions( $tax ) {
226
- $uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
227
- $edit_link = add_query_arg(
228
- 'wp_http_referer',
229
- urlencode( wp_unslash( $uri ) ),
230
  add_query_arg(
231
- array(
232
- 'taxonomy' => LP_COURSE_ATTRIBUTE . '-' . $tax->slug,
233
- 'post_type' => LP_COURSE_CPT,
234
- ),
235
- admin_url( 'term.php' )
 
 
 
 
236
  )
237
  );
238
  $terms_actions = array(
223
  * @return string
224
  */
225
  public function terms_row_actions( $tax ) {
226
+ $uri = wp_doing_ajax() ? wp_get_referer() : esc_url( $_SERVER['REQUEST_URI'] );
227
+ $edit_link = esc_url(
 
 
228
  add_query_arg(
229
+ 'wp_http_referer',
230
+ urlencode( wp_unslash( $uri ) ),
231
+ add_query_arg(
232
+ array(
233
+ 'taxonomy' => LP_COURSE_ATTRIBUTE . '-' . $tax->slug,
234
+ 'post_type' => LP_COURSE_CPT,
235
+ ),
236
+ admin_url( 'term.php' )
237
+ )
238
  )
239
  );
240
  $terms_actions = array(
inc/class-lp-ajax.php CHANGED
@@ -262,9 +262,13 @@ if ( ! class_exists( 'LP_AJAX' ) ) {
262
  $item_id = LP_Request::get_int( 'id' );
263
  $course_id = LP_Request::get_int( 'course_id' );
264
 
265
- $post = get_post( $item_id );
266
- $user = learn_press_get_current_user();
267
- $course = learn_press_get_course( $course_id );
 
 
 
 
268
  $response = array(
269
  'result' => 'success',
270
  'redirect' => $course->get_item_link( $item_id ),
262
  $item_id = LP_Request::get_int( 'id' );
263
  $course_id = LP_Request::get_int( 'course_id' );
264
 
265
+ $post = get_post( $item_id );
266
+ $user = learn_press_get_current_user();
267
+ $course = learn_press_get_course( $course_id );
268
+ if ( ! $course ) {
269
+ return;
270
+ }
271
+
272
  $response = array(
273
  'result' => 'success',
274
  'redirect' => $course->get_item_link( $item_id ),
inc/class-lp-assets.php CHANGED
@@ -32,14 +32,14 @@ class LP_Assets extends LP_Abstract_Assets {
32
  return apply_filters(
33
  'learn-press/frontend-default-styles',
34
  array(
35
- 'lp-font-awesome-5' => new LP_Asset_Key(
36
  self::url( 'src/css/vendor/font-awesome-5.min.css' ),
37
  array(),
38
  array()
39
  ),
40
  'learnpress' => new LP_Asset_Key(
41
  self::url( 'css/learnpress' . $is_rtl . self::$_min_assets . '.css' ),
42
- array( 'lp-font-awesome-5' ),
43
  array( LP_PAGE_COURSES, LP_PAGE_SINGLE_COURSE, LP_PAGE_SINGLE_COURSE_CURRICULUM, LP_PAGE_QUIZ, LP_PAGE_QUESTION, LP_PAGE_CHECKOUT, LP_PAGE_BECOME_A_TEACHER, LP_PAGE_PROFILE ),
44
  0
45
  ),
@@ -241,8 +241,6 @@ class LP_Assets extends LP_Abstract_Assets {
241
  )
242
  );
243
 
244
- wp_set_script_translations( 'lp-quiz', 'learnpress' );
245
-
246
  return $scripts;
247
  }
248
 
@@ -254,7 +252,7 @@ class LP_Assets extends LP_Abstract_Assets {
254
  * @since 3.2.8
255
  */
256
  public function load_scripts() {
257
- $page_current = lp_page_controller()::page_current();
258
  $this->handle_js( $page_current );
259
  $this->handle_style( $page_current );
260
 
32
  return apply_filters(
33
  'learn-press/frontend-default-styles',
34
  array(
35
+ 'font-awesome-5-all' => new LP_Asset_Key(
36
  self::url( 'src/css/vendor/font-awesome-5.min.css' ),
37
  array(),
38
  array()
39
  ),
40
  'learnpress' => new LP_Asset_Key(
41
  self::url( 'css/learnpress' . $is_rtl . self::$_min_assets . '.css' ),
42
+ array( 'font-awesome-5-all' ),
43
  array( LP_PAGE_COURSES, LP_PAGE_SINGLE_COURSE, LP_PAGE_SINGLE_COURSE_CURRICULUM, LP_PAGE_QUIZ, LP_PAGE_QUESTION, LP_PAGE_CHECKOUT, LP_PAGE_BECOME_A_TEACHER, LP_PAGE_PROFILE ),
44
  0
45
  ),
241
  )
242
  );
243
 
 
 
244
  return $scripts;
245
  }
246
 
252
  * @since 3.2.8
253
  */
254
  public function load_scripts() {
255
+ $page_current = LP_Page_Controller::page_current();
256
  $this->handle_js( $page_current );
257
  $this->handle_style( $page_current );
258
 
inc/class-lp-checkout.php CHANGED
@@ -475,7 +475,7 @@ class LP_Checkout {
475
  * @since 3.0.0
476
  */
477
  public function is_enable_guest_checkout() {
478
- return apply_filters( 'learn-press/checkout/enable-guest', LP()->settings()->get( 'guest_checkout', 'no' ) == 'yes' );
479
  }
480
 
481
  /**
@@ -485,7 +485,7 @@ class LP_Checkout {
485
  * @since 3.0.0
486
  */
487
  public function is_enable_login() {
488
- return apply_filters( 'learn-press/checkout/enable-login', in_array( LP()->settings()->get( 'enable_login_checkout' ), array( '', 'yes' ) ) );
489
  }
490
 
491
  /**
@@ -495,7 +495,7 @@ class LP_Checkout {
495
  * @since 3.0.0
496
  */
497
  public function is_enable_register() {
498
- return apply_filters( 'learn-press/checkout/enable-register', in_array( LP()->settings()->get( 'enable_registration_checkout' ), array( '', 'yes' ) ) && get_option( 'users_can_register' ) );
499
  }
500
 
501
  /**
475
  * @since 3.0.0
476
  */
477
  public function is_enable_guest_checkout() {
478
+ return apply_filters( 'learn-press/checkout/enable-guest', LP_Settings::instance()->get( 'guest_checkout', 'no' ) == 'yes' );
479
  }
480
 
481
  /**
485
  * @since 3.0.0
486
  */
487
  public function is_enable_login() {
488
+ return apply_filters( 'learn-press/checkout/enable-login', in_array( LP_Settings::instance()->get( 'enable_login_checkout' ), array( '', 'yes' ) ) );
489
  }
490
 
491
  /**
495
  * @since 3.0.0
496
  */
497
  public function is_enable_register() {
498
+ return apply_filters( 'learn-press/checkout/enable-register', in_array( LP_Settings::instance()->get( 'enable_registration_checkout' ), array( '', 'yes' ) ) && get_option( 'users_can_register' ) );
499
  }
500
 
501
  /**
inc/class-lp-debug.php CHANGED
@@ -65,7 +65,7 @@ class LP_Debug {
65
  }
66
 
67
  $time = microtime( true ) - self::$_time[ $name ];
68
- echo "{$name} execution time = " . $time . "\n";
69
  unset( self::$_time[ $name ] );
70
  }
71
 
@@ -109,7 +109,7 @@ class LP_Debug {
109
  * @param string $line
110
  */
111
  public static function var_dump( $variable, string $file_path = '', string $line = '' ) {
112
- echo '<pre>' . print_r( $variable, true ) . '</pre>';
113
  echo 'FILE:' . esc_html( $file_path ) . '<br> LINE:' . esc_html( $line );
114
  }
115
 
65
  }
66
 
67
  $time = microtime( true ) - self::$_time[ $name ];
68
+ echo esc_html( wp_sprintf( '%s execution time = %s', $name, $time ) );
69
  unset( self::$_time[ $name ] );
70
  }
71
 
109
  * @param string $line
110
  */
111
  public static function var_dump( $variable, string $file_path = '', string $line = '' ) {
112
+ echo wp_kses( '<pre>' . print_r( $variable, true ) . '</pre>', true );
113
  echo 'FILE:' . esc_html( $file_path ) . '<br> LINE:' . esc_html( $line );
114
  }
115
 
inc/class-lp-emails.php CHANGED
@@ -254,7 +254,7 @@ if ( ! class_exists( 'LP_Emails' ) ) {
254
  * @return string
255
  */
256
  public function get_image_header() {
257
- $image = LP()->settings->get( 'emails_general.header_image' );
258
 
259
  if ( ! empty( $image ) ) {
260
  $image = wp_get_attachment_image_url( $image, 'full' );
254
  * @return string
255
  */
256
  public function get_image_header() {
257
+ $image = LP_Settings::instance()->get( 'emails_general.header_image' );
258
 
259
  if ( ! empty( $image ) ) {
260
  $image = wp_get_attachment_image_url( $image, 'full' );
inc/class-lp-forms-handler.php CHANGED
@@ -259,7 +259,7 @@ class LP_Forms_Handler {
259
  return new WP_Error( 'registration-error-confirm-password', __( 'Confirmation password incorrect!.', 'learnpress' ) );
260
  }
261
 
262
- $custom_fields = LP()->settings()->get( 'register_profile_fields' );
263
 
264
  if ( $custom_fields && ! empty( $update_meta ) ) {
265
  foreach ( $custom_fields as $field ) {
@@ -326,7 +326,7 @@ class LP_Forms_Handler {
326
  return new WP_Error( 'error_email', esc_html__( 'This email address is already registered.', 'learnpress' ) );
327
  }
328
 
329
- $custom_fields = LP()->settings()->get( 'register_profile_fields' );
330
 
331
  if ( $custom_fields && ! empty( $update_meta ) ) {
332
  foreach ( $custom_fields as $field ) {
259
  return new WP_Error( 'registration-error-confirm-password', __( 'Confirmation password incorrect!.', 'learnpress' ) );
260
  }
261
 
262
+ $custom_fields = LP_Settings::instance()->get( 'register_profile_fields' );
263
 
264
  if ( $custom_fields && ! empty( $update_meta ) ) {
265
  foreach ( $custom_fields as $field ) {
326
  return new WP_Error( 'error_email', esc_html__( 'This email address is already registered.', 'learnpress' ) );
327
  }
328
 
329
+ $custom_fields = LP_Settings::instance()->get( 'register_profile_fields' );
330
 
331
  if ( $custom_fields && ! empty( $update_meta ) ) {
332
  foreach ( $custom_fields as $field ) {
inc/class-lp-hard-cache.php CHANGED
@@ -39,7 +39,7 @@ class LP_Hard_Cache {
39
  if ( defined( 'LP_HARD_CACHE' ) ) {
40
  self::$_lock = self::$_hard_lock = ! LP_HARD_CACHE;
41
  } else {
42
- self::$_lock = self::$_hard_lock = ! ( 'yes' === LP()->settings()->get( 'enable_hard_cache' ) );
43
  }
44
 
45
  if ( self::is_locked() ) {
39
  if ( defined( 'LP_HARD_CACHE' ) ) {
40
  self::$_lock = self::$_hard_lock = ! LP_HARD_CACHE;
41
  } else {
42
+ self::$_lock = self::$_hard_lock = ! ( 'yes' === LP_Settings::instance()->get( 'enable_hard_cache' ) );
43
  }
44
 
45
  if ( self::is_locked() ) {
inc/class-lp-helper.php CHANGED
@@ -418,10 +418,21 @@ class LP_Helper {
418
  * @since 3.2.6.8
419
  * @author tungnx
420
  */
421
- public static function getUrlCurrent() {
422
  $schema = is_ssl() ? 'https://' : 'http://';
423
 
424
- return $schema . $_SERVER['HTTP_HOST'] . untrailingslashit( $_SERVER['REQUEST_URI'] );
 
 
 
 
 
 
 
 
 
 
 
425
  }
426
 
427
  /**
@@ -553,7 +564,7 @@ class LP_Helper {
553
  * without cache - because some cache(redis) will cache page with user anonymous
554
  */
555
  public static function get_link_no_cache( string $link ): string {
556
- return add_query_arg( 'no-cache', uniqid(), $link );
557
  }
558
 
559
  /**
418
  * @since 3.2.6.8
419
  * @author tungnx
420
  */
421
+ public static function getUrlCurrent(): string {
422
  $schema = is_ssl() ? 'https://' : 'http://';
423
 
424
+ return $schema . $_SERVER['HTTP_HOST'] . untrailingslashit( esc_url( $_SERVER['REQUEST_URI'] ) );
425
+ }
426
+
427
+ /**
428
+ * Check request is rest api
429
+ *
430
+ * @since 4.1.6.6
431
+ * @author tungnx
432
+ * @return bool|int
433
+ */
434
+ public static function isRestApiLP() {
435
+ return strpos( self::getUrlCurrent(), '/wp-json/lp/v1/courses' );
436
  }
437
 
438
  /**
564
  * without cache - because some cache(redis) will cache page with user anonymous
565
  */
566
  public static function get_link_no_cache( string $link ): string {
567
+ return esc_url( add_query_arg( 'no-cache', uniqid(), $link ) );
568
  }
569
 
570
  /**
inc/class-lp-install.php CHANGED
@@ -168,8 +168,10 @@ if ( ! function_exists( 'LP_Install' ) ) {
168
 
169
  /**
170
  * Update default options for LP
 
 
171
  */
172
- public static function create_options() {
173
  $settings_classes = array(
174
  'LP_Settings_General' => include_once LP_PLUGIN_PATH . '/inc/admin/settings/class-lp-settings-general.php',
175
  'LP_Settings_Courses' => include_once LP_PLUGIN_PATH . '/inc/admin/settings/class-lp-settings-courses.php',
@@ -250,7 +252,7 @@ if ( ! function_exists( 'LP_Install' ) ) {
250
  }
251
 
252
  ob_get_clean();
253
- }
254
 
255
  /**
256
  * Create tables required for LP
168
 
169
  /**
170
  * Update default options for LP
171
+ *
172
+ * @editor tungnx - comment - not use on v4.1.6.6
173
  */
174
+ /*public static function create_options() {
175
  $settings_classes = array(
176
  'LP_Settings_General' => include_once LP_PLUGIN_PATH . '/inc/admin/settings/class-lp-settings-general.php',
177
  'LP_Settings_Courses' => include_once LP_PLUGIN_PATH . '/inc/admin/settings/class-lp-settings-courses.php',
252
  }
253
 
254
  ob_get_clean();
255
+ }*/
256
 
257
  /**
258
  * Create tables required for LP
inc/class-lp-page-controller.php CHANGED
@@ -56,6 +56,23 @@ class LP_Page_Controller {
56
 
57
  // Set link profile to admin menu
58
  add_action( 'admin_bar_menu', array( $this, 'learn_press_edit_admin_bar' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
 
61
  /**
@@ -241,7 +258,7 @@ class LP_Page_Controller {
241
  global $wp_query;
242
  $flag_title_course = false;
243
 
244
- $course_archive_page_id = LP()->settings()->get( 'courses_page_id', 0 );
245
 
246
  // Set title course archive page
247
  if ( ! empty( $course_archive_page_id ) && $wp_query->post &&
@@ -380,7 +397,7 @@ class LP_Page_Controller {
380
  */
381
  /*
382
  public function maybe_redirect_quiz( $template ) {
383
- $course = LP_Global::course();
384
  $quiz = LP_Global::course_item_quiz();
385
  $user = learn_press_get_current_user();
386
  $redirect = false;
@@ -706,51 +723,51 @@ class LP_Page_Controller {
706
 
707
  /**
708
  * @return bool
 
709
  */
710
- protected function _maybe_redirect_courses_page() {
711
- /**
712
- * If is archive course page and a static page is used for displaying courses
713
- * we need to redirect it to the right page
714
- */
715
- if ( ! is_post_type_archive( LP_COURSE_CPT ) ) {
716
- return false;
717
- }
718
-
719
- /**
720
- * @var WP_Query $wp_query
721
- * @var WP_Rewrite $wp_rewrite
722
- */
723
- global $wp_query, $wp_rewrite;
724
-
725
- $page_id = learn_press_get_page_id( 'courses' );
726
-
727
- if ( $page_id && ( empty( $wp_query->queried_object_id ) || ! empty( $wp_query->queried_object_id ) && $page_id != $wp_query->queried_object_id ) ) {
728
- $redirect = trailingslashit( learn_press_get_page_link( 'courses' ) );
729
-
730
- if ( ! empty( $wp_query->query['paged'] ) ) {
731
- if ( $wp_rewrite->using_permalinks() ) {
732
- $redirect = $redirect . 'page/' . $wp_query->query['paged'] . '/';
733
- } else {
734
- $redirect = add_query_arg( 'paged', $wp_query->query['paged'], $redirect );
735
- }
736
- }
737
-
738
- if ( isset( $_GET ) ) {
739
- $_GET = array_map( 'stripslashes_deep', $_GET );
740
- foreach ( $_GET as $k => $v ) {
741
- $redirect = add_query_arg( $k, urlencode( $v ), $redirect );
742
- }
743
- }
744
-
745
- if ( $page_id != get_option( 'page_on_front' ) && ! learn_press_is_current_url( $redirect ) ) {
746
- wp_redirect( $redirect );
747
- exit();
748
- }
749
- }
750
-
751
- return false;
752
- }
753
-
754
 
755
  public function archive_content() {
756
  ob_start();
@@ -1015,7 +1032,7 @@ class LP_Page_Controller {
1015
  $apply_lazy_load_for_theme = apply_filters( 'lp/page/courses/query/lazy_load', false );
1016
 
1017
  if ( $is_archive_course ) {
1018
- if ( ( lp_is_archive_course_load_via_api() && ! class_exists( 'TP' ) ) || $apply_lazy_load_for_theme ) {
1019
  LP()->template( 'course' )->remove_callback( 'learn-press/after-courses-loop', 'loop/course/pagination.php', 10 );
1020
  /**
1021
  * If page is archive course - query set posts_per_page = 1
@@ -1024,9 +1041,130 @@ class LP_Page_Controller {
1024
  * Current, apply only for LP, not apply for theme Thimpress, because theme override
1025
  */
1026
  $q->set( 'posts_per_page', 1 );
 
 
1027
  } else {
1028
  $limit = LP_Settings::get_option( 'archive_course_limit', 6 );
1029
  $q->set( 'posts_per_page', $limit );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1030
  }
1031
  }
1032
 
@@ -1193,10 +1331,4 @@ class LP_Page_Controller {
1193
  }
1194
  }
1195
 
1196
- if ( ! function_exists( 'lp_page_controller' ) ) {
1197
- function lp_page_controller() {
1198
- return LP_Page_Controller::instance();
1199
- }
1200
-
1201
- lp_page_controller();
1202
- }
56
 
57
  // Set link profile to admin menu
58
  add_action( 'admin_bar_menu', array( $this, 'learn_press_edit_admin_bar' ) );
59
+ add_action( 'plugins_loaded', array( $this, 'lp_rest_api_called' ) );
60
+ }
61
+
62
+ /**
63
+ * Optimize when Rest API LP called
64
+ *
65
+ * @return void
66
+ */
67
+ public function lp_rest_api_called() {
68
+ if ( LP_Helper::isRestApiLP() ) {
69
+ if ( ! defined( 'SHORTINIT' ) ) {
70
+ define( 'SHORTINIT', true );
71
+ }
72
+
73
+ // Remove hook wp_loaded because query default WP run on it (it hooks 'pre_get_posts',...)
74
+ remove_all_actions( 'wp_loaded' );
75
+ }
76
  }
77
 
78
  /**
258
  global $wp_query;
259
  $flag_title_course = false;
260
 
261
+ $course_archive_page_id = LP_Settings::instance()->get( 'courses_page_id', 0 );
262
 
263
  // Set title course archive page
264
  if ( ! empty( $course_archive_page_id ) && $wp_query->post &&
397
  */
398
  /*
399
  public function maybe_redirect_quiz( $template ) {
400
+ $course = learn_press_get_course();
401
  $quiz = LP_Global::course_item_quiz();
402
  $user = learn_press_get_current_user();
403
  $redirect = false;
723
 
724
  /**
725
  * @return bool
726
+ * @editor tungnx - comment 4.1.6.6
727
  */
728
+ // protected function _maybe_redirect_courses_page() {
729
+ // /**
730
+ // * If is archive course page and a static page is used for displaying courses
731
+ // * we need to redirect it to the right page
732
+ // */
733
+ // if ( ! is_post_type_archive( LP_COURSE_CPT ) ) {
734
+ // return false;
735
+ // }
736
+ //
737
+ // /**
738
+ // * @var WP_Query $wp_query
739
+ // * @var WP_Rewrite $wp_rewrite
740
+ // */
741
+ // global $wp_query, $wp_rewrite;
742
+ //
743
+ // $page_id = learn_press_get_page_id( 'courses' );
744
+ //
745
+ // if ( $page_id && ( empty( $wp_query->queried_object_id ) || ! empty( $wp_query->queried_object_id ) && $page_id != $wp_query->queried_object_id ) ) {
746
+ // $redirect = trailingslashit( learn_press_get_page_link( 'courses' ) );
747
+ //
748
+ // if ( ! empty( $wp_query->query['paged'] ) ) {
749
+ // if ( $wp_rewrite->using_permalinks() ) {
750
+ // $redirect = $redirect . 'page/' . $wp_query->query['paged'] . '/';
751
+ // } else {
752
+ // $redirect = add_query_arg( 'paged', $wp_query->query['paged'], $redirect );
753
+ // }
754
+ // }
755
+ //
756
+ // if ( isset( $_GET ) ) {
757
+ // $_GET = array_map( 'stripslashes_deep', $_GET );
758
+ // foreach ( $_GET as $k => $v ) {
759
+ // $redirect = add_query_arg( $k, urlencode( $v ), $redirect );
760
+ // }
761
+ // }
762
+ //
763
+ // if ( $page_id != get_option( 'page_on_front' ) && ! learn_press_is_current_url( $redirect ) ) {
764
+ // wp_redirect( $redirect );
765
+ // exit();
766
+ // }
767
+ // }
768
+ //
769
+ // return false;
770
+ // }
 
771
 
772
  public function archive_content() {
773
  ob_start();
1032
  $apply_lazy_load_for_theme = apply_filters( 'lp/page/courses/query/lazy_load', false );
1033
 
1034
  if ( $is_archive_course ) {
1035
+ if ( ( LP_Settings_Courses::is_ajax_load_courses() && ! LP_Settings_Courses::is_no_load_ajax_first_courses() ) ) {
1036
  LP()->template( 'course' )->remove_callback( 'learn-press/after-courses-loop', 'loop/course/pagination.php', 10 );
1037
  /**
1038
  * If page is archive course - query set posts_per_page = 1
1041
  * Current, apply only for LP, not apply for theme Thimpress, because theme override
1042
  */
1043
  $q->set( 'posts_per_page', 1 );
1044
+ $q->set( 'posts_per_archive_page', 1 );
1045
+ $q->set( 'nopaging', true );
1046
  } else {
1047
  $limit = LP_Settings::get_option( 'archive_course_limit', 6 );
1048
  $q->set( 'posts_per_page', $limit );
1049
+ // $q->set( 'cache_results', true ); // it default true
1050
+
1051
+ // Search courses by keyword
1052
+ $q->set( 's', $_REQUEST['c_search'] ?? '' );
1053
+
1054
+ // Meta query
1055
+ $meta_query = [];
1056
+ if ( isset( $_REQUEST['sort_by'] ) ) {
1057
+ if ( 'on_paid' === $_REQUEST['sort_by'] ) {
1058
+ $meta_query[] = array(
1059
+ 'key' => '_lp_price',
1060
+ 'value' => 0,
1061
+ 'compare' => '>',
1062
+ );
1063
+ }
1064
+
1065
+ if ( 'on_free' === $_REQUEST['sort_by'] ) {
1066
+ $meta_query[] = array(
1067
+ 'key' => '_lp_price',
1068
+ 'value' => 0,
1069
+ 'compare' => '=',
1070
+ );
1071
+ }
1072
+ }
1073
+ $q->set( 'meta_query', $meta_query );
1074
+ // End Meta query
1075
+
1076
+ // Tax query
1077
+ $tax_query = [];
1078
+ $term_ids_str = LP_Helper::sanitize_params_submitted( urldecode( $_REQUEST['term_id'] ?? '' ) );
1079
+ if ( ! empty( $term_ids_str ) ) {
1080
+ $term_ids = explode( ',', $term_ids_str );
1081
+
1082
+ $tax_query[] = array(
1083
+ 'taxonomy' => 'course_category',
1084
+ 'field' => 'term_id',
1085
+ 'terms' => $term_ids,
1086
+ 'operator' => 'IN',
1087
+ );
1088
+ }
1089
+
1090
+ $q->set( 'tax_query', $tax_query );
1091
+ // End Tax query
1092
+
1093
+ // Author query
1094
+ if ( isset( $_REQUEST['c_author'] ) ) {
1095
+ $author_ids = LP_Helper::sanitize_params_submitted( $_REQUEST['c_author'] );
1096
+ $q->set( 'author__in', $author_ids );
1097
+ }
1098
+ // End Author query
1099
+
1100
+ // Order query
1101
+ if ( isset( $_REQUEST['order_by'] ) ) {
1102
+ $order_by = LP_Helper::sanitize_params_submitted( $_REQUEST['order_by'] );
1103
+ $order = 'DESC';
1104
+
1105
+ switch ( $order_by ) {
1106
+ case 'post_title':
1107
+ $order_by = 'title';
1108
+ $order = 'ASC';
1109
+ break;
1110
+ default:
1111
+ $order_by = 'date';
1112
+ break;
1113
+ }
1114
+
1115
+ $q->set( 'orderby', $order_by );
1116
+ $q->set( 'order', $order );
1117
+ }
1118
+
1119
+ $q = apply_filters( 'lp/page-courses/query/legacy', $q );
1120
+
1121
+ /*if ( isset( $_REQUEST['isPageLoad'] ) ) {
1122
+ $filter_courses = new LP_Course_Filter();
1123
+ $filter_courses->only_fields = [ 'ID' ];
1124
+ $filter_courses->limit = 1000;
1125
+ $filter_courses->max_limit = 1000;
1126
+ $filter_courses->post_title = LP_Helper::sanitize_params_submitted( $_REQUEST['c_search'] ?? '' );
1127
+ $fields_str = LP_Helper::sanitize_params_submitted( urldecode( $_REQUEST['c_fields'] ?? '' ) );
1128
+ $fields_exclude_str = LP_Helper::sanitize_params_submitted( urldecode( $_REQUEST['c_exclude_fields'] ?? '' ) );
1129
+ if ( ! empty( $fields_str ) ) {
1130
+ $fields = explode( ',', $fields_str );
1131
+ $filter_courses->fields = $fields;
1132
+ }
1133
+ if ( ! empty( $fields_exclude_str ) ) {
1134
+ $fields_exclude = explode( ',', $fields_exclude_str );
1135
+ $filter_courses->exclude_fields = $fields_exclude;
1136
+ }
1137
+ $filter_courses->post_author = LP_Helper::sanitize_params_submitted( $_REQUEST['c_author'] ?? 0 );
1138
+ $author_ids_str = LP_Helper::sanitize_params_submitted( $_REQUEST['c_authors'] ?? 0 );
1139
+ if ( ! empty( $author_ids_str ) ) {
1140
+ $author_ids = explode( ',', $author_ids_str );
1141
+ $filter_courses->post_authors = $author_ids;
1142
+ }
1143
+ $term_ids_str = LP_Helper::sanitize_params_submitted( urldecode( $_REQUEST['term_id'] ?? '' ) );
1144
+ if ( ! empty( $term_ids_str ) ) {
1145
+ $term_ids = explode( ',', $term_ids_str );
1146
+ $filter_courses->term_ids = $term_ids;
1147
+ }
1148
+
1149
+ $on_sale = absint( $_REQUEST['on_sale'] ?? '0' );
1150
+ 1 === $on_sale ? $filter_courses->sort_by[] = 'on_sale' : '';
1151
+ $on_feature = absint( $_REQUEST['on_feature'] ?? '0' );
1152
+ 1 === $on_feature ? $filter_courses->sort_by[] = 'on_feature' : '';
1153
+
1154
+ $filter_courses->order_by = LP_Helper::sanitize_params_submitted( ! empty( $_REQUEST['order_by'] ) ? $_REQUEST['order_by'] : 'post_date' );
1155
+ $filter_courses->order = LP_Helper::sanitize_params_submitted( ! empty( $_REQUEST['order'] ) ? $_REQUEST['order'] : 'DESC' );
1156
+
1157
+ $filter_courses = apply_filters( 'lp/api/courses/filter', $filter_courses, $_REQUEST );
1158
+
1159
+ $courses = LP_Course::get_courses( $filter_courses );
1160
+ $course_ids = array( -1 ); // Set if empty $course_ids will return 'no courses found' message
1161
+
1162
+ if ( ! empty( $courses ) ) {
1163
+ $course_ids = LP_Database::getInstance()->get_values_by_key( $courses );
1164
+ }
1165
+
1166
+ $q->set( 'post__in', $course_ids );
1167
+ }*/
1168
  }
1169
  }
1170
 
1331
  }
1332
  }
1333
 
1334
+ return LP_Page_Controller::instance();
 
 
 
 
 
 
inc/class-lp-query-search.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
 
 
 
 
 
 
3
  class LP_Query_Search {
4
  /**
5
  * Search posts.
1
  <?php
2
 
3
+ /**
4
+ * Class LP_Query_Search
5
+ *
6
+ * @depecated 4.1.6.6
7
+ */
8
  class LP_Query_Search {
9
  /**
10
  * Search posts.
inc/class-lp-query.php CHANGED
@@ -56,7 +56,7 @@ class LP_Query {
56
  list( $pathinfo ) = explode( '?', $pathinfo );
57
  $pathinfo = str_replace( '%', '%25', $pathinfo );
58
 
59
- list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] );
60
  $self = $_SERVER['PHP_SELF'];
61
  $home_path = trim( parse_url( home_url(), PHP_URL_PATH ), '/' );
62
  $home_path_regex = sprintf( '|^%s|i', preg_quote( $home_path, '|' ) );
@@ -116,8 +116,8 @@ class LP_Query {
116
  $has_category = true;
117
  }
118
 
119
- $custom_slug_lesson = sanitize_title_with_dashes( LP()->settings->get( 'lesson_slug' ) );
120
- $custom_slug_quiz = sanitize_title_with_dashes( LP()->settings->get( 'quiz_slug' ) );
121
 
122
  /**
123
  * Use urldecode to convert an encoded string to normal.
56
  list( $pathinfo ) = explode( '?', $pathinfo );
57
  $pathinfo = str_replace( '%', '%25', $pathinfo );
58
 
59
+ list( $req_uri ) = explode( '?', esc_url( $_SERVER['REQUEST_URI'] ) );
60
  $self = $_SERVER['PHP_SELF'];
61
  $home_path = trim( parse_url( home_url(), PHP_URL_PATH ), '/' );
62
  $home_path_regex = sprintf( '|^%s|i', preg_quote( $home_path, '|' ) );
116
  $has_category = true;
117
  }
118
 
119
+ $custom_slug_lesson = sanitize_title_with_dashes( LP_Settings::instance()->get( 'lesson_slug' ) );
120
+ $custom_slug_quiz = sanitize_title_with_dashes( LP_Settings::instance()->get( 'quiz_slug' ) );
121
 
122
  /**
123
  * Use urldecode to convert an encoded string to normal.
inc/class-lp-schedules.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class LP_Schedules
5
- *
6
- * Manage all schedules
7
- */
8
- class LP_Schedules {
9
-
10
- }
 
 
 
 
 
 
 
 
 
 
inc/class-lp-settings.php CHANGED
@@ -194,7 +194,7 @@ class LP_Settings {
194
  $value = $this->get( $key );
195
  }
196
  update_option( $this->_prefix . $key, $value );
197
- $this->refresh();
198
  }
199
 
200
  public function refresh() {
194
  $value = $this->get( $key );
195
  }
196
  update_option( $this->_prefix . $key, $value );
197
+ // $this->refresh();
198
  }
199
 
200
  public function refresh() {
inc/course/abstract-course.php CHANGED
@@ -1249,8 +1249,8 @@ if ( ! function_exists( 'LP_Abstract_Course' ) ) {
1249
  $is_permalink = '' !== get_option( 'permalink_structure' );
1250
  $is_draft = 'draft' === get_post_status( $this->get_id() );
1251
  $custom_prefixes = array(
1252
- LP_QUIZ_CPT => LP()->settings->get( 'quiz_slug' ),
1253
- LP_LESSON_CPT => LP()->settings->get( 'lesson_slug' ),
1254
  );
1255
 
1256
  if ( empty( $custom_prefixes[ LP_QUIZ_CPT ] ) ) {
@@ -1333,8 +1333,8 @@ if ( ! function_exists( 'LP_Abstract_Course' ) ) {
1333
  $slug_prefixes = apply_filters(
1334
  'learn-press/course/custom-item-prefixes',
1335
  array(
1336
- LP_QUIZ_CPT => sanitize_title_with_dashes( LP()->settings->get( 'quiz_slug', 'quizzes' ) ),
1337
- LP_LESSON_CPT => sanitize_title_with_dashes( LP()->settings->get( 'lesson_slug', 'lessons' ) ),
1338
  ),
1339
  $this->get_id()
1340
  );
1249
  $is_permalink = '' !== get_option( 'permalink_structure' );
1250
  $is_draft = 'draft' === get_post_status( $this->get_id() );
1251
  $custom_prefixes = array(
1252
+ LP_QUIZ_CPT => LP_Settings::instance()->get( 'quiz_slug' ),
1253
+ LP_LESSON_CPT => LP_Settings::instance()->get( 'lesson_slug' ),
1254
  );
1255
 
1256
  if ( empty( $custom_prefixes[ LP_QUIZ_CPT ] ) ) {
1333
  $slug_prefixes = apply_filters(
1334
  'learn-press/course/custom-item-prefixes',
1335
  array(
1336
+ LP_QUIZ_CPT => sanitize_title_with_dashes( LP_Settings::instance()->get( 'quiz_slug', 'quizzes' ) ),
1337
+ LP_LESSON_CPT => sanitize_title_with_dashes( LP_Settings::instance()->get( 'lesson_slug', 'lessons' ) ),
1338
  ),
1339
  $this->get_id()
1340
  );
inc/course/lp-course-functions.php CHANGED
@@ -618,7 +618,8 @@ if ( ! function_exists( 'learn_press_get_course_item_url' ) ) {
618
  *
619
  */
620
  function learn_press_comment_post_item_course( $post_id ) {
621
- if ( ! $course = LP_Global::course() ) {
 
622
  return;
623
  }
624
 
@@ -644,14 +645,16 @@ function learn_press_item_comment_link( $link, $comment, $args, $cpage ) {
644
  * Ensure there is a course
645
  */
646
  if ( empty( $_POST['comment-post-item-course'] ) ) {
647
- if ( $course = LP_Global::course() ) {
 
648
  $post_id = $course->get_id();
649
  }
650
  } else {
651
  $post_id = absint( $_POST['comment-post-item-course'] );
652
  }
653
 
654
- if ( $course = learn_press_get_course( $post_id ) ) {
 
655
  $link = str_replace( get_the_permalink( $comment_post_ID ), $course->get_item_link( $comment_post_ID ), $link );
656
  }
657
 
@@ -897,12 +900,14 @@ if ( ! function_exists( 'learn_press_get_item_course_id' ) ) {
897
  */
898
  function learn_press_get_preview_url( $post_id ) {
899
  return
900
- add_query_arg(
901
- array(
902
- 'lp-preview' => $post_id,
903
- '_wpnonce' => wp_create_nonce( 'lp-preview' ),
904
- ),
905
- trailingslashit( get_home_url() /* SITE_URL */ )
 
 
906
  );
907
  }
908
 
@@ -926,7 +931,7 @@ if ( ! function_exists( 'learn_press_course_item_type_link' ) ) {
926
 
927
  remove_filter( 'post_type_link', 'learn_press_course_item_type_link', 10 );
928
 
929
- $course = LP_Global::course();
930
 
931
  if ( ! $course && ( $course_id = learn_press_get_item_course( $post->ID ) ) ) {
932
  $course = learn_press_get_course( $course_id );
@@ -983,7 +988,7 @@ if ( ! function_exists( 'learn_press_course_item_type_link' ) ) {
983
  }*/
984
 
985
 
986
- add_filter( 'template_include', 'learn_press_prepare_archive_courses' );
987
  function learn_press_prepare_archive_courses( $template ) {
988
  global $wp_query;
989
  $query = ! empty( LP()->wp_query ) ? LP()->wp_query : $wp_query;
@@ -1000,7 +1005,7 @@ function learn_press_prepare_archive_courses( $template ) {
1000
  }
1001
 
1002
  return $template;
1003
- }
1004
 
1005
  function learn_press_course_grade_html( $grade, $echo = true ) {
1006
  $html = '';
618
  *
619
  */
620
  function learn_press_comment_post_item_course( $post_id ) {
621
+ $course = learn_press_get_course();
622
+ if ( ! $course ) {
623
  return;
624
  }
625
 
645
  * Ensure there is a course
646
  */
647
  if ( empty( $_POST['comment-post-item-course'] ) ) {
648
+ $course = learn_press_get_course();
649
+ if ( $course ) {
650
  $post_id = $course->get_id();
651
  }
652
  } else {
653
  $post_id = absint( $_POST['comment-post-item-course'] );
654
  }
655
 
656
+ $course = learn_press_get_course( $post_id );
657
+ if ( $course ) {
658
  $link = str_replace( get_the_permalink( $comment_post_ID ), $course->get_item_link( $comment_post_ID ), $link );
659
  }
660
 
900
  */
901
  function learn_press_get_preview_url( $post_id ) {
902
  return
903
+ esc_url(
904
+ add_query_arg(
905
+ array(
906
+ 'lp-preview' => $post_id,
907
+ '_wpnonce' => wp_create_nonce( 'lp-preview' ),
908
+ ),
909
+ trailingslashit( get_home_url() )
910
+ )
911
  );
912
  }
913
 
931
 
932
  remove_filter( 'post_type_link', 'learn_press_course_item_type_link', 10 );
933
 
934
+ $course = learn_press_get_course();
935
 
936
  if ( ! $course && ( $course_id = learn_press_get_item_course( $post->ID ) ) ) {
937
  $course = learn_press_get_course( $course_id );
988
  }*/
989
 
990
 
991
+ /*add_filter( 'template_include', 'learn_press_prepare_archive_courses' );
992
  function learn_press_prepare_archive_courses( $template ) {
993
  global $wp_query;
994
  $query = ! empty( LP()->wp_query ) ? LP()->wp_query : $wp_query;
1005
  }
1006
 
1007
  return $template;
1008
+ }*/
1009
 
1010
  function learn_press_course_grade_html( $grade, $echo = true ) {
1011
  $html = '';
inc/curds/class-lp-user-curd.php CHANGED
@@ -2033,7 +2033,7 @@ ORDER BY MAX(user_item_id) DESC";
2033
  if ( $items ) {
2034
  $count = $wpdb->get_var( 'SELECT FOUND_ROWS()' );
2035
  $course_ids = wp_list_pluck( $items, 'item_id' );
2036
- LP_Helper::cache_posts( $course_ids );
2037
 
2038
  $quizzes['total'] = $count;
2039
  $quizzes['pages'] = ceil( $count / $args['limit'] );
2033
  if ( $items ) {
2034
  $count = $wpdb->get_var( 'SELECT FOUND_ROWS()' );
2035
  $course_ids = wp_list_pluck( $items, 'item_id' );
2036
+ // LP_Helper::cache_posts( $course_ids );
2037
 
2038
  $quizzes['total'] = $count;
2039
  $quizzes['pages'] = ceil( $count / $args['limit'] );
inc/custom-post-types/abstract.php CHANGED
@@ -184,16 +184,7 @@ abstract class LP_Abstract_Post_Type {
184
  return;
185
  }
186
 
187
- // prevent loop action
188
- // remove_action( 'save_post', array( $this, '_do_save' ), 10, 2 );
189
- // $func_args = func_get_args();
190
-
191
- // var_dump($post_id, $post, $func_args);die;
192
-
193
- // $this->_call_method( 'save', $func_args );
194
  $this->save( $post_id, $post );
195
- // $this->_flush_cache();
196
- // add_action( 'save_post', array( $this, '_do_save' ), 10, 2 );
197
  }
198
 
199
  /**
@@ -265,7 +256,7 @@ abstract class LP_Abstract_Post_Type {
265
  'author' => get_the_author_meta( 'ID' ),
266
  );
267
 
268
- $author_link = add_query_arg( $args, 'edit.php' );
269
  echo sprintf( '<span class="post-author">%s<a href="%s">%s</a></span>', get_avatar( get_the_author_meta( 'ID' ), 32 ), $author_link, get_the_author() );
270
  }
271
 
@@ -366,58 +357,6 @@ abstract class LP_Abstract_Post_Type {
366
  return 0;
367
  }
368
 
369
- // Comment by tungnx - no see use
370
- /*
371
- public function maybe_remove_features() {
372
- if ( ! $this->_remove_features ) {
373
- return;
374
- }
375
-
376
- foreach ( $this->_remove_features as $feature ) {
377
- remove_post_type_support( $this->_post_type, $feature );
378
- }
379
- }*/
380
-
381
- // Comment by tungnx - no see use
382
- /*
383
- public function remove_feature( $feature ) {
384
- if ( is_array( $feature ) ) {
385
- foreach ( $feature as $fea ) {
386
- $this->remove_feature( $fea );
387
- }
388
- } else {
389
- $this->_remove_features[] = $feature;
390
- }
391
- }*/
392
-
393
- // Comment by tungnx - not use
394
- /*
395
- public function update_default_meta() {
396
- global $wp_query, $post;
397
-
398
- if ( ! $post ) {
399
- return;
400
- }
401
-
402
- if ( empty( $post->post_type ) ) {
403
- return;
404
- }
405
-
406
- if ( $post->post_type != $this->_post_type ) {
407
- return;
408
- }
409
-
410
- if ( empty( $this->_default_metas ) ) {
411
- return;
412
- }
413
-
414
- foreach ( $this->_default_metas as $k => $v ) {
415
- if ( ! metadata_exists( 'post', $post->ID, $k ) ) {
416
- update_post_meta( $post->ID, $k, $v );
417
- }
418
- }
419
- }*/
420
-
421
  public function remove_auto_save_script() {
422
  global $post;
423
 
@@ -840,108 +779,6 @@ abstract class LP_Abstract_Post_Type {
840
  return $actions;
841
  }
842
 
843
- /**
844
- * Those functions should be extended from child class to override
845
- *
846
- * @return mixed
847
- * @editor tungnx
848
- * @reason not use
849
- */
850
- /*
851
- public function register_post_type() {
852
- return $this;
853
- }*/
854
-
855
- // Comment by tungnx - not use
856
- /*
857
- public function admin_params() {
858
- return $this;
859
- }*/
860
-
861
- // Comment by tungnx - not use
862
- /*
863
- public function admin_scripts() {
864
- return $this;
865
- }*/
866
-
867
- // Comment by tungnx - not use
868
- /*
869
- public function admin_styles() {
870
- return $this;
871
- }*/
872
-
873
- // Comment by tungnx
874
- /*
875
- public function print_js_template() {
876
- return $this;
877
- }*/
878
-
879
- /**
880
- * @editor tungnx
881
- * @reason comment by write difficult for another developer, difficult development
882
- * @since modify 4.0.9
883
- */
884
- /*
885
- public function add_map_method( $origin, $replace, $single = false ) {
886
- if ( $single ) {
887
- $this->_map_methods[ $origin ] = $replace;
888
- } else {
889
- if ( empty( $this->_map_methods[ $origin ] ) ) {
890
- $this->_map_methods[ $origin ] = array( $replace );
891
- } else {
892
- $this->_map_methods[ $origin ][] = $replace;
893
- }
894
- }
895
-
896
- return $this;
897
- }*/
898
-
899
- /**
900
- * @editor tungnx
901
- * @reason comment by write difficult for another developer, difficult development
902
- * @param $messages
903
- * @return array|mixed
904
- */
905
- /*
906
- private function _get_map_method( $origin ) {
907
- if ( ! empty( $this->_map_methods[ $origin ] ) ) {
908
- if ( is_array( $this->_map_methods[ $origin ] ) ) {
909
- $callback = array();
910
- foreach ( $this->_map_methods[ $origin ] as $method ) {
911
- $callback[] = array( $this, $method );
912
- }
913
- } else {
914
- $callback = array( $this, $this->_map_methods[ $origin ] );
915
- }
916
- } else {
917
- $callback = array( $this, $origin );
918
- }
919
-
920
- return $callback;
921
- }*/
922
-
923
- /**
924
- * @editor tungnx
925
- * @reason comment by write difficult for another developer, difficult development
926
- * @param $messages
927
- * @return array|mixed
928
- */
929
- /*
930
- private function _call_method( $name, $args = false ) {
931
- $callbacks = $this->_get_map_method( $name );
932
- if ( is_array( $callbacks[0] ) ) {
933
- $return = array();
934
- foreach ( $callbacks as $callback ) {
935
- $_return = call_user_func_array( $callback, $args );
936
- $return = array_merge( $return, (array) $_return );
937
- }
938
- } else {
939
- $return = call_user_func_array( $callbacks, $args );
940
- }
941
-
942
- return $return;
943
- }*/
944
-
945
  public function updated_messages( $messages ) {
946
  $post = get_post();
947
  $post_type = get_post_type( $post );
@@ -999,64 +836,4 @@ abstract class LP_Abstract_Post_Type {
999
 
1000
  return $messages;
1001
  }
1002
-
1003
- // Deprecated functions
1004
- /*
1005
- private function _get_orderby() {
1006
- _deprecated_function( __FUNCTION__, '4.1.0' );
1007
- }
1008
- public function _get_search(): string {
1009
- return LP_Request::get( 's' );
1010
- }
1011
- protected function _get_order(): string {
1012
-
1013
- }*/
1014
-
1015
- // End deprecated
1016
  }
1017
-
1018
- // Comment by tungnx - not use
1019
- // class LP_Abstract_Post_Type_Core extends LP_Abstract_Post_Type {
1020
- // **
1021
- // * Get string for searching
1022
- // *
1023
- // * @return string
1024
- // */
1025
- // protected function _get_search() {
1026
- // return LP_Request::get( 's' );
1027
- // }
1028
- //
1029
- // **
1030
- // * @return string
1031
- // */
1032
- // protected function _get_order() {
1033
- // return strtolower( LP_Request::get( 'order' ) ) === 'desc' ? 'DESC' : 'ASC';
1034
- // }
1035
- //
1036
- // **
1037
- // * @return mixed
1038
- // */
1039
- // protected function _get_orderby() {
1040
- // return LP_Request::get( 'orderby' );
1041
- // }
1042
- //
1043
- // **
1044
- // * Return TRUE if this post-type is support Gutenberg editor.
1045
- // *
1046
- // * @since 3.3.0
1047
- // *
1048
- // * @return bool
1049
- // */
1050
- // public function is_support_gutenberg() {
1051
- // $post_types = array(
1052
- // LP_COURSE_CPT => LP()->settings()->get( 'enable_gutenberg_course' ),
1053
- // LP_LESSON_CPT => LP()->settings()->get( 'enable_gutenberg_lesson' ),
1054
- // LP_QUIZ_CPT => LP()->settings()->get( 'enable_gutenberg_quiz' ),
1055
- // LP_QUESTION_CPT => LP()->settings()->get( 'enable_gutenberg_question' ),
1056
- // );
1057
- //
1058
- // $support = $post_types[ $this->_post_type ] === 'yes' ? true : false;
1059
- //
1060
- // return apply_filters( 'learn-press/custom-post-support-gutenberg', $support, $this->get_post_type() );
1061
- // }
1062
- // }
184
  return;
185
  }
186
 
 
 
 
 
 
 
 
187
  $this->save( $post_id, $post );
 
 
188
  }
189
 
190
  /**
256
  'author' => get_the_author_meta( 'ID' ),
257
  );
258
 
259
+ $author_link = esc_url( add_query_arg( $args, 'edit.php' ) );
260
  echo sprintf( '<span class="post-author">%s<a href="%s">%s</a></span>', get_avatar( get_the_author_meta( 'ID' ), 32 ), $author_link, get_the_author() );
261
  }
262
 
357
  return 0;
358
  }
359
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  public function remove_auto_save_script() {
361
  global $post;
362
 
779
  return $actions;
780
  }
781
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
782
  public function updated_messages( $messages ) {
783
  $post = get_post();
784
  $post_type = get_post_type( $post );
836
 
837
  return $messages;
838
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
839
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/custom-post-types/order.php CHANGED
@@ -578,12 +578,14 @@ if ( ! class_exists( 'LP_Order_Post_Type' ) ) {
578
  if ( $order->is_multi_users() ) {
579
  $actions['child-orders'] = sprintf(
580
  '<a href="%s">%s</a>',
581
- add_query_arg(
582
- array(
583
- 'post_type' => LP_ORDER_CPT,
584
- 'parent' => $post->ID,
585
- ),
586
- admin_url( 'edit.php' )
 
 
587
  ),
588
  __( 'View child orders', 'learnpress' )
589
  );
578
  if ( $order->is_multi_users() ) {
579
  $actions['child-orders'] = sprintf(
580
  '<a href="%s">%s</a>',
581
+ esc_url(
582
+ add_query_arg(
583
+ array(
584
+ 'post_type' => LP_ORDER_CPT,
585
+ 'parent' => $post->ID,
586
+ ),
587
+ admin_url( 'edit.php' )
588
+ )
589
  ),
590
  __( 'View child orders', 'learnpress' )
591
  );
inc/emails/admin/class-lp-email-cancelled-order-admin.php CHANGED
@@ -26,7 +26,7 @@ if ( ! class_exists( 'LP_Email_Cancelled_Order_Admin' ) ) {
26
  $this->description = __( 'Send email to admin when order has been cancelled.', 'learnpress' );
27
  $this->default_subject = __( 'Order placed on {{order_date}} has been cancelled', 'learnpress' );
28
  $this->default_heading = __( 'User order has been cancelled', 'learnpress' );
29
- $this->recipient = LP()->settings->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
30
 
31
  parent::__construct();
32
  }
26
  $this->description = __( 'Send email to admin when order has been cancelled.', 'learnpress' );
27
  $this->default_subject = __( 'Order placed on {{order_date}} has been cancelled', 'learnpress' );
28
  $this->default_heading = __( 'User order has been cancelled', 'learnpress' );
29
+ $this->recipient = LP_Settings::instance()->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
30
 
31
  parent::__construct();
32
  }
inc/emails/admin/class-lp-email-completed-order-admin.php CHANGED
@@ -28,7 +28,7 @@ if ( ! class_exists( 'LP_Email_Completed_Order_Admin' ) ) {
28
  $this->default_subject = __( 'Order placed on {{order_date}} has been completed', 'learnpress' );
29
  $this->default_heading = __( 'User order has been completed', 'learnpress' );
30
  $this->recipients = get_option( 'admin_email' );
31
- $this->recipient = LP()->settings->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
32
 
33
  parent::__construct();
34
  }
28
  $this->default_subject = __( 'Order placed on {{order_date}} has been completed', 'learnpress' );
29
  $this->default_heading = __( 'User order has been completed', 'learnpress' );
30
  $this->recipients = get_option( 'admin_email' );
31
+ $this->recipient = LP_Settings::instance()->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
32
 
33
  parent::__construct();
34
  }
inc/emails/admin/class-lp-email-enrolled-course-admin.php CHANGED
@@ -30,7 +30,7 @@ if ( ! class_exists( 'LP_Email_Enrolled_Course_Admin' ) ) {
30
  $this->default_subject = __( '{{user_display_name}} has enrolled course', 'learnpress' );
31
  $this->default_heading = __( 'User has enrolled course', 'learnpress' );
32
 
33
- $this->recipient = LP()->settings->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
34
 
35
  parent::__construct();
36
  }
30
  $this->default_subject = __( '{{user_display_name}} has enrolled course', 'learnpress' );
31
  $this->default_heading = __( 'User has enrolled course', 'learnpress' );
32
 
33
+ $this->recipient = LP_Settings::instance()->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
34
 
35
  parent::__construct();
36
  }
inc/emails/admin/class-lp-email-finished-course-admin.php CHANGED
@@ -28,7 +28,7 @@ if ( ! class_exists( 'LP_Email_Finished_Course_Admin' ) ) {
28
  $this->default_subject = __( '{{user_display_name}} has finished course', 'learnpress' );
29
  $this->default_heading = __( 'User has finished course', 'learnpress' );
30
 
31
- $this->recipient = LP()->settings->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
32
 
33
  parent::__construct();
34
  }
28
  $this->default_subject = __( '{{user_display_name}} has finished course', 'learnpress' );
29
  $this->default_heading = __( 'User has finished course', 'learnpress' );
30
 
31
+ $this->recipient = LP_Settings::instance()->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
32
 
33
  parent::__construct();
34
  }
inc/emails/admin/class-lp-email-new-order-admin.php CHANGED
@@ -29,7 +29,7 @@ if ( ! class_exists( 'LP_Email_New_Order_Admin' ) ) {
29
  $this->default_heading = __( 'New user order', 'learnpress' );
30
 
31
  $this->recipients = get_option( 'admin_email' );
32
- $this->recipient = LP()->settings()->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
33
 
34
  parent::__construct();
35
  }
29
  $this->default_heading = __( 'New user order', 'learnpress' );
30
 
31
  $this->recipients = get_option( 'admin_email' );
32
+ $this->recipient = LP_Settings::instance()->get( 'emails_' . $this->id . '.recipients', $this->_get_admin_email() );
33
 
34
  parent::__construct();
35
  }
inc/emails/class-lp-email.php CHANGED
@@ -325,7 +325,7 @@ if ( ! class_exists( 'LP_Email' ) ) {
325
 
326
  $this->_option_id = 'emails_' . $this->id;
327
 
328
- $this->settings = LP()->settings()->get_group( $this->_option_id, '' );
329
 
330
  /**
331
  * Init general options
@@ -337,8 +337,8 @@ if ( ! class_exists( 'LP_Email' ) ) {
337
  if ( $this->settings->get( 'email_content.format' ) ) {
338
  $this->email_format = ( $this->settings->get( 'email_content.format' ) == 'plain_text' ) ? 'plain' : 'html';
339
  } else {
340
- if ( LP()->settings()->get( 'emails_general.default_email_content' ) ) {
341
- $this->email_format = LP()->settings->get( 'emails_general.default_email_content' );
342
  }
343
  }
344
 
@@ -407,7 +407,7 @@ if ( ! class_exists( 'LP_Email' ) ) {
407
  * @return mixed
408
  */
409
  public function is_configured() {
410
- return LP()->settings->get( $this->_option_id );
411
  }
412
 
413
  /**
@@ -593,7 +593,7 @@ if ( ! class_exists( 'LP_Email' ) ) {
593
  * @return string
594
  */
595
  public function get_footer_text(): string {
596
- $text = LP()->settings->get( 'emails_general.footer_text', 'LearnPress' );
597
 
598
  return LP_Helper::sanitize_params_submitted( $text, 'html' );
599
  }
@@ -662,7 +662,7 @@ if ( ! class_exists( 'LP_Email' ) ) {
662
  * @modify 4.1.4 - comment - not override hook
663
  */
664
  /*public function get_from_address(): string {
665
- $email = LP()->settings->get( 'emails_general.from_email', get_option( 'admin_email' ) );
666
 
667
  return sanitize_email( $email );
668
  }*/
@@ -675,7 +675,7 @@ if ( ! class_exists( 'LP_Email' ) ) {
675
  * @version 1.0.1
676
  */
677
  public function get_from_name(): string {
678
- $name = LP()->settings->get( 'emails_general.from_name', get_option( 'blogname' ) );
679
 
680
  return LP_Helper::sanitize_params_submitted( $name );
681
  }
325
 
326
  $this->_option_id = 'emails_' . $this->id;
327
 
328
+ $this->settings = LP_Settings::instance()->get_group( $this->_option_id, '' );
329
 
330
  /**
331
  * Init general options
337
  if ( $this->settings->get( 'email_content.format' ) ) {
338
  $this->email_format = ( $this->settings->get( 'email_content.format' ) == 'plain_text' ) ? 'plain' : 'html';
339
  } else {
340
+ if ( LP_Settings::instance()->get( 'emails_general.default_email_content' ) ) {
341
+ $this->email_format = LP_Settings::instance()->get( 'emails_general.default_email_content' );
342
  }
343
  }
344
 
407
  * @return mixed
408
  */
409
  public function is_configured() {
410
+ return LP_Settings::instance()->get( $this->_option_id );
411
  }
412
 
413
  /**
593
  * @return string
594
  */
595
  public function get_footer_text(): string {
596
+ $text = LP_Settings::instance()->get( 'emails_general.footer_text', 'LearnPress' );
597
 
598
  return LP_Helper::sanitize_params_submitted( $text, 'html' );
599
  }
662
  * @modify 4.1.4 - comment - not override hook
663
  */
664
  /*public function get_from_address(): string {
665
+ $email = LP_Settings::instance()->get( 'emails_general.from_email', get_option( 'admin_email' ) );
666
 
667
  return sanitize_email( $email );
668
  }*/
675
  * @version 1.0.1
676
  */
677
  public function get_from_name(): string {
678
+ $name = LP_Settings::instance()->get( 'emails_general.from_name', get_option( 'blogname' ) );
679
 
680
  return LP_Helper::sanitize_params_submitted( $name );
681
  }
inc/external-plugin/elementor/widgets/login-form.php CHANGED
@@ -27,7 +27,7 @@ class LP_Elementor_Widget_Login_Form extends LP_Elementor_Widget_Base {
27
  }
28
 
29
  public function render() {
30
- if ( 'yes' !== LP()->settings()->get( 'enable_login_profile' ) ) {
31
  learn_press_display_message( __( 'Login form is disabled', 'learnpress' ), 'error' );
32
  }
33
 
27
  }
28
 
29
  public function render() {
30
+ if ( 'yes' !== \LP_Settings::get_option( 'enable_login_profile', 'no' ) ) {
31
  learn_press_display_message( __( 'Login form is disabled', 'learnpress' ), 'error' );
32
  }
33
 
inc/external-plugin/elementor/widgets/register-form.php CHANGED
@@ -27,7 +27,7 @@ class LP_Elementor_Widget_Register_Form extends LP_Elementor_Widget_Base {
27
  }
28
 
29
  public function render() {
30
- if ( 'yes' !== LP()->settings()->get( 'enable_register_profile' ) ) {
31
  learn_press_display_message( __( 'Register form is disabled', 'learnpress' ), 'error' );
32
  }
33
 
27
  }
28
 
29
  public function render() {
30
+ if ( 'yes' !== LP_Settings::instance()->get( 'enable_register_profile' ) ) {
31
  learn_press_display_message( __( 'Register form is disabled', 'learnpress' ), 'error' );
32
  }
33
 
inc/gateways/class-lp-gateway-abstract.php CHANGED
@@ -74,7 +74,7 @@ class LP_Gateway_Abstract extends LP_Abstract_Settings {
74
  $this->id = sanitize_title( $this->title );
75
  }
76
 
77
- $this->settings = LP()->settings()->get_group( $this->id, '' );
78
  $this->enabled = $this->settings->get( 'enable' );
79
 
80
  add_filter( 'learn-press/admin/get-settings/admin-options-' . $this->id, array( $this, 'get_settings' ) );
74
  $this->id = sanitize_title( $this->title );
75
  }
76
 
77
+ $this->settings = LP_Settings::instance()->get_group( $this->id, '' );
78
  $this->enabled = $this->settings->get( 'enable' );
79
 
80
  add_filter( 'learn-press/admin/get-settings/admin-options-' . $this->id, array( $this, 'get_settings' ) );
inc/gateways/paypal/class-lp-gateway-paypal-basic.php CHANGED
@@ -1,21 +1,32 @@
1
  <?php
2
- die(__FILE__);
3
- class LP_Gateway_Paypal_Basic extends LP_Gateway_Paypal{
4
  public function get_request_url( $order_id ) {
5
 
6
  $user = learn_press_get_current_user();
7
 
8
- $nonce = wp_create_nonce( 'learn-press-paypal-nonce' );
9
- $order = new LP_Order( $order_id );
10
- $custom = array( 'order_id' => $order_id, 'order_key' => $order->order_key );
 
 
 
11
 
12
  $query = array(
13
- 'cmd' => '_xclick',
14
- 'amount' => learn_press_get_cart_total(),
15
- 'quantity' => '1',
16
  'business' => $this->paypal_email,
17
  'item_name' => learn_press_get_cart_description(),
18
- 'return' => add_query_arg( array( 'learn-press-transaction-method' => 'paypal-standard', 'paypal-nonce' => $nonce ), learn_press_get_cart_course_url() ),
 
 
 
 
 
 
 
 
19
  'currency_code' => learn_press_get_currency(),
20
  'notify_url' => get_home_url() /* SITE_URL */ . '/?' . learn_press_get_web_hook( 'paypal-standard' ) . '=1',
21
  'no_note' => '1',
@@ -24,7 +35,7 @@ class LP_Gateway_Paypal_Basic extends LP_Gateway_Paypal{
24
  'rm' => '2',
25
  'cancel_return' => learn_press_get_cart_course_url(),
26
  'custom' => json_encode( $custom ),
27
- 'no_shipping' => '1'
28
  );
29
 
30
  $query = apply_filters( 'learn_press_paypal_standard_query', $query );
@@ -33,4 +44,4 @@ class LP_Gateway_Paypal_Basic extends LP_Gateway_Paypal{
33
 
34
  return $paypal_payment_url;
35
  }
36
- }
1
  <?php
2
+ die( __FILE__ );
3
+ class LP_Gateway_Paypal_Basic extends LP_Gateway_Paypal {
4
  public function get_request_url( $order_id ) {
5
 
6
  $user = learn_press_get_current_user();
7
 
8
+ $nonce = wp_create_nonce( 'learn-press-paypal-nonce' );
9
+ $order = new LP_Order( $order_id );
10
+ $custom = array(
11
+ 'order_id' => $order_id,
12
+ 'order_key' => $order->order_key,
13
+ );
14
 
15
  $query = array(
16
+ 'cmd' => '_xclick',
17
+ 'amount' => learn_press_get_cart_total(),
18
+ 'quantity' => '1',
19
  'business' => $this->paypal_email,
20
  'item_name' => learn_press_get_cart_description(),
21
+ 'return' => esc_url(
22
+ add_query_arg(
23
+ array(
24
+ 'learn-press-transaction-method' => 'paypal-standard',
25
+ 'paypal-nonce' => $nonce,
26
+ )
27
+ ),
28
+ learn_press_get_cart_course_url()
29
+ ),
30
  'currency_code' => learn_press_get_currency(),
31
  'notify_url' => get_home_url() /* SITE_URL */ . '/?' . learn_press_get_web_hook( 'paypal-standard' ) . '=1',
32
  'no_note' => '1',
35
  'rm' => '2',
36
  'cancel_return' => learn_press_get_cart_course_url(),
37
  'custom' => json_encode( $custom ),
38
+ 'no_shipping' => '1',
39
  );
40
 
41
  $query = apply_filters( 'learn_press_paypal_standard_query', $query );
44
 
45
  return $paypal_payment_url;
46
  }
47
+ }
inc/gateways/paypal/class-lp-gateway-paypal-security.php CHANGED
@@ -1,25 +1,25 @@
1
  <?php
2
- die(__FILE__);
3
 
4
- class LP_Gateway_Paypal_Security extends LP_Gateway_Paypal{
5
  public function get_request_url( $order_id ) {
6
  $user = learn_press_get_current_user();
7
- $sandbox = LP()->settings->get( 'paypal_sandbox' ) == 'yes';
8
 
9
  $payment_form = '';
10
 
11
  $paypal_api_url = $sandbox ? $this->paypal_nvp_api_sandbox_url : $this->paypal_nvp_api_live_url;// PAYPAL_NVP_API_SANDBOX_URL : PAYPAL_NVP_API_LIVE_URL;
12
  $paypal_payment_url = $sandbox ? $this->paypal_payment_sandbox_url : $this->paypal_payment_sandbox_url;//'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';
13
 
14
- $paypal_email = $sandbox ? LP()->settings->get( 'paypal_sandbox_email' ) : LP()->settings->get( 'paypal_email' );
15
- $paypal_api_username = $sandbox ? LP()->settings->get( 'paypal_sandbox_api_username' ) : LP()->settings->get( 'paypal_api_username' );
16
- $paypal_api_password = $sandbox ? LP()->settings->get( 'paypal_sandbox_api_password' ) : LP()->settings->get( 'paypal_api_password' );
17
- $paypal_api_signature = $sandbox ? LP()->settings->get( 'paypal_sandbox_api_signature' ) : LP()->settings->get( 'paypal_api_signature' );
18
 
19
- if ( !empty( $paypal_email )
20
- && !empty( $paypal_api_username )
21
- && !empty( $paypal_api_password )
22
- && !empty( $paypal_api_signature )
23
  ) {
24
 
25
  remove_filter( 'the_title', 'wptexturize' ); // remove this because it screws up the product titles in PayPal
@@ -38,11 +38,19 @@ class LP_Gateway_Paypal_Security extends LP_Gateway_Paypal{
38
  $button_request['BUTTONTYPE'] = 'BUYNOW';
39
  //$L_BUTTONVARS[] = 'amount=' . learn_press_get_cart_total();
40
  //$L_BUTTONVARS[] = 'quantity=1';
41
- $nonce = wp_create_nonce( 'learn-press-paypal-nonce' );
42
 
43
  $L_BUTTONVARS[] = 'business=' . $paypal_email;
44
  //$L_BUTTONVARS[] = 'item_name=' . learn_press_get_cart_description();
45
- $L_BUTTONVARS[] = 'return=' . add_query_arg( array( 'learn-press-transaction-method' => 'paypal-standard-secure', 'paypal-nonce' => $nonce ), learn_press_get_cart_course_url() );
 
 
 
 
 
 
 
 
46
  $L_BUTTONVARS[] = 'currency_code=' . learn_press_get_currency();//$general_settings['default-currency'];
47
  $L_BUTTONVARS[] = 'notify_url=' . learn_press_get_web_hook( 'paypal-standard-secure' );
48
  $L_BUTTONVARS[] = 'no_note=1';
@@ -53,13 +61,13 @@ class LP_Gateway_Paypal_Security extends LP_Gateway_Paypal{
53
  $L_BUTTONVARS[] = 'custom=' . $temp_id;
54
  $L_BUTTONVARS[] = 'no_shipping=1';
55
 
56
- foreach($this->get_item_lines() as $k => $v){
57
  $L_BUTTONVARS[] = "{$k}={$v}";
58
  }
59
  $L_BUTTONVARS = apply_filters( 'learn_press_paypal_standard_secure_button_vars', $L_BUTTONVARS );
60
  $count = 0;
61
  foreach ( $L_BUTTONVARS as $L_BUTTONVAR ) {
62
- $button_request['L_BUTTONVAR' . $count] = $L_BUTTONVAR;
63
  $count ++;
64
  }
65
 
@@ -67,11 +75,12 @@ class LP_Gateway_Paypal_Security extends LP_Gateway_Paypal{
67
 
68
  $response = wp_remote_post( $paypal_api_url, array( 'body' => $button_request ) );
69
 
70
- if ( !is_wp_error( $response ) ) {
71
  parse_str( wp_remote_retrieve_body( $response ), $response_array );
72
- if ( !empty( $response_array['ACK'] ) && 'Success' === $response_array['ACK'] ) {
73
- if ( !empty( $response_array['WEBSITECODE'] ) )
74
  $payment_form = str_replace( array( "\r\n", "\r", "\n" ), '', stripslashes( $response_array['WEBSITECODE'] ) );
 
75
  }
76
  } else {
77
  print_r( $response );
@@ -93,4 +102,4 @@ class LP_Gateway_Paypal_Security extends LP_Gateway_Paypal{
93
 
94
  return false;
95
  }
96
- }
1
  <?php
2
+ die( __FILE__ );
3
 
4
+ class LP_Gateway_Paypal_Security extends LP_Gateway_Paypal {
5
  public function get_request_url( $order_id ) {
6
  $user = learn_press_get_current_user();
7
+ $sandbox = LP_Settings::instance()->get( 'paypal_sandbox' ) == 'yes';
8
 
9
  $payment_form = '';
10
 
11
  $paypal_api_url = $sandbox ? $this->paypal_nvp_api_sandbox_url : $this->paypal_nvp_api_live_url;// PAYPAL_NVP_API_SANDBOX_URL : PAYPAL_NVP_API_LIVE_URL;
12
  $paypal_payment_url = $sandbox ? $this->paypal_payment_sandbox_url : $this->paypal_payment_sandbox_url;//'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';
13
 
14
+ $paypal_email = $sandbox ? LP_Settings::instance()->get( 'paypal_sandbox_email' ) : LP_Settings::instance()->get( 'paypal_email' );
15
+ $paypal_api_username = $sandbox ? LP_Settings::instance()->get( 'paypal_sandbox_api_username' ) : LP_Settings::instance()->get( 'paypal_api_username' );
16
+ $paypal_api_password = $sandbox ? LP_Settings::instance()->get( 'paypal_sandbox_api_password' ) : LP_Settings::instance()->get( 'paypal_api_password' );
17
+ $paypal_api_signature = $sandbox ? LP_Settings::instance()->get( 'paypal_sandbox_api_signature' ) : LP_Settings::instance()->get( 'paypal_api_signature' );
18
 
19
+ if ( ! empty( $paypal_email )
20
+ && ! empty( $paypal_api_username )
21
+ && ! empty( $paypal_api_password )
22
+ && ! empty( $paypal_api_signature )
23
  ) {
24
 
25
  remove_filter( 'the_title', 'wptexturize' ); // remove this because it screws up the product titles in PayPal
38
  $button_request['BUTTONTYPE'] = 'BUYNOW';
39
  //$L_BUTTONVARS[] = 'amount=' . learn_press_get_cart_total();
40
  //$L_BUTTONVARS[] = 'quantity=1';
41
+ $nonce = wp_create_nonce( 'learn-press-paypal-nonce' );
42
 
43
  $L_BUTTONVARS[] = 'business=' . $paypal_email;
44
  //$L_BUTTONVARS[] = 'item_name=' . learn_press_get_cart_description();
45
+ $L_BUTTONVARS[] = 'return=' . esc_url(
46
+ add_query_arg(
47
+ array(
48
+ 'learn-press-transaction-method' => 'paypal-standard-secure',
49
+ 'paypal-nonce' => $nonce,
50
+ ),
51
+ learn_press_get_cart_course_url()
52
+ )
53
+ );
54
  $L_BUTTONVARS[] = 'currency_code=' . learn_press_get_currency();//$general_settings['default-currency'];
55
  $L_BUTTONVARS[] = 'notify_url=' . learn_press_get_web_hook( 'paypal-standard-secure' );
56
  $L_BUTTONVARS[] = 'no_note=1';
61
  $L_BUTTONVARS[] = 'custom=' . $temp_id;
62
  $L_BUTTONVARS[] = 'no_shipping=1';
63
 
64
+ foreach ( $this->get_item_lines() as $k => $v ) {
65
  $L_BUTTONVARS[] = "{$k}={$v}";
66
  }
67
  $L_BUTTONVARS = apply_filters( 'learn_press_paypal_standard_secure_button_vars', $L_BUTTONVARS );
68
  $count = 0;
69
  foreach ( $L_BUTTONVARS as $L_BUTTONVAR ) {
70
+ $button_request[ 'L_BUTTONVAR' . $count ] = $L_BUTTONVAR;
71
  $count ++;
72
  }
73
 
75
 
76
  $response = wp_remote_post( $paypal_api_url, array( 'body' => $button_request ) );
77
 
78
+ if ( ! is_wp_error( $response ) ) {
79
  parse_str( wp_remote_retrieve_body( $response ), $response_array );
80
+ if ( ! empty( $response_array['ACK'] ) && 'Success' === $response_array['ACK'] ) {
81
+ if ( ! empty( $response_array['WEBSITECODE'] ) ) {
82
  $payment_form = str_replace( array( "\r\n", "\r", "\n" ), '', stripslashes( $response_array['WEBSITECODE'] ) );
83
+ }
84
  }
85
  } else {
86
  print_r( $response );
102
 
103
  return false;
104
  }
105
+ }
inc/gateways/paypal/class-lp-gateway-paypal.php CHANGED
@@ -106,7 +106,7 @@ if ( ! class_exists( 'LP_Gateway_Paypal' ) ) {
106
  $this->paypal_nvp_api_sandbox_url = 'https://api-3t.sandbox.paypal.com/nvp';
107
 
108
  // get settings
109
- $this->settings = LP()->settings()->get_group( 'paypal', '' );
110
 
111
  $this->enabled = $this->settings->get( 'enable' );
112
 
106
  $this->paypal_nvp_api_sandbox_url = 'https://api-3t.sandbox.paypal.com/nvp';
107
 
108
  // get settings
109
+ $this->settings = LP_Settings::instance()->get_group( 'paypal', '' );
110
 
111
  $this->enabled = $this->settings->get( 'enable' );
112
 
inc/jwt/class-jwt-auth.php CHANGED
@@ -19,7 +19,7 @@ class LP_Jwt_Auth {
19
  $this->version = 'v1';
20
 
21
  // Is enable rest api?
22
- // if ( LP()->settings()->get( 'enable_jwt_rest_api' ) !== 'yes' ) {
23
  // return;
24
  // }
25
 
@@ -62,7 +62,6 @@ class LP_Jwt_Auth {
62
  add_filter( 'rest_api_init', array( $public, 'add_cors_support' ) );
63
  add_filter( 'rest_pre_dispatch', array( $public, 'rest_pre_dispatch' ), 10, 2 );
64
  add_filter( 'determine_current_user', array( $public, 'determine_current_user' ), 30 );
65
- add_filter( 'template_redirect', array( $public, 'auto_login' ) );
66
 
67
  // Rest API
68
  add_action( 'init', array( $this, 'load_rest_api' ) );
19
  $this->version = 'v1';
20
 
21
  // Is enable rest api?
22
+ // if ( LP_Settings::instance()->get( 'enable_jwt_rest_api' ) !== 'yes' ) {
23
  // return;
24
  // }
25
 
62
  add_filter( 'rest_api_init', array( $public, 'add_cors_support' ) );
63
  add_filter( 'rest_pre_dispatch', array( $public, 'rest_pre_dispatch' ), 10, 2 );
64
  add_filter( 'determine_current_user', array( $public, 'determine_current_user' ), 30 );
 
65
 
66
  // Rest API
67
  add_action( 'init', array( $this, 'load_rest_api' ) );
inc/jwt/includes/class-jwt-public.php CHANGED
@@ -123,79 +123,6 @@ class LP_Jwt_Public {
123
  }
124
  }
125
 
126
- public function auto_login() {
127
- global $wp;
128
-
129
- $rest_router = isset( $_GET['rest_router'] ) ? wp_unslash( $_GET['rest_router'] ) : false;
130
- $token = isset( $_GET['token'] ) ? wp_unslash( $_GET['token'] ) : false;
131
- $redirect = isset( $_GET['redirect'] ) ? esc_url_raw( wp_unslash( $_GET['redirect'] ) ) : false;
132
- $request = ! empty( $wp->request ) ? home_url( $wp->request ) : get_site_url();
133
-
134
- if ( ! $rest_router || ! $token || $rest_router !== 'learnpress-rest-auth' ) {
135
- return;
136
- }
137
-
138
- $secret_key = $this->secret_key;
139
-
140
- if ( ! $secret_key ) {
141
- return;
142
- }
143
-
144
- try {
145
- $token = JWT::decode( $token, $secret_key, array( 'HS256' ) );
146
-
147
- /** The Token is decoded now validate the iss */
148
- if ( $token->iss != get_bloginfo( 'url' ) ) {
149
- return new WP_Error(
150
- 'lp_jwt_auth_bad_iss',
151
- esc_html__( 'The iss do not match with this server', 'learnpress' ),
152
- array(
153
- 'status' => 403,
154
- )
155
- );
156
- }
157
-
158
- /** So far so good, validate the user id in the token */
159
- if ( ! isset( $token->data->user->id ) ) {
160
- return new WP_Error(
161
- 'lp_jwt_auth_bad_request',
162
- esc_html__( 'User ID not found in the token', 'learnpress' ),
163
- array(
164
- 'status' => 403,
165
- )
166
- );
167
- }
168
-
169
- if ( ! isset( $token->exp ) ) {
170
- return new WP_Error(
171
- 'rest_authentication_missing_token_expiration',
172
- esc_html__( 'Token must have an expiration.', 'learnpress' ),
173
- array(
174
- 'status' => 403,
175
- )
176
- );
177
- }
178
-
179
- if ( time() > $token->exp ) {
180
- return new WP_Error(
181
- 'rest_authentication_token_expired',
182
- esc_html__( 'Token has expired.', 'learnpress' ),
183
- array(
184
- 'status' => 403,
185
- )
186
- );
187
- }
188
-
189
- wp_set_current_user( $token->data->user->id );
190
- wp_set_auth_cookie( $token->data->user->id, true );
191
- } catch ( Exception $e ) {
192
- learn_press_add_message( $e->getMessage(), 'error' );
193
- }
194
-
195
- wp_redirect( $redirect ? $redirect : $request );
196
- exit();
197
- }
198
-
199
  public function register( WP_REST_Request $request ) {
200
  $username = $request->get_param( 'username' );
201
  $password = $request->get_param( 'password' );
123
  }
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  public function register( WP_REST_Request $request ) {
127
  $username = $request->get_param( 'username' );
128
  $password = $request->get_param( 'password' );
inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php CHANGED
@@ -248,7 +248,7 @@ class LP_Jwt_Courses_V1_Controller extends LP_REST_Jwt_Posts_Controller {
248
  $response = new LP_REST_Response();
249
  $receipt = ! empty( $request['receipt-data'] ) ? $request['receipt-data'] : '';
250
  $is_ios = ! empty( $request['is-ios'] ) ? true : false;
251
- $password = LP()->settings()->get( 'in_app_purchase_apple_shared_secret', '' );
252
 
253
  try {
254
  if ( empty( $receipt ) ) {
@@ -262,7 +262,7 @@ class LP_Jwt_Courses_V1_Controller extends LP_REST_Jwt_Posts_Controller {
262
  throw new Exception( __( 'Secret key is empty.', 'learnpress' ) );
263
  }
264
 
265
- $url = LP()->settings()->get( 'in_app_purchase_apple_sandbox' ) === 'yes' ? 'https://sandbox.itunes.apple.com/verifyReceipt' : 'https://buy.itunes.apple.com/verifyReceipt';
266
 
267
  $verify = wp_remote_post(
268
  $url,
248
  $response = new LP_REST_Response();
249
  $receipt = ! empty( $request['receipt-data'] ) ? $request['receipt-data'] : '';
250
  $is_ios = ! empty( $request['is-ios'] ) ? true : false;
251
+ $password = LP_Settings::instance()->get( 'in_app_purchase_apple_shared_secret', '' );
252
 
253
  try {
254
  if ( empty( $receipt ) ) {
262
  throw new Exception( __( 'Secret key is empty.', 'learnpress' ) );
263
  }
264
 
265
+ $url = LP_Settings::instance()->get( 'in_app_purchase_apple_sandbox' ) === 'yes' ? 'https://sandbox.itunes.apple.com/verifyReceipt' : 'https://buy.itunes.apple.com/verifyReceipt';
266
 
267
  $verify = wp_remote_post(
268
  $url,
inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php CHANGED
@@ -301,6 +301,9 @@ class LP_Jwt_Lessons_V1_Controller extends LP_REST_Jwt_Posts_Controller {
301
  case 'results':
302
  $data['results'] = $this->get_lesson_results( $object );
303
  break;
 
 
 
304
  }
305
  }
306
 
@@ -309,6 +312,20 @@ class LP_Jwt_Lessons_V1_Controller extends LP_REST_Jwt_Posts_Controller {
309
  return $data;
310
  }
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  public function check_can_finish_course( $id ) {
313
  $user = learn_press_get_current_user();
314
 
@@ -528,6 +545,11 @@ class LP_Jwt_Lessons_V1_Controller extends LP_REST_Jwt_Posts_Controller {
528
  ),
529
  ),
530
  ),
 
 
 
 
 
531
  ),
532
  );
533
 
301
  case 'results':
302
  $data['results'] = $this->get_lesson_results( $object );
303
  break;
304
+ case 'video_intro':
305
+ $data['video_intro'] = $this->get_video_intro( $id );
306
+ break;
307
  }
308
  }
309
 
312
  return $data;
313
  }
314
 
315
+ public function get_video_intro( $id ) {
316
+ $video_intro = get_post_meta( $id, '_lp_lesson_video_intro', true );
317
+
318
+ if ( ! $video_intro ) {
319
+ return '';
320
+ }
321
+
322
+ if ( wp_oembed_get( $video_intro ) ) {
323
+ return wp_oembed_get( $video_intro );
324
+ }
325
+
326
+ return do_shortcode( $video_intro );
327
+ }
328
+
329
  public function check_can_finish_course( $id ) {
330
  $user = learn_press_get_current_user();
331
 
545
  ),
546
  ),
547
  ),
548
+ 'video_intro' => array(
549
+ 'description' => __( 'Video intro.', 'learnpress' ),
550
+ 'type' => 'string',
551
+ 'context' => array( 'view', 'edit' ),
552
+ ),
553
  ),
554
  );
555
 
inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php CHANGED
@@ -116,20 +116,20 @@ abstract class LP_REST_Jwt_Posts_Controller extends LP_REST_Jwt_Controller {
116
  }
117
  }
118
 
119
- $base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '/%s/%s', $this->namespace, $base ) ) );
120
 
121
  if ( $page > 1 ) {
122
  $prev_page = $page - 1;
123
  if ( $prev_page > $max_pages ) {
124
  $prev_page = $max_pages;
125
  }
126
- $prev_link = add_query_arg( 'page', $prev_page, $base );
127
  $response->link_header( 'prev', $prev_link );
128
  }
129
 
130
  if ( $max_pages > $page ) {
131
  $next_page = $page + 1;
132
- $next_link = add_query_arg( 'page', $next_page, $base );
133
  $response->link_header( 'next', $next_link );
134
  }
135
 
@@ -204,9 +204,9 @@ abstract class LP_REST_Jwt_Posts_Controller extends LP_REST_Jwt_Controller {
204
  $id = isset( $request['id'] ) ? absint( $request['id'] ) : 0;
205
 
206
  if ( isset( $request['id'] ) ) {
207
- $post = get_post( $id );
208
 
209
- if ( empty( $post ) || empty( $post->ID ) || $this->post_type !== $post->post_type ) {
210
  return new WP_Error( 'rest_invalid_course', __( 'Invalid Course' ), array( 'status' => 404 ) );
211
  }
212
 
116
  }
117
  }
118
 
119
+ $base = esc_url( add_query_arg( $request->get_query_params(), rest_url( sprintf( '/%s/%s', $this->namespace, $base ) ) ) );
120
 
121
  if ( $page > 1 ) {
122
  $prev_page = $page - 1;
123
  if ( $prev_page > $max_pages ) {
124
  $prev_page = $max_pages;
125
  }
126
+ $prev_link = esc_url( add_query_arg( 'page', $prev_page, $base ) );
127
  $response->link_header( 'prev', $prev_link );
128
  }
129
 
130
  if ( $max_pages > $page ) {
131
  $next_page = $page + 1;
132
+ $next_link = esc_url( add_query_arg( 'page', $next_page, $base ) );
133
  $response->link_header( 'next', $next_link );
134
  }
135
 
204
  $id = isset( $request['id'] ) ? absint( $request['id'] ) : 0;
205
 
206
  if ( isset( $request['id'] ) ) {
207
+ $existing_post = get_post( $id );
208
 
209
+ if ( empty( $existing_post ) || empty( $existing_post->ID ) || $this->post_type !== $existing_post->post_type ) {
210
  return new WP_Error( 'rest_invalid_course', __( 'Invalid Course' ), array( 'status' => 404 ) );
211
  }
212
 
inc/jwt/rest-api/version1/class-lp-rest-users-v1-controller.php CHANGED
@@ -1116,7 +1116,7 @@ class LP_Jwt_Users_V1_Controller extends LP_REST_Jwt_Controller {
1116
  $output = array();
1117
 
1118
  if ( function_exists( 'lp_get_user_custom_register_fields' ) ) {
1119
- $custom_fields = LP()->settings()->get( 'register_profile_fields' );
1120
  $custom_profile = lp_get_user_custom_register_fields( $user->ID );
1121
 
1122
  if ( $custom_fields ) {
1116
  $output = array();
1117
 
1118
  if ( function_exists( 'lp_get_user_custom_register_fields' ) ) {
1119
+ $custom_fields = LP_Settings::instance()->get( 'register_profile_fields' );
1120
  $custom_profile = lp_get_user_custom_register_fields( $user->ID );
1121
 
1122
  if ( $custom_fields ) {
inc/lesson/lp-lesson-functions.php CHANGED
@@ -35,7 +35,7 @@ if ( ! function_exists( 'learn_press_get_only_content_permalink' ) ) {
35
  return $redirect;
36
  }
37
 
38
- return add_query_arg( 'content-item-only', 'yes', $_REQUEST['content-item-only-redirect'] );
39
  }
40
  }
41
  add_filter( 'comment_post_redirect', 'learn_press_get_only_content_permalink', 10, 2 );
@@ -43,7 +43,7 @@ add_filter( 'comment_post_redirect', 'learn_press_get_only_content_permalink', 1
43
  function learn_press_lesson_comment_form() {
44
  global $post;
45
 
46
- $course = LP_Global::course();
47
  if ( ! $course ) {
48
  return;
49
  }
35
  return $redirect;
36
  }
37
 
38
+ return esc_url( add_query_arg( 'content-item-only', 'yes', LP_Helper::sanitize_params_submitted( $_REQUEST['content-item-only-redirect'] ) ) );
39
  }
40
  }
41
  add_filter( 'comment_post_redirect', 'learn_press_get_only_content_permalink', 10, 2 );
43
  function learn_press_lesson_comment_form() {
44
  global $post;
45
 
46
+ $course = learn_press_get_course();
47
  if ( ! $course ) {
48
  return;
49
  }
inc/libraries/wp-background-process/classes/wp-async-request.php CHANGED
@@ -79,7 +79,7 @@ abstract class WP_Async_Request {
79
  * @return array|WP_Error
80
  */
81
  public function dispatch() {
82
- $url = add_query_arg( $this->get_query_args(), $this->get_query_url() );
83
  $args = $this->get_post_args();
84
 
85
  return wp_remote_post( esc_url_raw( $url ), $args );
79
  * @return array|WP_Error
80
  */
81
  public function dispatch() {
82
+ $url = esc_url( add_query_arg( $this->get_query_args(), $this->get_query_url() ) );
83
  $args = $this->get_post_args();
84
 
85
  return wp_remote_post( esc_url_raw( $url ), $args );
inc/lp-core-functions.php CHANGED
@@ -12,10 +12,10 @@ defined( 'ABSPATH' ) || exit;
12
 
13
  function learnpress_gutenberg_disable_cpt( $can_edit, $post_type ) {
14
  $post_types = array(
15
- LP_COURSE_CPT => LP()->settings()->get( 'enable_gutenberg_course' ),
16
- LP_LESSON_CPT => LP()->settings()->get( 'enable_gutenberg_lesson' ),
17
- LP_QUIZ_CPT => LP()->settings()->get( 'enable_gutenberg_quiz' ),
18
- LP_QUESTION_CPT => LP()->settings()->get( 'enable_gutenberg_question' ),
19
  );
20
 
21
  foreach ( $post_types as $key => $pt ) {
@@ -209,32 +209,16 @@ function learn_press_include( $file, $folder = 'inc', $include_once = true ) {
209
  * @return mixed
210
  */
211
  function learn_press_get_ip() {
212
- // Just get the headers if we can or else use the SERVER global
213
- if ( function_exists( 'apache_request_headers' ) ) {
214
- $headers = apache_request_headers();
215
- } else {
216
- $headers = $_SERVER;
217
- }
218
- // Get the forwarded IP if it exists
219
- if ( array_key_exists( 'X-Forwarded-For', $headers ) &&
220
- (
221
- filter_var( $headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ||
222
- filter_var( $headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) )
223
- ) {
224
- $the_ip = $headers['X-Forwarded-For'];
225
- } elseif (
226
- array_key_exists( 'HTTP_X_FORWARDED_FOR', $headers ) &&
227
- (
228
- filter_var( $headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ||
229
- filter_var( $headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 )
230
- )
231
- ) {
232
- $the_ip = $headers['HTTP_X_FORWARDED_FOR'];
233
- } else {
234
- $the_ip = $_SERVER['REMOTE_ADDR'];
235
  }
236
-
237
- return esc_sql( $the_ip );
238
  }
239
 
240
  /**
@@ -242,8 +226,8 @@ function learn_press_get_ip() {
242
  *
243
  * @return string
244
  */
245
- function learn_press_get_user_agent() {
246
- return isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '';
247
  }
248
 
249
  /**
@@ -316,7 +300,7 @@ function learn_press_get_current_url() {
316
  static $current_url;
317
 
318
  if ( ! $current_url ) {
319
- $url = untrailingslashit( $_SERVER['REQUEST_URI'] );
320
 
321
  if ( ! preg_match( '!^https?!', $url ) ) {
322
  $siteurl = trailingslashit( get_home_url() );
@@ -330,7 +314,7 @@ function learn_press_get_current_url() {
330
 
331
  if ( $home_query ) {
332
  parse_str( untrailingslashit( $home_query ), $home_query );
333
- $url = add_query_arg( $home_query, $url );
334
  }
335
 
336
  $segs1 = explode( '/', $siteurl );
@@ -1043,7 +1027,7 @@ function learn_press_currency_positions( $currency = false ) {
1043
  $currency = learn_press_get_currency_symbol();
1044
  }
1045
 
1046
- $settings = LP()->settings();
1047
 
1048
  $thousands_separator = '';
1049
  $decimals_separator = $settings->get( 'decimals_separator', '.' );
@@ -1496,7 +1480,7 @@ function learn_press_get_page_link( string $key ): string {
1496
  * @return string
1497
  */
1498
  function learn_press_get_page_title( $key ) {
1499
- $page_id = LP()->settings->get( $key . '_page_id' );
1500
  $title = '';
1501
 
1502
  if ( $page_id && get_post_status( $page_id ) == 'publish' ) {
@@ -1585,8 +1569,10 @@ function learn_press_seconds_to_weeks( int $secs = 0 ) {
1585
  return $result;
1586
  }
1587
 
1588
-
1589
- function learn_press_get_query_var( $var ) {
 
 
1590
  global $wp_query;
1591
 
1592
  $return = null;
@@ -1597,7 +1583,7 @@ function learn_press_get_query_var( $var ) {
1597
  }
1598
 
1599
  return apply_filters( 'learn_press_query_var', $return, $var );
1600
- }
1601
 
1602
  function learn_press_course_lesson_permalink_friendly( $permalink, $lesson_id, $course_id ) {
1603
  if ( '' != get_option( 'permalink_structure' ) ) {
@@ -1807,24 +1793,22 @@ function learn_press_maybe_send_json( $data, $callback = null ) {
1807
  * @return mixed
1808
  */
1809
  function learn_press_get_request( $key, $default = null, $hash = null ) {
1810
- $return = $default;
1811
 
1812
  if ( $hash ) {
1813
  if ( ! empty( $hash[ $key ] ) ) {
1814
- $return = $hash[ $key ];
1815
  }
1816
  } else {
1817
  if ( ! empty( $_POST[ $key ] ) ) {
1818
- $return = $_POST[ $key ];
1819
  } elseif ( ! empty( $_GET[ $key ] ) ) {
1820
- $return = $_GET[ $key ];
1821
  } elseif ( ! empty( $_REQUEST[ $key ] ) ) {
1822
- $return = $_REQUEST[ $key ];
1823
  }
1824
  }
1825
 
1826
- $return = LP_Helper::sanitize_params_submitted( $return );
1827
-
1828
  return $return;
1829
  }
1830
 
@@ -2010,7 +1994,7 @@ function learn_press_get_login_url( $redirect = null ) {
2010
  $url = wp_login_url( $redirect );
2011
  $profile_page = learn_press_get_page_link( 'profile' );
2012
 
2013
- if ( 'yes' === LP()->settings()->get( 'enable_login_profile' ) && $profile_page ) {
2014
  $parse_url = parse_url( $url );
2015
  $url = $profile_page . ( ! empty( $parse_url['query'] ) ? '?' . $parse_url['query'] : '' );
2016
  }
@@ -2045,7 +2029,7 @@ function learn_press_get_endpoint_url( $name, $value, $url ) {
2045
  $url = trailingslashit( $url ) . ( $name ? $name . '/' : '' ) . $value . $query_string;
2046
 
2047
  } else {
2048
- $url = add_query_arg( $name, $value, $url );
2049
  }
2050
 
2051
  return apply_filters( 'learn_press_get_endpoint_url', esc_url( $url ), $name, $value, $url );
@@ -2217,14 +2201,14 @@ function learn_press_get_current_profile_tab( $default = true ) {
2217
  $current = '';
2218
 
2219
  if ( ! empty( $_REQUEST['tab'] ) ) {
2220
- $current = $_REQUEST['tab'];
2221
  } elseif ( ! empty( $wp_query->query_vars['tab'] ) ) {
2222
  $current = $wp_query->query_vars['tab'];
2223
  } elseif ( ! empty( $wp->query_vars['view'] ) ) {
2224
  $current = $wp->query_vars['view'];
2225
  } else {
2226
- if ( $default && $tabs = learn_press_get_user_profile_tabs() ) {
2227
-
2228
  // Fixed for array_keys does not work with ArrayAccess instance
2229
  if ( $tabs instanceof LP_Profile_Tabs ) {
2230
  $tabs = $tabs->tabs();
@@ -2555,8 +2539,8 @@ function learn_press_get_current_time() {
2555
 
2556
  function learn_press_get_requested_post_type() {
2557
  global $pagenow;
2558
- if ( $pagenow == 'post-new.php' && ! empty( $_GET['post_type'] ) ) {
2559
- $post_type = $_REQUEST['post_type'];
2560
  } else {
2561
  $post_id = learn_press_get_post();
2562
  $post_type = learn_press_get_post_type( $post_id );
@@ -3424,12 +3408,12 @@ function learn_press_date_diff( $from, $to ) {
3424
 
3425
  function learn_press_cookie_get( $name, $namespace = 'LP' ) {
3426
  if ( $namespace ) {
3427
- $cookie = ! empty( $_COOKIE[ $namespace ] ) ? (array) json_decode( stripslashes( $_COOKIE[ $namespace ] ) ) : array();
3428
  } else {
3429
  $cookie = $_COOKIE;
3430
  }
3431
 
3432
- return isset( $cookie[ $name ] ) ? $cookie[ $name ] : null;
3433
  }
3434
 
3435
  /**
12
 
13
  function learnpress_gutenberg_disable_cpt( $can_edit, $post_type ) {
14
  $post_types = array(
15
+ LP_COURSE_CPT => LP_Settings::instance()->get( 'enable_gutenberg_course' ),
16
+ LP_LESSON_CPT => LP_Settings::instance()->get( 'enable_gutenberg_lesson' ),
17
+ LP_QUIZ_CPT => LP_Settings::instance()->get( 'enable_gutenberg_quiz' ),
18
+ LP_QUESTION_CPT => LP_Settings::instance()->get( 'enable_gutenberg_question' ),
19
  );
20
 
21
  foreach ( $post_types as $key => $pt ) {
209
  * @return mixed
210
  */
211
  function learn_press_get_ip() {
212
+ if ( isset( $_SERVER['HTTP_X_REAL_IP'] ) ) {
213
+ return sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_REAL_IP'] ) );
214
+ } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
215
+ // Proxy servers can send through this header like this: X-Forwarded-For: client1, proxy1, proxy2
216
+ // Make sure we always only send through the first IP in the list which should always be the client IP.
217
+ return (string) rest_is_ip_address( trim( current( preg_split( '/,/', sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) ) ) ) );
218
+ } elseif ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
219
+ return sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  }
221
+ return '';
 
222
  }
223
 
224
  /**
226
  *
227
  * @return string
228
  */
229
+ function learn_press_get_user_agent(): string {
230
+ return LP_Helper::sanitize_params_submitted( $_SERVER['HTTP_USER_AGENT'] ?? '' );
231
  }
232
 
233
  /**
300
  static $current_url;
301
 
302
  if ( ! $current_url ) {
303
+ $url = untrailingslashit( esc_url( $_SERVER['REQUEST_URI'] ) );
304
 
305
  if ( ! preg_match( '!^https?!', $url ) ) {
306
  $siteurl = trailingslashit( get_home_url() );
314
 
315
  if ( $home_query ) {
316
  parse_str( untrailingslashit( $home_query ), $home_query );
317
+ $url = esc_url( add_query_arg( $home_query, $url ) );
318
  }
319
 
320
  $segs1 = explode( '/', $siteurl );
1027
  $currency = learn_press_get_currency_symbol();
1028
  }
1029
 
1030
+ $settings = LP_Settings::instance();
1031
 
1032
  $thousands_separator = '';
1033
  $decimals_separator = $settings->get( 'decimals_separator', '.' );
1480
  * @return string
1481
  */
1482
  function learn_press_get_page_title( $key ) {
1483
+ $page_id = LP_Settings::instance()->get( $key . '_page_id' );
1484
  $title = '';
1485
 
1486
  if ( $page_id && get_post_status( $page_id ) == 'publish' ) {
1569
  return $result;
1570
  }
1571
 
1572
+ /**
1573
+ * @depecated since version 4.1.6.6
1574
+ */
1575
+ /*function learn_press_get_query_var( $var ) {
1576
  global $wp_query;
1577
 
1578
  $return = null;
1583
  }
1584
 
1585
  return apply_filters( 'learn_press_query_var', $return, $var );
1586
+ }*/
1587
 
1588
  function learn_press_course_lesson_permalink_friendly( $permalink, $lesson_id, $course_id ) {
1589
  if ( '' != get_option( 'permalink_structure' ) ) {
1793
  * @return mixed
1794
  */
1795
  function learn_press_get_request( $key, $default = null, $hash = null ) {
1796
+ $return = LP_Helper::sanitize_params_submitted( $default );
1797
 
1798
  if ( $hash ) {
1799
  if ( ! empty( $hash[ $key ] ) ) {
1800
+ $return = LP_Helper::sanitize_params_submitted( $hash[ $key ] );
1801
  }
1802
  } else {
1803
  if ( ! empty( $_POST[ $key ] ) ) {
1804
+ $return = LP_Helper::sanitize_params_submitted( $_POST[ $key ] );
1805
  } elseif ( ! empty( $_GET[ $key ] ) ) {
1806
+ $return = LP_Helper::sanitize_params_submitted( $_GET[ $key ] );
1807
  } elseif ( ! empty( $_REQUEST[ $key ] ) ) {
1808
+ $return = LP_Helper::sanitize_params_submitted( $_REQUEST[ $key ] );
1809
  }
1810
  }
1811
 
 
 
1812
  return $return;
1813
  }
1814
 
1994
  $url = wp_login_url( $redirect );
1995
  $profile_page = learn_press_get_page_link( 'profile' );
1996
 
1997
+ if ( 'yes' === LP_Settings::instance()->get( 'enable_login_profile' ) && $profile_page ) {
1998
  $parse_url = parse_url( $url );
1999
  $url = $profile_page . ( ! empty( $parse_url['query'] ) ? '?' . $parse_url['query'] : '' );
2000
  }
2029
  $url = trailingslashit( $url ) . ( $name ? $name . '/' : '' ) . $value . $query_string;
2030
 
2031
  } else {
2032
+ $url = esc_url( add_query_arg( $name, $value, $url ) );
2033
  }
2034
 
2035
  return apply_filters( 'learn_press_get_endpoint_url', esc_url( $url ), $name, $value, $url );
2201
  $current = '';
2202
 
2203
  if ( ! empty( $_REQUEST['tab'] ) ) {
2204
+ $current = LP_Helper::sanitize_params_submitted( $_REQUEST['tab'] );
2205
  } elseif ( ! empty( $wp_query->query_vars['tab'] ) ) {
2206
  $current = $wp_query->query_vars['tab'];
2207
  } elseif ( ! empty( $wp->query_vars['view'] ) ) {
2208
  $current = $wp->query_vars['view'];
2209
  } else {
2210
+ $tabs = learn_press_get_user_profile_tabs();
2211
+ if ( $default && $tabs ) {
2212
  // Fixed for array_keys does not work with ArrayAccess instance
2213
  if ( $tabs instanceof LP_Profile_Tabs ) {
2214
  $tabs = $tabs->tabs();
2539
 
2540
  function learn_press_get_requested_post_type() {
2541
  global $pagenow;
2542
+ if ( $pagenow == 'post-new.php' && ! empty( $_REQUEST['post_type'] ) ) {
2543
+ $post_type = LP_Helper::sanitize_params_submitted( $_REQUEST['post_type'] );
2544
  } else {
2545
  $post_id = learn_press_get_post();
2546
  $post_type = learn_press_get_post_type( $post_id );
3408
 
3409
  function learn_press_cookie_get( $name, $namespace = 'LP' ) {
3410
  if ( $namespace ) {
3411
+ $cookie = ! empty( $_COOKIE[ $namespace ] ) ? (array) json_decode( LP_Helper::sanitize_params_submitted( stripslashes( $_COOKIE[ $namespace ] ), 'html' ) ) : array();
3412
  } else {
3413
  $cookie = $_COOKIE;
3414
  }
3415
 
3416
+ return $cookie[ $name ] ?? null;
3417
  }
3418
 
3419
  /**
inc/lp-deprecated.php CHANGED
@@ -771,8 +771,8 @@ if ( ! function_exists( 'learn_press_course_price' ) ) {
771
  */
772
  function learn_press_course_price() {
773
  _deprecated_function( __FUNCTION__, '4.0.0' );
774
- $user = LP_Global::user();
775
- $course = LP_Global::course();
776
 
777
  if ( $user && $user->has_enrolled_course( $course->get_id() ) ) {
778
  return;
@@ -882,8 +882,8 @@ if ( ! function_exists( 'learn_press_content_item_quiz_title' ) ) {
882
 
883
  if ( ! function_exists( 'learn_press_content_item_quiz_intro' ) ) {
884
  function learn_press_content_item_quiz_intro() {
885
- $course = LP_Global::course();
886
- $user = LP_Global::user();
887
  $quiz = LP_Global::course_item_quiz();
888
 
889
  if ( $user->has_quiz_status( array( 'started', 'completed' ), $quiz->get_id(), $course->get_id() ) ) {
@@ -927,9 +927,9 @@ if ( ! function_exists( 'learn_press_content_item_summary_question_title' ) ) {
927
  if ( ! function_exists( 'learn_press_content_item_summary_quiz_progress' ) ) {
928
 
929
  function learn_press_content_item_summary_quiz_progress() {
930
- $course = LP_Global::course();
931
  $quiz = LP_Global::course_item_quiz();
932
- $user = LP_Global::user();
933
 
934
  if ( ! $user ) {
935
  return;
@@ -960,7 +960,7 @@ if ( ! function_exists( 'learn_press_content_item_summary_quiz_result' ) ) {
960
 
961
  function learn_press_content_item_summary_quiz_result() {
962
  $quiz = LP_Global::course_item_quiz();
963
- $user = LP_Global::user();
964
  if ( ! $user->has_completed_quiz( $quiz->get_id(), get_the_ID() ) ) {
965
  return;
966
  }
@@ -1482,8 +1482,8 @@ if ( ! function_exists( 'learn_press_content_item_summary_question_hint' ) ) {
1482
  function learn_press_content_item_summary_question_hint() {
1483
  $quiz = LP_Global::course_item_quiz();
1484
  if ( $question = $quiz->get_viewing_question() ) {
1485
- $course = LP_Global::course();
1486
- $user = LP_Global::user();
1487
  $course_data = $user->get_course_data( $course->get_id() );
1488
  $user_quiz = $course_data->get_item_quiz( $quiz->get_id() );
1489
 
@@ -1506,8 +1506,8 @@ if ( ! function_exists( 'learn_press_content_item_summary_questions' ) ) {
1506
  return;
1507
  $quiz = LP_Global::course_item_quiz();
1508
  if ( $questions = $quiz->get_questions() ) {
1509
- $course = LP_Global::course();
1510
- $user = LP_Global::user();
1511
  $course_data = $user->get_course_data( $course->get_id() );
1512
  $quiz_data = $course_data->get_item_quiz( $quiz->get_id() );
1513
  global $lp_quiz_question;
@@ -1527,8 +1527,8 @@ if ( ! function_exists( 'learn_press_content_item_summary_questions' ) ) {
1527
  if ( ! function_exists( 'learn_press_content_item_summary_question_numbers' ) ) {
1528
 
1529
  function learn_press_content_item_summary_question_numbers() {
1530
- $course = LP_Global::course();
1531
- $user = LP_Global::user();
1532
  $quiz = LP_Global::course_item_quiz();
1533
 
1534
  if ( ! $quiz->get_show_hide_question() ) {
@@ -1550,8 +1550,8 @@ if ( ! function_exists( 'learn_press_content_item_summary_question_numbers' ) )
1550
  if ( ! function_exists( 'learn_press_quiz_nav_buttons' ) ) {
1551
 
1552
  function learn_press_quiz_nav_buttons() {
1553
- $course = LP_Global::course();
1554
- $user = LP_Global::user();
1555
  $quiz = LP_Global::course_item_quiz();
1556
 
1557
  if ( ! $user->has_quiz_status( array( 'started', 'completed' ), $quiz->get_id(), $course->get_id() ) ) {
@@ -1569,8 +1569,8 @@ if ( ! function_exists( 'learn_press_quiz_nav_buttons' ) ) {
1569
  if ( ! function_exists( 'learn_press_quiz_start_button' ) ) {
1570
 
1571
  function learn_press_quiz_start_button() {
1572
- $course = LP_Global::course();
1573
- $user = LP_Global::user();
1574
  $quiz = LP_Global::course_item_quiz();
1575
 
1576
  if ( $user->has_course_status( $course->get_id(), array( 'finished' ) ) || $user->has_quiz_status(
@@ -1595,8 +1595,8 @@ if ( ! function_exists( 'learn_press_quiz_start_button' ) ) {
1595
  if ( ! function_exists( 'learn_press_quiz_continue_button' ) ) {
1596
 
1597
  function learn_press_quiz_continue_button() {
1598
- $course = LP_Global::course();
1599
- $user = LP_Global::user();
1600
  $quiz = LP_Global::course_item_quiz();
1601
 
1602
  if ( ! $user->has_quiz_status( 'started', $quiz->get_id(), $course->get_id() ) ) {
@@ -1614,8 +1614,8 @@ if ( ! function_exists( 'learn_press_quiz_continue_button' ) ) {
1614
  if ( ! function_exists( 'learn_press_quiz_complete_button' ) ) {
1615
 
1616
  function learn_press_quiz_complete_button() {
1617
- $course = LP_Global::course();
1618
- $user = LP_Global::user();
1619
  $quiz = LP_Global::course_item_quiz();
1620
 
1621
  if ( $user->has_course_status( $course->get_id(), array( 'finished' ) ) || ! $user->has_quiz_status( 'started', $quiz->get_id(), $course->get_id() ) ) {
@@ -1628,8 +1628,8 @@ if ( ! function_exists( 'learn_press_quiz_complete_button' ) ) {
1628
  if ( ! function_exists( 'learn_press_quiz_redo_button' ) ) {
1629
 
1630
  function learn_press_quiz_redo_button() {
1631
- $course = LP_Global::course();
1632
- $user = LP_Global::user();
1633
  $quiz = LP_Global::course_item_quiz();
1634
 
1635
  if ( ! $user->has_quiz_status( 'completed', $quiz->get_id(), $course->get_id() ) ) {
@@ -1647,8 +1647,8 @@ if ( ! function_exists( 'learn_press_quiz_redo_button' ) ) {
1647
  if ( ! function_exists( 'learn_press_quiz_result_button' ) ) {
1648
 
1649
  function learn_press_quiz_result_button() {
1650
- $course = LP_Global::course();
1651
- $user = LP_Global::user();
1652
  $quiz = LP_Global::course_item_quiz();
1653
 
1654
  if ( ! $user->has_quiz_status( 'completed', $quiz->get_id(), $course->get_id() ) ) {
@@ -1670,8 +1670,8 @@ if ( ! function_exists( 'learn_press_quiz_result_button' ) ) {
1670
  if ( ! function_exists( 'learn_press_quiz_summary_button' ) ) {
1671
 
1672
  function learn_press_quiz_summary_button() {
1673
- $course = LP_Global::course();
1674
- $user = LP_Global::user();
1675
  $quiz = LP_Global::course_item_quiz();
1676
 
1677
  if ( ! $user->has_quiz_status( 'completed', $quiz->get_id(), $course->get_id() ) ) {
@@ -1689,8 +1689,8 @@ if ( ! function_exists( 'learn_press_quiz_summary_button' ) ) {
1689
  if ( ! function_exists( 'learn_press_quiz_check_button' ) ) {
1690
 
1691
  function learn_press_quiz_check_button() {
1692
- $course = LP_Global::course();
1693
- $user = LP_Global::user();
1694
  $quiz = LP_Global::course_item_quiz();
1695
 
1696
  if ( ! $quiz->is_viewing_question() ) {
@@ -1712,8 +1712,8 @@ if ( ! function_exists( 'learn_press_quiz_check_button' ) ) {
1712
  if ( ! function_exists( 'learn_press_quiz_hint_button' ) ) {
1713
 
1714
  function learn_press_quiz_hint_button() {
1715
- $course = LP_Global::course();
1716
- $user = LP_Global::user();
1717
  $quiz = LP_Global::course_item_quiz();
1718
  $question = LP_Global::quiz_question();
1719
 
@@ -1806,7 +1806,7 @@ if ( ! function_exists( 'learn_press_profile_dashboard_not_logged_in' ) ) {
1806
  return;
1807
  }
1808
 
1809
- if ( 'yes' === LP()->settings()->get( 'enable_register_profile' ) || 'yes' === LP()->settings()->get( 'enable_login_profile' ) ) {
1810
  return;
1811
  }
1812
 
@@ -1827,7 +1827,7 @@ if ( ! function_exists( 'learn_press_profile_login_form' ) ) {
1827
  return;
1828
  }
1829
 
1830
- if ( 'yes' !== LP()->settings()->get( 'enable_login_profile' ) ) {
1831
  return;
1832
  }
1833
 
@@ -1847,7 +1847,7 @@ if ( ! function_exists( 'learn_press_profile_register_form' ) ) {
1847
  return;
1848
  }
1849
 
1850
- if ( 'yes' !== LP()->settings()->get( 'enable_register_profile' ) ) {
1851
  return;
1852
  }
1853
 
@@ -1901,8 +1901,8 @@ if ( ! function_exists( 'learn_press_content_item_lesson_content_blocked' ) ) {
1901
 
1902
  if ( ! function_exists( 'learn_press_content_item_lesson_complete_button' ) ) {
1903
  function learn_press_content_item_lesson_complete_button() {
1904
- $user = LP_Global::user();
1905
- $course = LP_Global::course();
1906
  $lesson = LP_Global::course_item();
1907
 
1908
  if ( ! $course->is_required_enroll() ) {
@@ -1930,8 +1930,8 @@ if ( ! function_exists( 'learn_press_content_item_summary_question_explanation'
1930
  function learn_press_content_item_summary_question_explanation() {
1931
  $quiz = LP_Global::course_item_quiz();
1932
  if ( $question = $quiz->get_viewing_question() ) {
1933
- $course = LP_Global::course();
1934
- $user = LP_Global::user();
1935
  $course_data = $user->get_course_data( $course->get_id() );
1936
  $user_quiz = $course_data->get_item_quiz( $quiz->get_id() );
1937
 
@@ -2071,7 +2071,7 @@ if ( ! function_exists( 'learn_press_profile_tab_courses_own' ) ) {
2071
  'user' => $user,
2072
  'subtab' => $tab,
2073
  );
2074
- $limit = LP()->settings->get( 'profile_courses_limit', 10 );
2075
  $limit = apply_filters( 'learn_press_profile_tab_courses_own_limit', $limit );
2076
  $courses = $user->get( 'own-courses', array( 'limit' => $limit ) );
2077
  $num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );
@@ -2093,7 +2093,7 @@ if ( ! function_exists( 'learn_press_profile_tab_courses_learning' ) ) {
2093
  'user' => $user,
2094
  'subtab' => $tab,
2095
  );
2096
- $limit = LP()->settings->get( 'profile_courses_limit', 10 );
2097
  $limit = apply_filters( 'learn_press_profile_tab_courses_learning_limit', $limit );
2098
  $courses = $user->get(
2099
  'enrolled-courses',
@@ -2120,7 +2120,7 @@ if ( ! function_exists( 'learn_press_profile_tab_courses_purchased' ) ) {
2120
  'user' => $user,
2121
  'subtab' => $tab,
2122
  );
2123
- $limit = LP()->settings->get( 'profile_courses_limit', 10 );
2124
  $limit = apply_filters( 'learn_press_profile_tab_courses_purchased_limit', $limit );
2125
  $courses = $user->get( 'purchased-courses', array( 'limit' => $limit ) );
2126
  $num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );
@@ -2141,7 +2141,7 @@ if ( ! function_exists( 'learn_press_profile_tab_courses_finished' ) ) {
2141
  'user' => $user,
2142
  'subtab' => $tab,
2143
  );
2144
- $limit = LP()->settings->get( 'profile_courses_limit', 10 );
2145
  $limit = apply_filters( 'learn_press_profile_tab_courses_finished_limit', $limit );
2146
  $courses = $user->get(
2147
  'enrolled-courses',
@@ -2187,7 +2187,7 @@ if ( ! function_exists( 'learn_press_profile_tab_courses_all' ) ) {
2187
  'user' => $user,
2188
  'subtab' => $tab,
2189
  );
2190
- $limit = LP()->settings->get( 'profile_courses_limit', 10 );
2191
  $limit = apply_filters( 'learn_press_profile_tab_courses_all_limit', $limit );
2192
  $courses = $user->get( 'courses', array( 'limit' => $limit ) );
2193
  $num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );
771
  */
772
  function learn_press_course_price() {
773
  _deprecated_function( __FUNCTION__, '4.0.0' );
774
+ $user = learn_press_get_current_user();
775
+ $course = learn_press_get_course();
776
 
777
  if ( $user && $user->has_enrolled_course( $course->get_id() ) ) {
778
  return;
882
 
883
  if ( ! function_exists( 'learn_press_content_item_quiz_intro' ) ) {
884
  function learn_press_content_item_quiz_intro() {
885
+ $course = learn_press_get_course();
886
+ $user = learn_press_get_current_user();
887
  $quiz = LP_Global::course_item_quiz();
888
 
889
  if ( $user->has_quiz_status( array( 'started', 'completed' ), $quiz->get_id(), $course->get_id() ) ) {
927
  if ( ! function_exists( 'learn_press_content_item_summary_quiz_progress' ) ) {
928
 
929
  function learn_press_content_item_summary_quiz_progress() {
930
+ $course = learn_press_get_course();
931
  $quiz = LP_Global::course_item_quiz();
932
+ $user = learn_press_get_current_user();
933
 
934
  if ( ! $user ) {
935
  return;
960
 
961
  function learn_press_content_item_summary_quiz_result() {
962
  $quiz = LP_Global::course_item_quiz();
963
+ $user = learn_press_get_current_user();
964
  if ( ! $user->has_completed_quiz( $quiz->get_id(), get_the_ID() ) ) {
965
  return;
966
  }
1482
  function learn_press_content_item_summary_question_hint() {
1483
  $quiz = LP_Global::course_item_quiz();
1484
  if ( $question = $quiz->get_viewing_question() ) {
1485
+ $course = learn_press_get_course();
1486
+ $user = learn_press_get_current_user();
1487
  $course_data = $user->get_course_data( $course->get_id() );
1488
  $user_quiz = $course_data->get_item_quiz( $quiz->get_id() );
1489
 
1506
  return;
1507
  $quiz = LP_Global::course_item_quiz();
1508
  if ( $questions = $quiz->get_questions() ) {
1509
+ $course = learn_press_get_course();
1510
+ $user = learn_press_get_current_user();
1511
  $course_data = $user->get_course_data( $course->get_id() );
1512
  $quiz_data = $course_data->get_item_quiz( $quiz->get_id() );
1513
  global $lp_quiz_question;
1527
  if ( ! function_exists( 'learn_press_content_item_summary_question_numbers' ) ) {
1528
 
1529
  function learn_press_content_item_summary_question_numbers() {
1530
+ $course = learn_press_get_course();
1531
+ $user = learn_press_get_current_user();
1532
  $quiz = LP_Global::course_item_quiz();
1533
 
1534
  if ( ! $quiz->get_show_hide_question() ) {
1550
  if ( ! function_exists( 'learn_press_quiz_nav_buttons' ) ) {
1551
 
1552
  function learn_press_quiz_nav_buttons() {
1553
+ $course = learn_press_get_course();
1554
+ $user = learn_press_get_current_user();
1555
  $quiz = LP_Global::course_item_quiz();
1556
 
1557
  if ( ! $user->has_quiz_status( array( 'started', 'completed' ), $quiz->get_id(), $course->get_id() ) ) {
1569
  if ( ! function_exists( 'learn_press_quiz_start_button' ) ) {
1570
 
1571
  function learn_press_quiz_start_button() {
1572
+ $course = learn_press_get_course();
1573
+ $user = learn_press_get_current_user();
1574
  $quiz = LP_Global::course_item_quiz();
1575
 
1576
  if ( $user->has_course_status( $course->get_id(), array( 'finished' ) ) || $user->has_quiz_status(
1595
  if ( ! function_exists( 'learn_press_quiz_continue_button' ) ) {
1596
 
1597
  function learn_press_quiz_continue_button() {
1598
+ $course = learn_press_get_course();
1599
+ $user = learn_press_get_current_user();
1600
  $quiz = LP_Global::course_item_quiz();
1601
 
1602
  if ( ! $user->has_quiz_status( 'started', $quiz->get_id(), $course->get_id() ) ) {
1614
  if ( ! function_exists( 'learn_press_quiz_complete_button' ) ) {
1615
 
1616
  function learn_press_quiz_complete_button() {
1617
+ $course = learn_press_get_course();
1618
+ $user = learn_press_get_current_user();
1619
  $quiz = LP_Global::course_item_quiz();
1620
 
1621
  if ( $user->has_course_status( $course->get_id(), array( 'finished' ) ) || ! $user->has_quiz_status( 'started', $quiz->get_id(), $course->get_id() ) ) {
1628
  if ( ! function_exists( 'learn_press_quiz_redo_button' ) ) {
1629
 
1630
  function learn_press_quiz_redo_button() {
1631
+ $course = learn_press_get_course();
1632
+ $user = learn_press_get_current_user();
1633
  $quiz = LP_Global::course_item_quiz();
1634
 
1635
  if ( ! $user->has_quiz_status( 'completed', $quiz->get_id(), $course->get_id() ) ) {
1647
  if ( ! function_exists( 'learn_press_quiz_result_button' ) ) {
1648
 
1649
  function learn_press_quiz_result_button() {
1650
+ $course = learn_press_get_course();
1651
+ $user = learn_press_get_current_user();
1652
  $quiz = LP_Global::course_item_quiz();
1653
 
1654
  if ( ! $user->has_quiz_status( 'completed', $quiz->get_id(), $course->get_id() ) ) {
1670
  if ( ! function_exists( 'learn_press_quiz_summary_button' ) ) {
1671
 
1672
  function learn_press_quiz_summary_button() {
1673
+ $course = learn_press_get_course();
1674
+ $user = learn_press_get_current_user();
1675
  $quiz = LP_Global::course_item_quiz();
1676
 
1677
  if ( ! $user->has_quiz_status( 'completed', $quiz->get_id(), $course->get_id() ) ) {
1689
  if ( ! function_exists( 'learn_press_quiz_check_button' ) ) {
1690
 
1691
  function learn_press_quiz_check_button() {
1692
+ $course = learn_press_get_course();
1693
+ $user = learn_press_get_current_user();
1694
  $quiz = LP_Global::course_item_quiz();
1695
 
1696
  if ( ! $quiz->is_viewing_question() ) {
1712
  if ( ! function_exists( 'learn_press_quiz_hint_button' ) ) {
1713
 
1714
  function learn_press_quiz_hint_button() {
1715
+ $course = learn_press_get_course();
1716
+ $user = learn_press_get_current_user();
1717
  $quiz = LP_Global::course_item_quiz();
1718
  $question = LP_Global::quiz_question();
1719
 
1806
  return;
1807
  }
1808
 
1809
+ if ( 'yes' === LP_Settings::instance()->get( 'enable_register_profile' ) || 'yes' === LP_Settings::instance()->get( 'enable_login_profile' ) ) {
1810
  return;
1811
  }
1812
 
1827
  return;
1828
  }
1829
 
1830
+ if ( 'yes' !== LP_Settings::instance()->get( 'enable_login_profile' ) ) {
1831
  return;
1832
  }
1833
 
1847
  return;
1848
  }
1849
 
1850
+ if ( 'yes' !== LP_Settings::instance()->get( 'enable_register_profile' ) ) {
1851
  return;
1852
  }
1853
 
1901
 
1902
  if ( ! function_exists( 'learn_press_content_item_lesson_complete_button' ) ) {
1903
  function learn_press_content_item_lesson_complete_button() {
1904
+ $user = learn_press_get_current_user();
1905
+ $course = learn_press_get_course();
1906
  $lesson = LP_Global::course_item();
1907
 
1908
  if ( ! $course->is_required_enroll() ) {
1930
  function learn_press_content_item_summary_question_explanation() {
1931
  $quiz = LP_Global::course_item_quiz();
1932
  if ( $question = $quiz->get_viewing_question() ) {
1933
+ $course = learn_press_get_course();
1934
+ $user = learn_press_get_current_user();
1935
  $course_data = $user->get_course_data( $course->get_id() );
1936
  $user_quiz = $course_data->get_item_quiz( $quiz->get_id() );
1937
 
2071
  'user' => $user,
2072
  'subtab' => $tab,
2073
  );
2074
+ $limit = LP_Settings::instance()->get( 'profile_courses_limit', 10 );
2075
  $limit = apply_filters( 'learn_press_profile_tab_courses_own_limit', $limit );
2076
  $courses = $user->get( 'own-courses', array( 'limit' => $limit ) );
2077
  $num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );
2093
  'user' => $user,
2094
  'subtab' => $tab,
2095
  );
2096
+ $limit = LP_Settings::instance()->get( 'profile_courses_limit', 10 );
2097
  $limit = apply_filters( 'learn_press_profile_tab_courses_learning_limit', $limit );
2098
  $courses = $user->get(
2099
  'enrolled-courses',
2120
  'user' => $user,
2121
  'subtab' => $tab,
2122
  );
2123
+ $limit = LP_Settings::instance()->get( 'profile_courses_limit', 10 );
2124
  $limit = apply_filters( 'learn_press_profile_tab_courses_purchased_limit', $limit );
2125
  $courses = $user->get( 'purchased-courses', array( 'limit' => $limit ) );
2126
  $num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );
2141
  'user' => $user,
2142
  'subtab' => $tab,
2143
  );
2144
+ $limit = LP_Settings::instance()->get( 'profile_courses_limit', 10 );
2145
  $limit = apply_filters( 'learn_press_profile_tab_courses_finished_limit', $limit );
2146
  $courses = $user->get(
2147
  'enrolled-courses',
2187
  'user' => $user,
2188
  'subtab' => $tab,
2189
  );
2190
+ $limit = LP_Settings::instance()->get( 'profile_courses_limit', 10 );
2191
  $limit = apply_filters( 'learn_press_profile_tab_courses_all_limit', $limit );
2192
  $courses = $user->get( 'courses', array( 'limit' => $limit ) );
2193
  $num_pages = learn_press_get_num_pages( $user->_get_found_rows(), $limit );
inc/lp-template-functions.php CHANGED
@@ -132,8 +132,8 @@ if ( ! function_exists( 'learn_press_content_item_summary_question' ) ) {
132
  $question = $quiz->get_viewing_question();
133
 
134
  if ( $question ) {
135
- $course = LP_Global::course();
136
- $user = LP_Global::user();
137
  $answered = false;
138
  $course_data = $user->get_course_data( $course->get_id() );
139
  $user_quiz = $course_data->get_item_quiz( $quiz->get_id() );
@@ -284,10 +284,10 @@ add_filter( 'admin_bar_menu', 'learn_press_content_item_edit_links', 90 );
284
  static $output = array();
285
 
286
  if ( ! $output ) {
287
- $course = LP_Global::course();
288
 
289
  if ( $course && $course->get_id() ) {
290
- $user = LP_Global::user();
291
  $course_data = $user->get_course_data( $course->get_id() );
292
 
293
  if ( $course_data ) {
@@ -309,10 +309,10 @@ if ( ! function_exists( 'learn_press_single_quiz_args' ) ) {
309
  }
310
 
311
  $quiz = LP_Global::course_item_quiz();
312
- $course = LP_Global::course();
313
 
314
  if ( $quiz && $course ) {
315
- $user = LP_Global::user();
316
  $course_id = $course->get_id();
317
  $user_quiz = $user->get_item_data( $quiz->get_id(), $course_id );
318
 
@@ -1236,7 +1236,7 @@ function learn_press_get_course_redirect( $link ) {
1236
  * @param LP_Quiz $item
1237
  */
1238
  function learn_press_quiz_meta_final( $item ) {
1239
- $course = LP_Global::course();
1240
 
1241
  if ( ! $course->is_final_quiz( $item->get_id() ) ) {
1242
  return;
@@ -1332,7 +1332,7 @@ add_filter( 'body_class', 'learn_press_body_classes', 10 );
1332
  */
1333
  function learn_press_is_learning_course( $course_id = 0 ) {
1334
  $user = learn_press_get_current_user();
1335
- $course = $course_id ? learn_press_get_course( $course_id ) : LP_Global::course();
1336
  $is_learning = false;
1337
  $has_status = false;
1338
 
@@ -1360,8 +1360,8 @@ function learn_press_is_learning_course( $course_id = 0 ) {
1360
  */
1361
  if ( ! function_exists( 'learn_press_print_custom_styles' ) ) {
1362
  function learn_press_print_custom_styles() {
1363
- $primary_color = LP()->settings()->get( 'primary_color' );
1364
- $secondary_color = LP()->settings()->get( 'secondary_color' );
1365
  ?>
1366
 
1367
  <style id="learn-press-custom-css">
@@ -1485,7 +1485,7 @@ add_filter(
1485
  function ( $html, $item_id, $course_id ) {
1486
  $user = learn_press_get_current_user();
1487
 
1488
- $course_blocking = LP()->settings()->get( 'course_blocking' );
1489
  $course_data = $user->get_course_data( $course_id );
1490
  // $end_time = $course_data->get_end_time_gmt();3
1491
  // $expired_time = $course_data->get_expiration_time_gmt();
132
  $question = $quiz->get_viewing_question();
133
 
134
  if ( $question ) {
135
+ $course = learn_press_get_course();
136
+ $user = learn_press_get_current_user();
137
  $answered = false;
138
  $course_data = $user->get_course_data( $course->get_id() );
139
  $user_quiz = $course_data->get_item_quiz( $quiz->get_id() );
284
  static $output = array();
285
 
286
  if ( ! $output ) {
287
+ $course = learn_press_get_course();
288
 
289
  if ( $course && $course->get_id() ) {
290
+ $user = learn_press_get_current_user();
291
  $course_data = $user->get_course_data( $course->get_id() );
292
 
293
  if ( $course_data ) {
309
  }
310
 
311
  $quiz = LP_Global::course_item_quiz();
312
+ $course = learn_press_get_course();
313
 
314
  if ( $quiz && $course ) {
315
+ $user = learn_press_get_current_user();
316
  $course_id = $course->get_id();
317
  $user_quiz = $user->get_item_data( $quiz->get_id(), $course_id );
318
 
1236
  * @param LP_Quiz $item
1237
  */
1238
  function learn_press_quiz_meta_final( $item ) {
1239
+ $course = learn_press_get_course();
1240
 
1241
  if ( ! $course->is_final_quiz( $item->get_id() ) ) {
1242
  return;
1332
  */
1333
  function learn_press_is_learning_course( $course_id = 0 ) {
1334
  $user = learn_press_get_current_user();
1335
+ $course = learn_press_get_course( $course_id );
1336
  $is_learning = false;
1337
  $has_status = false;
1338
 
1360
  */
1361
  if ( ! function_exists( 'learn_press_print_custom_styles' ) ) {
1362
  function learn_press_print_custom_styles() {
1363
+ $primary_color = LP_Settings::instance()->get( 'primary_color' );
1364
+ $secondary_color = LP_Settings::instance()->get( 'secondary_color' );
1365
  ?>
1366
 
1367
  <style id="learn-press-custom-css">
1485
  function ( $html, $item_id, $course_id ) {
1486
  $user = learn_press_get_current_user();
1487
 
1488
+ $course_blocking = LP_Settings::instance()->get( 'course_blocking' );
1489
  $course_data = $user->get_course_data( $course_id );
1490
  // $end_time = $course_data->get_end_time_gmt();3
1491
  // $expired_time = $course_data->get_expiration_time_gmt();
inc/lp-webhooks.php CHANGED
@@ -61,7 +61,7 @@ function learn_press_process_web_hooks() {
61
  if ( ! empty( $_REQUEST[ $param ] ) ) {
62
  // $web_hooks_processed = true;
63
  $request_scheme = is_ssl() ? 'https://' : 'http://';
64
- $requested_web_hook_url = untrailingslashit( $request_scheme . $_SERVER['HTTP_HOST'] ) . $_SERVER['REQUEST_URI'];
65
  $parsed_requested_web_hook_url = parse_url( $requested_web_hook_url );
66
  $required_web_hook_url = add_query_arg( $param, '1', trailingslashit( get_home_url() /* SITE_URL */ ) );
67
  $parsed_required_web_hook_url = parse_url( $required_web_hook_url );
61
  if ( ! empty( $_REQUEST[ $param ] ) ) {
62
  // $web_hooks_processed = true;
63
  $request_scheme = is_ssl() ? 'https://' : 'http://';
64
+ $requested_web_hook_url = untrailingslashit( $request_scheme . esc_url( $_SERVER['HTTP_HOST'] ) ) . esc_url( $_SERVER['REQUEST_URI'] );
65
  $parsed_requested_web_hook_url = parse_url( $requested_web_hook_url );
66
  $required_web_hook_url = add_query_arg( $param, '1', trailingslashit( get_home_url() /* SITE_URL */ ) );
67
  $parsed_required_web_hook_url = parse_url( $required_web_hook_url );
inc/order/class-lp-order.php CHANGED
@@ -882,7 +882,7 @@ if ( ! class_exists( 'LP_Order' ) ) {
882
 
883
  $view_order_url = learn_press_get_endpoint_url( 'view-order', $this->get_id(), learn_press_get_page_link( 'profile' ) );
884
  $user = learn_press_get_current_user();
885
- $view_order_endpoint = LP()->settings->get( 'profile_endpoints.order-details' );
886
 
887
  if ( ! $view_order_endpoint ) {
888
  $view_order_endpoint = 'order-details';
@@ -921,11 +921,11 @@ if ( ! class_exists( 'LP_Order' ) ) {
921
  $url = false;
922
  if ( $this->has_status( 'pending' ) ) {
923
  $user = learn_press_get_current_user();
924
- $url = learn_press_user_profile_link( $user->get_id(), LP()->settings->get( 'profile_endpoints.profile-orders' ) );
925
  if ( ! $force ) {
926
- $url = add_query_arg( 'cancel-order', $this->get_id(), $url );
927
  } else {
928
- $url = add_query_arg( 'cancelled-order', $this->get_id(), $url );
929
  }
930
 
931
  $url = wp_nonce_url( $url, 'cancel-order', 'lp-nonce' );
882
 
883
  $view_order_url = learn_press_get_endpoint_url( 'view-order', $this->get_id(), learn_press_get_page_link( 'profile' ) );
884
  $user = learn_press_get_current_user();
885
+ $view_order_endpoint = LP_Settings::instance()->get( 'profile_endpoints.order-details' );
886
 
887
  if ( ! $view_order_endpoint ) {
888
  $view_order_endpoint = 'order-details';
921
  $url = false;
922
  if ( $this->has_status( 'pending' ) ) {
923
  $user = learn_press_get_current_user();
924
+ $url = learn_press_user_profile_link( $user->get_id(), LP_Settings::instance()->get( 'profile_endpoints.profile-orders' ) );
925
  if ( ! $force ) {
926
+ $url = esc_url( add_query_arg( 'cancel-order', $this->get_id(), $url ) );
927
  } else {
928
+ $url = esc_url( add_query_arg( 'cancelled-order', $this->get_id(), $url ) );
929
  }
930
 
931
  $url = wp_nonce_url( $url, 'cancel-order', 'lp-nonce' );
inc/order/lp-order-functions.php CHANGED
@@ -793,7 +793,7 @@ if ( ! function_exists( 'learn_press_cancel_order_process' ) ) {
793
  learn_press_add_message( sprintf( __( 'Order number <strong>%s</strong> can not be cancelled', 'learnpress' ), $order->get_order_number() ), 'error' );
794
  }
795
  if ( ! $url ) {
796
- $url = learn_press_user_profile_link( $user->get_id(), LP()->settings->get( 'profile_endpoints.profile-orders', 'orders' ) );
797
  }
798
  wp_safe_redirect( $url );
799
  exit();
793
  learn_press_add_message( sprintf( __( 'Order number <strong>%s</strong> can not be cancelled', 'learnpress' ), $order->get_order_number() ), 'error' );
794
  }
795
  if ( ! $url ) {
796
+ $url = learn_press_user_profile_link( $user->get_id(), LP_Settings::instance()->get( 'profile_endpoints.profile-orders', 'orders' ) );
797
  }
798
  wp_safe_redirect( $url );
799
  exit();
inc/question/class-lp-question.php CHANGED
@@ -685,7 +685,7 @@ if ( ! class_exists( 'LP_Question' ) ) {
685
  public function setup_data( $quiz_id, $course_id = 0, $user_id = 0 ) {
686
 
687
  $quiz = learn_press_get_quiz( $quiz_id );
688
- $course = $course_id ? learn_press_get_course( $course_id ) : LP_Global::course();
689
 
690
  if ( $user_id ) {
691
  $user = learn_press_get_user( $user_id );
@@ -696,7 +696,8 @@ if ( ! class_exists( 'LP_Question' ) ) {
696
  $show_correct = false;
697
 
698
  if ( $user && $quiz && $course ) {
699
- if ( $user_quiz = $user->get_quiz_data( $quiz->get_id(), $course->get_id() ) ) {
 
700
  $has_checked = $user->has_checked_answer( $this->get_id(), $quiz->get_id(), $course->get_id() );
701
  $show_correct = $user_quiz->is_completed() && ( $has_checked || $quiz->get_show_result() ) ? 'yes' : false;
702
  $answered = $user_quiz->get_question_answer( $this->get_id() );
685
  public function setup_data( $quiz_id, $course_id = 0, $user_id = 0 ) {
686
 
687
  $quiz = learn_press_get_quiz( $quiz_id );
688
+ $course = learn_press_get_course( $course_id );
689
 
690
  if ( $user_id ) {
691
  $user = learn_press_get_user( $user_id );
696
  $show_correct = false;
697
 
698
  if ( $user && $quiz && $course ) {
699
+ $user_quiz = $user->get_quiz_data( $quiz->get_id(), $course->get_id() );
700
+ if ( $user_quiz ) {
701
  $has_checked = $user->has_checked_answer( $this->get_id(), $quiz->get_id(), $course->get_id() );
702
  $show_correct = $user_quiz->is_completed() && ( $has_checked || $quiz->get_show_result() ) ? 'yes' : false;
703
  $answered = $user_quiz->get_question_answer( $this->get_id() );
inc/quiz/class-lp-quiz.php CHANGED
@@ -662,7 +662,11 @@ if ( ! class_exists( 'LP_Quiz' ) ) {
662
  * @return string
663
  */
664
  public function get_question_link( $question_id = null ) {
665
- $course = LP_Global::course();
 
 
 
 
666
  $permalink = $course->get_item_link( $this->get_id() );
667
  if ( '' != get_option( 'permalink_structure' ) && get_post_status( $this->get_id() ) != 'draft' ) {
668
  if ( get_post_type( $question_id ) === LP_QUESTION_CPT ) {
@@ -675,7 +679,7 @@ if ( ! class_exists( 'LP_Quiz' ) ) {
675
  }
676
  }
677
  } else {
678
- $permalink = add_query_arg( array( 'question', $question_id ), $permalink );
679
  }
680
 
681
  // @deprecated
662
  * @return string
663
  */
664
  public function get_question_link( $question_id = null ) {
665
+ $course = learn_press_get_course();
666
+ if ( ! $course ) {
667
+ return '';
668
+ }
669
+
670
  $permalink = $course->get_item_link( $this->get_id() );
671
  if ( '' != get_option( 'permalink_structure' ) && get_post_status( $this->get_id() ) != 'draft' ) {
672
  if ( get_post_type( $question_id ) === LP_QUESTION_CPT ) {
679
  }
680
  }
681
  } else {
682
+ $permalink = esc_url( add_query_arg( array( 'question', $question_id ), $permalink ) );
683
  }
684
 
685
  // @deprecated
inc/quiz/lp-quiz-functions.php CHANGED
@@ -391,7 +391,7 @@ function learn_press_is_review_questions() {
391
  $user = learn_press_get_current_user();
392
 
393
  if ( $item && $user ) {
394
- $course = LP_Global::course();
395
 
396
  if ( ! $course ) {
397
  return false;
391
  $user = learn_press_get_current_user();
392
 
393
  if ( $item && $user ) {
394
+ $course = learn_press_get_course();
395
 
396
  if ( ! $course ) {
397
  return false;
inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php CHANGED
@@ -46,7 +46,7 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
46
  ),
47
  'archive-course' => array(
48
  array(
49
- 'methods' => WP_REST_Server::READABLE,
50
  'callback' => array( $this, 'list_courses' ),
51
  'permission_callback' => '__return_true',
52
  'args' => [],
@@ -115,8 +115,8 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
115
  $filter = new LP_Course_Filter();
116
  $filter->page = absint( $request['paged'] ?? 1 );
117
  $filter->post_title = LP_Helper::sanitize_params_submitted( $request['c_search'] ?? '' );
118
- $fields_str = LP_Helper::sanitize_params_submitted( urldecode( $request['c_fields'] ) ?? '' );
119
- $fields_exclude_str = LP_Helper::sanitize_params_submitted( urldecode( $request['c_exclude_fields'] ) ?? '' );
120
  if ( ! empty( $fields_str ) ) {
121
  $fields = explode( ',', $fields_str );
122
  $filter->fields = $fields;
@@ -144,7 +144,7 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
144
 
145
  $filter->order_by = LP_Helper::sanitize_params_submitted( ! empty( $request['order_by'] ) ? $request['order_by'] : 'post_date' );
146
  $filter->order = LP_Helper::sanitize_params_submitted( ! empty( $request['order'] ) ? $request['order'] : 'DESC' );
147
- $filter->limit = LP_Settings::get_option( 'archive_course_limit', 10 );
148
  $return_type = $request['return_type'] ?? 'html';
149
  if ( 'json' !== $return_type ) {
150
  $filter->only_fields = array( 'DISTINCT(ID) AS ID' );
@@ -162,6 +162,8 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
162
  // For return data has html
163
  if ( $courses ) {
164
  global $wp, $post;
 
 
165
  $archive_link = get_post_type_archive_link( LP_COURSE_CPT );
166
 
167
  if ( isset( $term_link ) && ! is_wp_error( $term_link ) ) {
@@ -171,25 +173,55 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
171
  $base = esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) );
172
  $base = str_replace( home_url( $wp->request ) . '/', $archive_link, $base );
173
 
174
- $response->data->pagination = learn_press_get_template_content(
175
- 'loop/course/pagination.php',
176
- array(
177
- 'total' => $total_pages,
178
- 'paged' => $filter->page,
179
- 'base' => $base,
180
- )
181
- );
 
 
 
 
 
 
 
 
182
 
 
183
  ob_start();
 
 
 
 
 
 
 
 
 
 
 
184
 
185
  // Todo: tungnx - should rewrite call template
186
  foreach ( $courses as $course ) {
187
  $post = get_post( $course->ID );
188
  setup_postdata( $post );
189
- learn_press_get_template_part( 'content', 'course' );
 
 
 
 
 
 
 
 
 
190
  }
191
 
192
  wp_reset_postdata();
 
193
  } else {
194
  LP()->template( 'course' )->no_courses_found();
195
  }
@@ -608,7 +640,7 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
608
  throw new Exception( __( 'Invalid course', 'learnpress' ) );
609
  }
610
 
611
- $user = LP_Global::user();
612
 
613
  // if ( ! is_user_logged_in() ) {
614
  // throw new Exception( esc_html__( 'Please login!', 'learnpress' ) );
@@ -658,7 +690,7 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
658
  * @return WP_REST_Response
659
  */
660
  public function get_items( $request ) {
661
- $settings = LP()->settings();
662
  $response = array(
663
  'result' => $settings->get(),
664
  );
@@ -672,7 +704,7 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
672
  * @return WP_REST_Response
673
  */
674
  public function get_item( $request ) {
675
- $settings = LP()->settings();
676
  $response = array(
677
  'result' => $settings->get( $request['key'] ),
678
  );
@@ -687,7 +719,7 @@ class LP_REST_Courses_Controller extends LP_Abstract_REST_Controller {
687
  */
688
  public function update_item( $request ) {
689
  $response = array();
690
- $settings = LP()->settings();
691
  $option = $settings->get( $request['key'] );
692
 
693
  $settings->update( $request['key'], $request['data'] );
46
  ),
47
  'archive-course' => array(
48
  array(
49
+ 'methods' => WP_REST_Server::ALLMETHODS,
50
  'callback' => array( $this, 'list_courses' ),
51
  'permission_callback' => '__return_true',
52
  'args' => [],
115
  $filter = new LP_Course_Filter();
116
  $filter->page = absint( $request['paged'] ?? 1 );
117
  $filter->post_title = LP_Helper::sanitize_params_submitted( $request['c_search'] ?? '' );
118
+ $fields_str = LP_Helper::sanitize_params_submitted( urldecode( $request['c_fields'] ?? '' ) );
119
+ $fields_exclude_str = LP_Helper::sanitize_params_submitted( urldecode( $request['c_exclude_fields'] ?? '' ) );
120
  if ( ! empty( $fields_str ) ) {
121
  $fields = explode( ',', $fields_str );
122
  $filter->fields = $fields;
144
 
145
  $filter->order_by = LP_Helper::sanitize_params_submitted( ! empty( $request['order_by'] ) ? $request['order_by'] : 'post_date' );
146
  $filter->order = LP_Helper::sanitize_params_submitted( ! empty( $request['order'] ) ? $request['order'] : 'DESC' );
147
+ $filter->limit = $request['limit'] ?? LP_Settings::get_option( 'archive_course_limit', 10 );
148
  $return_type = $request['return_type'] ?? 'html';
149
  if ( 'json' !== $return_type ) {
150
  $filter->only_fields = array( 'DISTINCT(ID) AS ID' );
162
  // For return data has html
163
  if ( $courses ) {
164
  global $wp, $post;
165
+
166
+ // Pagination
167
  $archive_link = get_post_type_archive_link( LP_COURSE_CPT );
168
 
169
  if ( isset( $term_link ) && ! is_wp_error( $term_link ) ) {
173
  $base = esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) );
174
  $base = str_replace( home_url( $wp->request ) . '/', $archive_link, $base );
175
 
176
+ $template_pagination_path = $request['template_pagination_path'] ?? '';
177
+ if ( ! isset( $request['no_pagination'] ) ) {
178
+ if ( ! empty( $template_pagination_path ) ) {
179
+ $response->data->pagination = include $template_pagination_path;
180
+ } else {
181
+ $response->data->pagination = learn_press_get_template_content(
182
+ 'loop/course/pagination.php',
183
+ array(
184
+ 'total' => $total_pages,
185
+ 'paged' => $filter->page,
186
+ 'base' => $base,
187
+ )
188
+ );
189
+ }
190
+ }
191
+ // End Pagination
192
 
193
+ // Content items
194
  ob_start();
195
+ $is_custom_template = false;
196
+ $template_path = $request['template_path'] ?? '';
197
+ $args_custom = [];
198
+ if ( ! empty( $request['template_path'] ) ) {
199
+ if ( isset( $request['args_custom'] ) ) {
200
+ $args_custom = json_decode( $request['args_custom'], true );
201
+ }
202
+
203
+ $template_path = urldecode( $request['template_path'] );
204
+ $is_custom_template = true;
205
+ }
206
 
207
  // Todo: tungnx - should rewrite call template
208
  foreach ( $courses as $course ) {
209
  $post = get_post( $course->ID );
210
  setup_postdata( $post );
211
+
212
+ if ( $is_custom_template ) {
213
+ if ( $args_custom ) {
214
+ extract( $args_custom );
215
+ }
216
+
217
+ include $template_path;
218
+ } else {
219
+ learn_press_get_template_part( 'content', 'course' );
220
+ }
221
  }
222
 
223
  wp_reset_postdata();
224
+ // End content items
225
  } else {
226
  LP()->template( 'course' )->no_courses_found();
227
  }
640
  throw new Exception( __( 'Invalid course', 'learnpress' ) );
641
  }
642
 
643
+ $user = learn_press_get_current_user();
644
 
645
  // if ( ! is_user_logged_in() ) {
646
  // throw new Exception( esc_html__( 'Please login!', 'learnpress' ) );
690
  * @return WP_REST_Response
691
  */
692
  public function get_items( $request ) {
693
+ $settings = LP_Settings::instance();
694
  $response = array(
695
  'result' => $settings->get(),
696
  );
704
  * @return WP_REST_Response
705
  */
706
  public function get_item( $request ) {
707
+ $settings = LP_Settings::instance();
708
  $response = array(
709
  'result' => $settings->get( $request['key'] ),
710
  );
719
  */
720
  public function update_item( $request ) {
721
  $response = array();
722
+ $settings = LP_Settings::instance();
723
  $option = $settings->get( $request['key'] );
724
 
725
  $settings->update( $request['key'], $request['data'] );
inc/rest-api/v1/frontend/class-lp-rest-lazy-load-controller.php CHANGED
@@ -160,7 +160,7 @@ class LP_REST_Lazy_Load_Controller extends LP_Abstract_REST_Controller {
160
  $content = '';
161
 
162
  $course_id = absint( $params['courseId'] ?? 0 );
163
- $per_page = LP()->settings()->get( 'section_per_page', 2 );
164
  $page = absint( $params['page'] ?? 1 );
165
  $order = wp_unslash( $params['order'] ?? 'ASC' );
166
  $search = wp_unslash( $params['search'] ?? '' );
@@ -243,7 +243,7 @@ class LP_REST_Lazy_Load_Controller extends LP_Abstract_REST_Controller {
243
  $params = $request->get_params();
244
 
245
  $section_id = absint( $params['sectionId'] ?? 0 );
246
- $per_page = LP()->settings()->get( 'course_item_per_page', 5 );
247
  $page = absint( $params['page'] ?? 1 );
248
  $order = LP_Helper::sanitize_params_submitted( $params['order'] ?? 'ASC' );
249
  $search = LP_Helper::sanitize_params_submitted( $params['search'] ?? '' );
160
  $content = '';
161
 
162
  $course_id = absint( $params['courseId'] ?? 0 );
163
+ $per_page = LP_Settings::instance()->get( 'section_per_page', 2 );
164
  $page = absint( $params['page'] ?? 1 );
165
  $order = wp_unslash( $params['order'] ?? 'ASC' );
166
  $search = wp_unslash( $params['search'] ?? '' );
243
  $params = $request->get_params();
244
 
245
  $section_id = absint( $params['sectionId'] ?? 0 );
246
+ $per_page = LP_Settings::instance()->get( 'course_item_per_page', 5 );
247
  $page = absint( $params['page'] ?? 1 );
248
  $order = LP_Helper::sanitize_params_submitted( $params['order'] ?? 'ASC' );
249
  $search = LP_Helper::sanitize_params_submitted( $params['search'] ?? '' );
inc/rest-api/v1/frontend/class-lp-rest-settings-controller.php CHANGED
@@ -57,7 +57,7 @@ class LP_REST_Settings_Controller extends LP_Abstract_REST_Controller {
57
  * @return WP_REST_Response
58
  */
59
  public function get_items( $request ) {
60
- $settings = LP()->settings();
61
  $response = array(
62
  'result' => $settings->get(),
63
  );
@@ -71,7 +71,7 @@ class LP_REST_Settings_Controller extends LP_Abstract_REST_Controller {
71
  * @return WP_REST_Response
72
  */
73
  public function get_item( $request ) {
74
- $settings = LP()->settings();
75
  $response = array(
76
  'result' => $settings->get( $request['key'] ),
77
  );
@@ -86,7 +86,7 @@ class LP_REST_Settings_Controller extends LP_Abstract_REST_Controller {
86
  */
87
  public function update_item( $request ) {
88
  $response = array();
89
- $settings = LP()->settings();
90
  $option = $settings->get( $request['key'] );
91
 
92
  $settings->update( $request['key'], $request['data'] );
57
  * @return WP_REST_Response
58
  */
59
  public function get_items( $request ) {
60
+ $settings = LP_Settings::instance();
61
  $response = array(
62
  'result' => $settings->get(),
63
  );
71
  * @return WP_REST_Response
72
  */
73
  public function get_item( $request ) {
74
+ $settings = LP_Settings::instance();
75
  $response = array(
76
  'result' => $settings->get( $request['key'] ),
77
  );
86
  */
87
  public function update_item( $request ) {
88
  $response = array();
89
+ $settings = LP_Settings::instance();
90
  $option = $settings->get( $request['key'] );
91
 
92
  $settings->update( $request['key'], $request['data'] );
inc/rest-api/v1/frontend/class-lp-rest-users-controller.php CHANGED
@@ -655,7 +655,7 @@ class LP_REST_Users_Controller extends LP_Abstract_REST_Controller {
655
  * @return WP_REST_Response
656
  */
657
  public function get_items( $request ) {
658
- $settings = LP()->settings();
659
  $response = array(
660
  'result' => $settings->get(),
661
  );
@@ -669,7 +669,7 @@ class LP_REST_Users_Controller extends LP_Abstract_REST_Controller {
669
  * @return WP_REST_Response
670
  */
671
  public function get_item( $request ) {
672
- $settings = LP()->settings();
673
  $response = array(
674
  'result' => $settings->get( $request['key'] ),
675
  );
@@ -684,7 +684,7 @@ class LP_REST_Users_Controller extends LP_Abstract_REST_Controller {
684
  */
685
  public function update_item( $request ) {
686
  $response = array();
687
- $settings = LP()->settings();
688
  $option = $settings->get( $request['key'] );
689
 
690
  $settings->update( $request['key'], $request['data'] );
655
  * @return WP_REST_Response
656
  */
657
  public function get_items( $request ) {
658
+ $settings = LP_Settings::instance();
659
  $response = array(
660
  'result' => $settings->get(),
661
  );
669
  * @return WP_REST_Response
670
  */
671
  public function get_item( $request ) {
672
+ $settings = LP_Settings::instance();
673
  $response = array(
674
  'result' => $settings->get( $request['key'] ),
675
  );
684
  */
685
  public function update_item( $request ) {
686
  $response = array();
687
+ $settings = LP_Settings::instance();
688
  $option = $settings->get( $request['key'] );
689
 
690
  $settings->update( $request['key'], $request['data'] );
inc/settings/abstract-settings-page.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class LP_Abstract_Settings_Page
4
+ *
5
+ * @author ThimPress
6
+ * @package LearnPress/Classes
7
+ * @version 1.0
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit;
11
+
12
+ class LP_Abstract_Settings_Page extends LP_Abstract_Settings {
13
+
14
+ /**
15
+ * Tab's ID
16
+ *
17
+ * @var string
18
+ */
19
+ public $id = '';
20
+
21
+ /**
22
+ * Tab's text
23
+ *
24
+ * @var string
25
+ */
26
+ public $text = '';
27
+
28
+ /**
29
+ * Constructor
30
+ */
31
+ public function __construct() {
32
+ parent::__construct();
33
+ }
34
+
35
+ /**
36
+ * Display admin page in LP4.
37
+ *
38
+ * @param string $section
39
+ * @param string $tab
40
+ * @version 4.0.0
41
+ */
42
+ public function admin_page_settings( $section = null, $tab = '' ) {
43
+ $settings = $this->get_settings( $section, $tab );
44
+ $settings = $this->sanitize_settings( $settings );
45
+
46
+ do_action( 'learn-press/settings-render' );
47
+
48
+ if ( $settings ) {
49
+ LP_Meta_Box_Helper::output_fields( $settings );
50
+ } else {
51
+ echo esc_html__( 'No setting available.', 'learnpress' );
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Save option in LP4.
57
+ *
58
+ * @param string $section
59
+ * @param string $tab
60
+ * @version 4.0.0
61
+ */
62
+ public function save_settings( $section = null, $tab = '' ) {
63
+ $settings = apply_filters( 'learn-press/admin/get-settings/admin-options-' . $section, $this->get_settings( $section, $tab ) );
64
+ $settings = $this->sanitize_settings( $settings );
65
+
66
+ if ( $settings ) {
67
+ LP_Meta_Box_Helper::save_fields( $settings );
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Get name for field
73
+ *
74
+ * @param $name
75
+ *
76
+ * @return mixed
77
+ */
78
+ public function get_field_name( $name ) {
79
+ $field_name = apply_filters( 'learn_press_settings_field_name_' . $name, "learn_press_{$name}" );
80
+
81
+ return $field_name;
82
+ }
83
+
84
+ /**
85
+ * Get ID for field
86
+ *
87
+ * @param $name
88
+ *
89
+ * @return mixed
90
+ */
91
+ public function get_field_id( $name ) {
92
+ return preg_replace( array( '!\[|(\]\[)!', '!\]!' ), array( '_', '' ), $this->get_field_name( $name ) );
93
+ }
94
+
95
+ public function get_sections() {
96
+ return array();
97
+ }
98
+
99
+ /**
100
+ * @param string $section
101
+ * @param string $tab
102
+ *
103
+ * @return bool|mixed
104
+ */
105
+ public function get_settings( $section = '', $tab = '' ) {
106
+ if ( ! $section ) {
107
+ $section = $this->get_sections();
108
+ $section = array_keys( $section );
109
+ }
110
+
111
+ settype( $section, 'array' );
112
+
113
+ $return = array();
114
+
115
+ foreach ( $section as $sec ) {
116
+ if ( is_callable( array( $this, 'get_settings_' . $sec ) ) ) {
117
+ $settings = call_user_func( array( $this, 'get_settings_' . $sec ) );
118
+
119
+ if ( $settings ) {
120
+ $return = array_merge( $return, $settings );
121
+ }
122
+ }
123
+ }
124
+
125
+ return $return;
126
+ }
127
+ }
inc/settings/class-lp-settings-courses.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use LP\Helpers\Config;
4
+
5
+ /**
6
+ * Class LP_Settings_Courses
7
+ *
8
+ * @author ThimPress <email@email.com>
9
+ */
10
+ class LP_Settings_Courses extends LP_Abstract_Settings_Page {
11
+ /**
12
+ * LP_Settings_Courses constructor.
13
+ */
14
+ public function __construct() {
15
+ $this->id = 'courses';
16
+ $this->text = esc_html__( 'Courses', 'learnpress' );
17
+
18
+ parent::__construct();
19
+ }
20
+
21
+ public function save() {
22
+ $course_permalink = LP_Helper::sanitize_params_submitted( $_POST['learn_press_course_base'] ?? '' );
23
+
24
+ if ( ! $course_permalink ) {
25
+ return;
26
+ }
27
+
28
+ if ( $course_permalink == 'custom' ) {
29
+ $course_permalink = trim( $_POST['course_permalink_structure'], '/' );
30
+
31
+ if ( '%course_category%' == $course_permalink ) {
32
+ $course_permalink = _x( 'courses', 'slug', 'learnpress' ) . '/' . $course_permalink;
33
+ }
34
+
35
+ $course_permalink = '/' . $course_permalink;
36
+ update_option( 'learn_press_course_base_type', 'custom' );
37
+
38
+ } else {
39
+ delete_option( 'learn_press_course_base_type' );
40
+ }
41
+
42
+ $course_base = untrailingslashit( $course_permalink );
43
+
44
+ update_option( 'learn_press_course_base', $course_base );
45
+ $courses_page_id = learn_press_get_page_id( 'courses' );
46
+ $courses_permalink = ( $courses_page_id > 0 && get_post( $courses_page_id ) ) ? get_page_uri( $courses_page_id ) : _x( 'courses', 'default-slug', 'learnpress' );
47
+
48
+ if ( $courses_page_id && trim( $course_base, '/' ) === $courses_permalink ) {
49
+ update_option( 'learn_press_use_verbose_page_rules', 'yes' );
50
+ } else {
51
+ delete_option( 'learn_press_use_verbose_page_rules' );
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Get config settings courses.
57
+ *
58
+ * @param string $section
59
+ * @param string $tab
60
+ *
61
+ * @return array
62
+ */
63
+ public function get_settings( $section = null, $tab = null ): array {
64
+ return Config::instance()->get( 'course', 'settings' );
65
+ }
66
+
67
+ /**
68
+ * Get option enable load courses with ajax.
69
+ *
70
+ * @return bool
71
+ */
72
+ public static function is_ajax_load_courses(): bool {
73
+ return LP_Settings::get_option( 'courses_load_ajax', 'yes' ) === 'yes';
74
+ }
75
+
76
+ /**
77
+ * Get option enable courses archive ajax.
78
+ *
79
+ * @return bool
80
+ */
81
+ public static function is_no_load_ajax_first_courses(): bool {
82
+ return self::is_ajax_load_courses() && LP_Settings::get_option( 'courses_first_no_ajax', 'no' ) === 'yes';
83
+ }
84
+ }
inc/templates/class-lp-template-course.php CHANGED
@@ -38,8 +38,8 @@ class LP_Template_Course extends LP_Abstract_Template {
38
  }
39
 
40
  public function course_graduation() {
41
- $user = LP_Global::user();
42
- $course = LP_Global::course();
43
 
44
  if ( ! $user || ! $course ) {
45
  return;
@@ -60,8 +60,8 @@ class LP_Template_Course extends LP_Abstract_Template {
60
  * @throws Exception
61
  */
62
  public function button_retry() {
63
- $user = LP_Global::user();
64
- $course = LP_Global::course();
65
 
66
  if ( ! $user || ! $course ) {
67
  return;
@@ -94,8 +94,8 @@ class LP_Template_Course extends LP_Abstract_Template {
94
  */
95
  /*
96
  public function loop_item_user_progress() {
97
- $course = LP_Global::course();
98
- $user = LP_Global::user();
99
 
100
  if ( ! $user || ! $course ) {
101
  return;
@@ -196,8 +196,8 @@ class LP_Template_Course extends LP_Abstract_Template {
196
  */
197
  public function course_purchase_button() {
198
  $can_show = true;
199
- $course = LP_Global::course();
200
- $user = LP_Global::user();
201
 
202
  try {
203
  if ( ! $user || ! $course ) {
@@ -246,8 +246,8 @@ class LP_Template_Course extends LP_Abstract_Template {
246
  */
247
  public function course_enroll_button() {
248
  $can_show = true;
249
- $user = LP_Global::user();
250
- $course = LP_Global::course();
251
 
252
  try {
253
  if ( ! $course || ! $user ) {
@@ -390,8 +390,8 @@ class LP_Template_Course extends LP_Abstract_Template {
390
  */
391
  public function course_continue_button() {
392
  $can_show = true;
393
- $user = LP_Global::user();
394
- $course = LP_Global::course();
395
 
396
  try {
397
  if ( ! $user || ! $course ) {
@@ -498,7 +498,7 @@ class LP_Template_Course extends LP_Abstract_Template {
498
  }*/
499
 
500
  public function course_finish_button() {
501
- $user = LP_Global::user();
502
  $course = learn_press_get_course();
503
 
504
  if ( ! $course ) {
@@ -533,8 +533,8 @@ class LP_Template_Course extends LP_Abstract_Template {
533
  * @modify 4.1.3
534
  */
535
  public function course_external_button() {
536
- $course = LP_Global::course();
537
- $user = LP_Global::user();
538
 
539
  if ( ! $course ) {
540
  return;
@@ -557,8 +557,8 @@ class LP_Template_Course extends LP_Abstract_Template {
557
  }
558
 
559
  public function popup_header() {
560
- $user = LP_Global::user();
561
- $course = LP_Global::course();
562
 
563
  if ( ! $user || ! $course ) {
564
  return;
@@ -595,7 +595,11 @@ class LP_Template_Course extends LP_Abstract_Template {
595
  }
596
 
597
  public function popup_footer_nav() {
598
- $course = LP_Global::course();
 
 
 
 
599
  $next_item = $prev_item = false;
600
 
601
  $next_id = $course->get_next_item();
@@ -746,11 +750,11 @@ class LP_Template_Course extends LP_Abstract_Template {
746
  /*
747
  public function remaining_time() {
748
 
749
- if ( ! $course = LP_Global::course() ) {
750
  return;
751
  }
752
 
753
- if ( ! $user = LP_Global::user() ) {
754
  return;
755
  }
756
 
@@ -810,8 +814,8 @@ class LP_Template_Course extends LP_Abstract_Template {
810
  * Get template button complete lesson
811
  */
812
  public function item_lesson_complete_button() {
813
- $user = LP_Global::user();
814
- $course = LP_Global::course();
815
  $item = LP_Global::course_item();
816
 
817
  if ( ! $user || ! $course || ! $user->is_course_in_progress( $course->get_id() ) ) {
@@ -836,7 +840,7 @@ class LP_Template_Course extends LP_Abstract_Template {
836
  public function lesson_comment_form() {
837
  global $post;
838
 
839
- if ( ! $course = LP_Global::course() ) {
840
  return;
841
  }
842
 
@@ -965,7 +969,7 @@ class LP_Template_Course extends LP_Abstract_Template {
965
  return;
966
  }
967
 
968
- $user = LP_Global::user();
969
 
970
  if ( ! $user ) {
971
  return;
@@ -1021,7 +1025,7 @@ class LP_Template_Course extends LP_Abstract_Template {
1021
  public function course_item_comments() {
1022
  global $post;
1023
 
1024
- if ( ! $course = LP_Global::course() ) {
1025
  return;
1026
  }
1027
 
@@ -1060,7 +1064,7 @@ class LP_Template_Course extends LP_Abstract_Template {
1060
  * @throws Exception
1061
  */
1062
  public function user_time() {
1063
- $user = LP_Global::user();
1064
 
1065
  if ( ! $user ) {
1066
  return;
@@ -1103,8 +1107,8 @@ class LP_Template_Course extends LP_Abstract_Template {
1103
  return;
1104
  }
1105
 
1106
- $course = LP_Global::course();
1107
- $user = LP_Global::user();
1108
 
1109
  if ( ! $course ) {
1110
  return;
@@ -1135,7 +1139,7 @@ class LP_Template_Course extends LP_Abstract_Template {
1135
 
1136
  public function course_extra_boxes_position_control() {
1137
  $course = LP_Course::get_course( get_the_ID() );
1138
- $user = LP_Global::user();
1139
 
1140
  if ( ! $user || ! $course ) {
1141
  return;
38
  }
39
 
40
  public function course_graduation() {
41
+ $user = learn_press_get_current_user();
42
+ $course = learn_press_get_course();
43
 
44
  if ( ! $user || ! $course ) {
45
  return;
60
  * @throws Exception
61
  */
62
  public function button_retry() {
63
+ $user = learn_press_get_current_user();
64
+ $course = learn_press_get_course();
65
 
66
  if ( ! $user || ! $course ) {
67
  return;
94
  */
95
  /*
96
  public function loop_item_user_progress() {
97
+ $course = learn_press_get_course();
98
+ $user = learn_press_get_current_user();
99
 
100
  if ( ! $user || ! $course ) {
101
  return;
196
  */
197
  public function course_purchase_button() {
198
  $can_show = true;
199
+ $course = learn_press_get_course();
200
+ $user = learn_press_get_current_user();
201
 
202
  try {
203
  if ( ! $user || ! $course ) {
246
  */
247
  public function course_enroll_button() {
248
  $can_show = true;
249
+ $user = learn_press_get_current_user();
250
+ $course = learn_press_get_course();
251
 
252
  try {
253
  if ( ! $course || ! $user ) {
390
  */
391
  public function course_continue_button() {
392
  $can_show = true;
393
+ $user = learn_press_get_current_user();
394
+ $course = learn_press_get_course();
395
 
396
  try {
397
  if ( ! $user || ! $course ) {
498
  }*/
499
 
500
  public function course_finish_button() {
501
+ $user = learn_press_get_current_user();
502
  $course = learn_press_get_course();
503
 
504
  if ( ! $course ) {
533
  * @modify 4.1.3
534
  */
535
  public function course_external_button() {
536
+ $course = learn_press_get_course();
537
+ $user = learn_press_get_current_user();
538
 
539
  if ( ! $course ) {
540
  return;
557
  }
558
 
559
  public function popup_header() {
560
+ $user = learn_press_get_current_user();
561
+ $course = learn_press_get_course();
562
 
563
  if ( ! $user || ! $course ) {
564
  return;
595
  }
596
 
597
  public function popup_footer_nav() {
598
+ $course = learn_press_get_course();
599
+ if ( ! $course ) {
600
+ return;
601
+ }
602
+
603
  $next_item = $prev_item = false;
604
 
605
  $next_id = $course->get_next_item();
750
  /*
751
  public function remaining_time() {
752
 
753
+ if ( ! $course = learn_press_get_course() ) {
754
  return;
755
  }
756
 
757
+ if ( ! $user = learn_press_get_current_user() ) {
758
  return;
759
  }
760
 
814
  * Get template button complete lesson
815
  */
816
  public function item_lesson_complete_button() {
817
+ $user = learn_press_get_current_user();
818
+ $course = learn_press_get_course();
819
  $item = LP_Global::course_item();
820
 
821
  if ( ! $user || ! $course || ! $user->is_course_in_progress( $course->get_id() ) ) {
840
  public function lesson_comment_form() {
841
  global $post;
842
 
843
+ if ( ! $course = learn_press_get_course() ) {
844
  return;
845
  }
846
 
969
  return;
970
  }
971
 
972
+ $user = learn_press_get_current_user();
973
 
974
  if ( ! $user ) {
975
  return;
1025
  public function course_item_comments() {
1026
  global $post;
1027
 
1028
+ if ( ! $course = learn_press_get_course() ) {
1029
  return;
1030
  }
1031
 
1064
  * @throws Exception
1065
  */
1066
  public function user_time() {
1067
+ $user = learn_press_get_current_user();
1068
 
1069
  if ( ! $user ) {
1070
  return;
1107
  return;
1108
  }
1109
 
1110
+ $course = learn_press_get_course();
1111
+ $user = learn_press_get_current_user();
1112
 
1113
  if ( ! $course ) {
1114
  return;
1139
 
1140
  public function course_extra_boxes_position_control() {
1141
  $course = LP_Course::get_course( get_the_ID() );
1142
+ $user = learn_press_get_current_user();
1143
 
1144
  if ( ! $user || ! $course ) {
1145
  return;
inc/templates/class-lp-template-profile.php CHANGED
@@ -271,7 +271,7 @@ class LP_Template_Profile extends LP_Abstract_Template {
271
  return;
272
  }
273
 
274
- if ( 'yes' === LP()->settings()->get( 'enable_login_profile' ) || 'yes' === LP()->settings()->get( 'enable_register_profile' ) ) {
275
  return;
276
  }
277
 
@@ -285,7 +285,7 @@ class LP_Template_Profile extends LP_Abstract_Template {
285
  return;
286
  }
287
 
288
- if ( 'yes' !== LP()->settings()->get( 'enable_login_profile' ) ) {
289
  return;
290
  }
291
 
@@ -299,7 +299,7 @@ class LP_Template_Profile extends LP_Abstract_Template {
299
  return;
300
  }
301
 
302
- if ( 'yes' !== LP()->settings()->get( 'enable_register_profile' ) || ! get_option( 'users_can_register' ) ) {
303
  return;
304
  }
305
 
271
  return;
272
  }
273
 
274
+ if ( 'yes' === LP_Settings::instance()->get( 'enable_login_profile' ) || 'yes' === LP_Settings::instance()->get( 'enable_register_profile' ) ) {
275
  return;
276
  }
277
 
285
  return;
286
  }
287
 
288
+ if ( 'yes' !== LP_Settings::instance()->get( 'enable_login_profile' ) ) {
289
  return;
290
  }
291
 
299
  return;
300
  }
301
 
302
+ if ( 'yes' !== LP_Settings::instance()->get( 'enable_register_profile' ) || ! get_option( 'users_can_register' ) ) {
303
  return;
304
  }
305
 
inc/user-item/class-lp-user-item-quiz.php CHANGED
@@ -509,7 +509,7 @@ class LP_User_Item_Quiz extends LP_User_Item {
509
  $result['question_count'] = count( $question_ids );
510
  $result['time_spend'] = $this->get_time_interval( 'display' );
511
  $result['passing_grade'] = $quiz->get_passing_grade();
512
- $checked_questions = $this->get_checked_questions();
513
 
514
  foreach ( $question_ids as $question_id ) {
515
  $question = LP_Question::get_question( $question_id );
509
  $result['question_count'] = count( $question_ids );
510
  $result['time_spend'] = $this->get_time_interval( 'display' );
511
  $result['passing_grade'] = $quiz->get_passing_grade();
512
+ $checked_questions = $this->get_checked_questions();
513
 
514
  foreach ( $question_ids as $question_id ) {
515
  $question = LP_Question::get_question( $question_id );
inc/user/class-lp-profile-tabs.php CHANGED
@@ -235,7 +235,7 @@ class LP_Profile_Tabs extends LP_Array_Access {
235
  if ( get_option( 'permalink_structure' ) ) {
236
  $url = trailingslashit( $profile_link . join( '/', array_values( $args ) ) );
237
  } else {
238
- $url = add_query_arg( $args, $profile_link );
239
  }
240
  } else {
241
  $url = get_author_posts_url( $user->get_id() );
@@ -293,7 +293,7 @@ class LP_Profile_Tabs extends LP_Array_Access {
293
 
294
  if ( is_array( $args ) && $args ) {
295
  if ( ! $with_permalink ) {
296
- $url = add_query_arg( $args, $url );
297
  } else {
298
  $parts = array();
299
 
235
  if ( get_option( 'permalink_structure' ) ) {
236
  $url = trailingslashit( $profile_link . join( '/', array_values( $args ) ) );
237
  } else {
238
+ $url = esc_url( add_query_arg( $args, $profile_link ) );
239
  }
240
  } else {
241
  $url = get_author_posts_url( $user->get_id() );
293
 
294
  if ( is_array( $args ) && $args ) {
295
  if ( ! $with_permalink ) {
296
+ $url = esc_url( add_query_arg( $args, $url ) );
297
  } else {
298
  $parts = array();
299
 
inc/user/class-lp-profile.php CHANGED
@@ -238,7 +238,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
238
  */
239
  public function get_tabs() {
240
  if ( $this->_tabs === null ) {
241
- $settings = LP()->settings();
242
  $course_sections = array();
243
 
244
  $this->_default_settings = array(
@@ -343,7 +343,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
343
  update_option( 'learn_press_profile_avatar', 'yes' );
344
  }
345
 
346
- $setting_avatar = LP()->settings()->get( 'profile_endpoints.settings-avatar' );
347
 
348
  if ( ! $setting_avatar ) {
349
  $profile_endpoints['settings-basic-information'] = 'basic-information';
@@ -354,7 +354,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
354
  add_rewrite_rule( '(.?.+?)/avatar(/(.*))?/?$', 'index.php?pagename=$matches[1]&section=avatar', 'top' );
355
  }
356
 
357
- return LP()->settings()->get( 'profile_avatar' ) === 'yes';
358
  }
359
 
360
  /**
@@ -713,7 +713,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
713
  $query['pagination'] = learn_press_paging_nav(
714
  array(
715
  'num_pages' => $query['num_pages'],
716
- 'base' => learn_press_user_profile_link( $this->get_user_data( 'id' ), LP()->settings->get( 'profile_endpoints.profile-orders' ) ),
717
  'format' => $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( '%#%', '' ) : '?paged=%#%',
718
  'echo' => false,
719
  'paged' => $args['paged'],
@@ -934,16 +934,18 @@ if ( ! class_exists( 'LP_Profile' ) ) {
934
  public function logout_url( $redirect = false ) {
935
  if ( $this->enable_login() ) {
936
  $profile_url = learn_press_get_page_link( 'profile' );
937
- $url = add_query_arg(
938
- array(
939
- 'lp-logout' => 'true',
940
- 'nonce' => wp_create_nonce( 'lp-logout' ),
941
- ),
942
- untrailingslashit( $profile_url )
 
 
943
  );
944
 
945
  if ( $redirect !== false ) {
946
- $url = add_query_arg( 'redirect', urlencode( $redirect ), $url );
947
  }
948
  } else {
949
  $url = wp_logout_url( $redirect !== false ? $redirect : $this->get_current_url() );
@@ -1016,7 +1018,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
1016
  * @return bool
1017
  */
1018
  public function enable_login() {
1019
- return 'yes' === LP()->settings()->get( 'enable_login_profile' );
1020
  }
1021
 
1022
  /**
@@ -1025,7 +1027,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
1025
  * @return bool
1026
  */
1027
  public function enable_register() {
1028
- return 'yes' === LP()->settings()->get( 'enable_register_profile' );
1029
  }
1030
 
1031
  /**
238
  */
239
  public function get_tabs() {
240
  if ( $this->_tabs === null ) {
241
+ $settings = LP_Settings::instance();
242
  $course_sections = array();
243
 
244
  $this->_default_settings = array(
343
  update_option( 'learn_press_profile_avatar', 'yes' );
344
  }
345
 
346
+ $setting_avatar = LP_Settings::instance()->get( 'profile_endpoints.settings-avatar' );
347
 
348
  if ( ! $setting_avatar ) {
349
  $profile_endpoints['settings-basic-information'] = 'basic-information';
354
  add_rewrite_rule( '(.?.+?)/avatar(/(.*))?/?$', 'index.php?pagename=$matches[1]&section=avatar', 'top' );
355
  }
356
 
357
+ return LP_Settings::instance()->get( 'profile_avatar' ) === 'yes';
358
  }
359
 
360
  /**
713
  $query['pagination'] = learn_press_paging_nav(
714
  array(
715
  'num_pages' => $query['num_pages'],
716
+ 'base' => learn_press_user_profile_link( $this->get_user_data( 'id' ), LP_Settings::instance()->get( 'profile_endpoints.profile-orders' ) ),
717
  'format' => $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( '%#%', '' ) : '?paged=%#%',
718
  'echo' => false,
719
  'paged' => $args['paged'],
934
  public function logout_url( $redirect = false ) {
935
  if ( $this->enable_login() ) {
936
  $profile_url = learn_press_get_page_link( 'profile' );
937
+ $url = esc_url(
938
+ add_query_arg(
939
+ array(
940
+ 'lp-logout' => 'true',
941
+ 'nonce' => wp_create_nonce( 'lp-logout' ),
942
+ ),
943
+ untrailingslashit( $profile_url )
944
+ )
945
  );
946
 
947
  if ( $redirect !== false ) {
948
+ $url = esc_url( add_query_arg( 'redirect', urlencode( $redirect ), $url ) );
949
  }
950
  } else {
951
  $url = wp_logout_url( $redirect !== false ? $redirect : $this->get_current_url() );
1018
  * @return bool
1019
  */
1020
  public function enable_login() {
1021
+ return 'yes' === LP_Settings::instance()->get( 'enable_login_profile' );
1022
  }
1023
 
1024
  /**
1027
  * @return bool
1028
  */
1029
  public function enable_register() {
1030
+ return 'yes' === LP_Settings::instance()->get( 'enable_register_profile' );
1031
  }
1032
 
1033
  /**
inc/user/class-lp-user.php CHANGED
@@ -537,7 +537,7 @@ class LP_User extends LP_Abstract_User {
537
  LP_QUIZ_HAS_STARTED_OR_COMPLETED
538
  );
539
  }
540
- $user = LP_Global::user();
541
 
542
  if ( $user->is_guest() ) {
543
  // if course required enroll => print message "You have to login for starting quiz"
537
  LP_QUIZ_HAS_STARTED_OR_COMPLETED
538
  );
539
  }
540
+ $user = learn_press_get_current_user();
541
 
542
  if ( $user->is_guest() ) {
543
  // if course required enroll => print message "You have to login for starting quiz"
inc/user/lp-user-functions.php CHANGED
@@ -305,7 +305,7 @@ function learn_press_user_has_roles( $roles, $user_id = null ) {
305
  function learn_press_current_user_can_view_profile_section( $section, $user ) {
306
  $current_user = wp_get_current_user();
307
  $view = true;
308
- if ( $user->get_data( 'user_login' ) != $current_user->user_login && $section == LP()->settings->get(
309
  'profile_endpoints.profile-orders',
310
  'profile-orders'
311
  ) ) {
@@ -363,7 +363,7 @@ function learn_press_get_profile_user() {
363
  * Add instructor registration button to register page and admin bar
364
  */
365
  function learn_press_user_become_teacher_registration_form() {
366
- if ( LP()->settings->get( 'instructor_registration' ) != 'yes' ) {
367
  return;
368
  }
369
  ?>
@@ -893,7 +893,7 @@ add_action( 'learn_press_before_purchase_course_handler', '_learn_press_before_p
893
  function _learn_press_before_purchase_course_handler( $course_id, $cart ) {
894
  // Redirect to login page if user is not logged in
895
  if ( ! is_user_logged_in() ) {
896
- $return_url = add_query_arg( $_POST, get_the_permalink( $course_id ) );
897
  $return_url = apply_filters( 'learn_press_purchase_course_login_redirect_return_url', $return_url );
898
  $redirect = apply_filters(
899
  'learn_press_purchase_course_login_redirect',
@@ -959,8 +959,9 @@ function learn_press_profile_tab_edit_content( $current, $tab, $user ) {
959
  }
960
 
961
  function learn_press_get_profile_endpoints() {
962
- $endpoints = (array) LP()->settings->get( 'profile_endpoints' );
963
- if ( $tabs = LP_Profile::instance()->get_tabs() ) {
 
964
  foreach ( $tabs as $slug => $info ) {
965
  if ( empty( $endpoints[ $slug ] ) ) {
966
  $endpoints[ $slug ] = $slug;
@@ -1405,7 +1406,7 @@ function learn_press_user_profile_link( $user_id = 0, $tab = null ) {
1405
  if ( get_option( 'permalink_structure' ) /*&& learn_press_get_page_id( 'profile' )*/ ) {
1406
  $url = trailingslashit( $profile_link . join( '/', array_values( $args ) ) );
1407
  } else {
1408
- $url = add_query_arg( $args, $profile_link );
1409
  }
1410
  } else {
1411
  $url = get_author_posts_url( $user_id );
@@ -1967,7 +1968,7 @@ function learn_press_social_profiles() {
1967
  }
1968
 
1969
  function lp_add_default_fields( $fields ) {
1970
- $first_name = LP()->settings()->get( 'enable_register_first_name' );
1971
 
1972
  if ( $first_name === 'yes' ) {
1973
  ?>
@@ -1980,7 +1981,7 @@ function lp_add_default_fields( $fields ) {
1980
  <?php
1981
  }
1982
 
1983
- $last_name = LP()->settings()->get( 'enable_register_last_name' );
1984
 
1985
  if ( $last_name === 'yes' ) {
1986
  ?>
@@ -1993,7 +1994,7 @@ function lp_add_default_fields( $fields ) {
1993
  <?php
1994
  }
1995
 
1996
- $display_name = LP()->settings()->get( 'enable_register_display_name' );
1997
 
1998
  if ( $display_name === 'yes' ) {
1999
  ?>
@@ -2011,7 +2012,7 @@ add_filter( 'learn-press/after-form-register-fields', 'lp_add_default_fields' );
2011
 
2012
  function lp_custom_register_fields_display() {
2013
  ?>
2014
- <?php $custom_fields = LP()->settings()->get( 'register_profile_fields' ); ?>
2015
 
2016
  <?php if ( $custom_fields ) : ?>
2017
  <?php foreach ( $custom_fields as $custom_field ) : ?>
@@ -2111,7 +2112,7 @@ function lp_get_user_custom_register_fields( $user_id = 0 ) {
2111
  }
2112
 
2113
  function lp_get_user_custom_fields() {
2114
- $custom_fields = LP()->settings()->get( 'register_profile_fields' );
2115
 
2116
  $output = array();
2117
 
@@ -2242,32 +2243,3 @@ function learnpress_get_count_by_user( $user_id = '', $post_type = 'lp_course' )
2242
  );
2243
 
2244
  }
2245
-
2246
- /*
2247
- add_action(
2248
- 'admin_init',
2249
- function() {
2250
- $custom_fields = LP()->settings()->get( 'register_profile_fields' );
2251
-
2252
- $custom_fields = LP_Helper::sanitize_params_submitted( $custom_fields );
2253
-
2254
- if ( ! empty( $custom_fields ) ) {
2255
- $output = array();
2256
-
2257
- foreach ( $custom_fields as $key => $field ) {
2258
- if ( ! isset( $field['id'] ) ) {
2259
- $output[ $key ] = array(
2260
- 'id' => $field['name'],
2261
- 'name' => $field['name'] ?? '',
2262
- 'type' => $field['type'] ?? '',
2263
- 'required' => $field['required'] ?? '',
2264
- );
2265
- } else {
2266
- $output[ $key ] = $field;
2267
- }
2268
- }
2269
-
2270
- update_option( 'learn_press_register_profile_fields', $output );
2271
- }
2272
- }
2273
- );*/
305
  function learn_press_current_user_can_view_profile_section( $section, $user ) {
306
  $current_user = wp_get_current_user();
307
  $view = true;
308
+ if ( $user->get_data( 'user_login' ) != $current_user->user_login && $section == LP_Settings::instance()->get(
309
  'profile_endpoints.profile-orders',
310
  'profile-orders'
311
  ) ) {
363
  * Add instructor registration button to register page and admin bar
364
  */
365
  function learn_press_user_become_teacher_registration_form() {
366
+ if ( LP_Settings::instance()->get( 'instructor_registration' ) != 'yes' ) {
367
  return;
368
  }
369
  ?>
893
  function _learn_press_before_purchase_course_handler( $course_id, $cart ) {
894
  // Redirect to login page if user is not logged in
895
  if ( ! is_user_logged_in() ) {
896
+ $return_url = esc_url( add_query_arg( $_POST, get_the_permalink( $course_id ) ) );
897
  $return_url = apply_filters( 'learn_press_purchase_course_login_redirect_return_url', $return_url );
898
  $redirect = apply_filters(
899
  'learn_press_purchase_course_login_redirect',
959
  }
960
 
961
  function learn_press_get_profile_endpoints() {
962
+ $endpoints = (array) LP_Settings::instance()->get( 'profile_endpoints' );
963
+ $tabs = LP_Profile::instance()->get_tabs();
964
+ if ( $tabs ) {
965
  foreach ( $tabs as $slug => $info ) {
966
  if ( empty( $endpoints[ $slug ] ) ) {
967
  $endpoints[ $slug ] = $slug;
1406
  if ( get_option( 'permalink_structure' ) /*&& learn_press_get_page_id( 'profile' )*/ ) {
1407
  $url = trailingslashit( $profile_link . join( '/', array_values( $args ) ) );
1408
  } else {
1409
+ $url = esc_url( add_query_arg( $args, $profile_link ) );
1410
  }
1411
  } else {
1412
  $url = get_author_posts_url( $user_id );
1968
  }
1969
 
1970
  function lp_add_default_fields( $fields ) {
1971
+ $first_name = LP_Settings::instance()->get( 'enable_register_first_name' );
1972
 
1973
  if ( $first_name === 'yes' ) {
1974
  ?>
1981
  <?php
1982
  }
1983
 
1984
+ $last_name = LP_Settings::instance()->get( 'enable_register_last_name' );
1985
 
1986
  if ( $last_name === 'yes' ) {
1987
  ?>
1994
  <?php
1995
  }
1996
 
1997
+ $display_name = LP_Settings::instance()->get( 'enable_register_display_name' );
1998
 
1999
  if ( $display_name === 'yes' ) {
2000
  ?>
2012
 
2013
  function lp_custom_register_fields_display() {
2014
  ?>
2015
+ <?php $custom_fields = LP_Settings::instance()->get( 'register_profile_fields' ); ?>
2016
 
2017
  <?php if ( $custom_fields ) : ?>
2018
  <?php foreach ( $custom_fields as $custom_field ) : ?>
2112
  }
2113
 
2114
  function lp_get_user_custom_fields() {
2115
+ $custom_fields = LP_Settings::instance()->get( 'register_profile_fields' );
2116
 
2117
  $output = array();
2118
 
2243
  );
2244
 
2245
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/learnpress.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the LearnPress plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: LearnPress 4.1.6.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/lp-doing\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-05-05T05:09:25+03:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: learnpress\n"
@@ -40,6 +40,155 @@ msgstr ""
40
  msgid "http://thimpress.com"
41
  msgstr ""
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  #: config/settings/general.php:13
44
  msgid "Pages setup"
45
  msgstr ""
@@ -75,8 +224,8 @@ msgstr ""
75
  #: config/settings/general.php:57
76
  #: config/settings/general.php:62
77
  #: inc/admin/views/setup/setup-paypal.php:28
78
- #: inc/admin/views/setup/steps/currency.php:17
79
- #: inc/admin/views/setup/steps/currency.php:21
80
  msgid "Currency"
81
  msgstr ""
82
 
@@ -85,7 +234,7 @@ msgid "Setting up your currency unit and its formatting."
85
  msgstr ""
86
 
87
  #: config/settings/general.php:70
88
- #: inc/admin/views/setup/steps/currency.php:37
89
  msgid "Currency position"
90
  msgstr ""
91
 
@@ -144,7 +293,7 @@ msgid "Enable the option in all registration forms."
144
  msgstr ""
145
 
146
  #: inc/abstract-settings.php:89
147
- #: inc/admin/settings/abstract-settings-page.php:51
148
  msgid "No setting available."
149
  msgstr ""
150
 
@@ -164,47 +313,47 @@ msgstr ""
164
  msgid "The following these functions %1$s do not exists in %2$s"
165
  msgstr ""
166
 
167
- #: inc/admin/class-lp-admin-ajax.php:438
168
  msgid "Ops! ID not found"
169
  msgstr ""
170
 
171
- #: inc/admin/class-lp-admin-ajax.php:481
172
  msgid "Duplicate post fail, please try again"
173
  msgstr ""
174
 
175
- #: inc/admin/class-lp-admin-ajax.php:648
176
  msgid "Access denied"
177
  msgstr ""
178
 
179
- #: inc/admin/class-lp-admin-ajax.php:654
180
  msgid "Check nonce failed"
181
  msgstr ""
182
 
183
- #: inc/admin/class-lp-admin-ajax.php:660
184
- #: inc/admin/class-lp-admin-ajax.php:711
185
  #: templates/order/order-details.php:15
186
  msgid "Invalid order"
187
  msgstr ""
188
 
189
- #: inc/admin/class-lp-admin-ajax.php:705
190
  msgid "Permission denied"
191
  msgstr ""
192
 
193
- #: inc/admin/class-lp-admin-ajax.php:947
194
- #: inc/admin/class-lp-admin-ajax.php:1139
195
  msgid "Edit Page"
196
  msgstr ""
197
 
198
- #: inc/admin/class-lp-admin-ajax.php:948
199
- #: inc/admin/class-lp-admin-ajax.php:1141
200
  msgid "View Page"
201
  msgstr ""
202
 
203
- #: inc/admin/class-lp-admin-ajax.php:950
204
  msgid "Error! Page creation failed. Please try again."
205
  msgstr ""
206
 
207
- #: inc/admin/class-lp-admin-ajax.php:953
208
  msgid "Empty page name!"
209
  msgstr ""
210
 
@@ -286,8 +435,8 @@ msgstr ""
286
  #: inc/admin/class-lp-admin.php:249
287
  #: inc/admin/views/meta-boxes/fields/date.php:35
288
  #: inc/class-lp-assets.php:73
289
- #: inc/lp-core-functions.php:2171
290
- #: inc/lp-core-functions.php:3198
291
  #: inc/order/class-lp-order.php:954
292
  #: assets/js/dist/frontend/quiz.min.js:44
293
  msgid "Cancel"
@@ -330,14 +479,14 @@ msgstr ""
330
 
331
  #: inc/admin/class-lp-admin.php:312
332
  #: inc/admin/lp-admin-actions.php:217
333
- #: inc/admin/settings/class-lp-settings-courses.php:13
334
  #: inc/admin/settings/class-lp-settings-profile.php:150
335
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:21
336
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:28
337
- #: inc/class-lp-page-controller.php:262
338
  #: inc/custom-post-types/course.php:107
339
  #: inc/custom-post-types/course.php:109
340
  #: inc/lp-template-functions.php:370
 
341
  #: inc/user/class-lp-profile.php:246
342
  #: inc/user/class-lp-profile.php:597
343
  msgid "Courses"
@@ -425,17 +574,17 @@ msgstr ""
425
  #: inc/admin/views/meta-boxes/quiz/assigned.php:28
426
  #: inc/admin/views/meta-boxes/quiz/assigned.php:37
427
  #: inc/admin/views/user/courses.php:20
428
- #: inc/custom-post-types/abstract.php:749
429
- #: inc/custom-post-types/abstract.php:970
430
- #: inc/custom-post-types/abstract.php:979
431
  #: inc/custom-post-types/question.php:366
432
  #: inc/order/class-lp-order.php:946
433
  msgid "View"
434
  msgstr ""
435
 
436
  #: inc/admin/class-lp-install-sample-data.php:193
437
- #: inc/attributes/course.php:243
438
- #: inc/custom-post-types/abstract.php:747
439
  #: inc/custom-post-types/question.php:364
440
  #: templates/content-lesson/content.php:20
441
  #: assets/js/dist/frontend/quiz.min.js:87
@@ -486,13 +635,13 @@ msgstr ""
486
 
487
  #: inc/admin/class-lp-modal-search-items.php:183
488
  #: inc/admin/class-lp-modal-search-users.php:141
489
- #: inc/lp-core-functions.php:803
490
  msgid "<"
491
  msgstr ""
492
 
493
  #: inc/admin/class-lp-modal-search-items.php:184
494
  #: inc/admin/class-lp-modal-search-users.php:142
495
- #: inc/lp-core-functions.php:804
496
  msgid ">"
497
  msgstr ""
498
 
@@ -572,7 +721,7 @@ msgstr ""
572
 
573
  #: inc/admin/class-lp-plugin-install-list-table.php:490
574
  #: inc/class-lp-datetime.php:209
575
- #: inc/custom-post-types/order.php:753
576
  #: inc/order/class-lp-order.php:150
577
  #: inc/user-item/class-lp-user-item.php:240
578
  msgid "%s ago"
@@ -727,7 +876,7 @@ msgid "Buy Now"
727
  msgstr ""
728
 
729
  #: inc/admin/lp-admin-actions.php:222
730
- #: inc/custom-post-types/course.php:555
731
  msgid "Categories"
732
  msgstr ""
733
 
@@ -740,19 +889,6 @@ msgctxt "copy course"
740
  msgid "Duplicate"
741
  msgstr ""
742
 
743
- #: inc/admin/lp-admin-functions.php:57
744
- #: inc/admin/meta-box/fields/course-permalink.php:27
745
- #: inc/admin/settings/class-lp-settings-advanced.php:65
746
- #: inc/admin/settings/class-lp-settings-courses.php:171
747
- #: inc/admin/views/statistics/orders.php:48
748
- #: inc/admin/views/user/courses.php:39
749
- #: inc/custom-post-types/abstract.php:720
750
- #: inc/custom-post-types/quiz.php:237
751
- #: templates/emails/order-items-table.php:85
752
- #: templates/order/order-details.php:25
753
- msgid "Course"
754
- msgstr ""
755
-
756
  #: inc/admin/lp-admin-functions.php:79
757
  msgctxt "copy quiz"
758
  msgid "Duplicate"
@@ -876,8 +1012,8 @@ msgstr ""
876
  #: inc/admin/views/statistics/orders.php:8
877
  #: inc/admin/views/statistics/users.php:8
878
  #: inc/admin/views/statistics/users.php:48
879
- #: inc/custom-post-types/course.php:534
880
- #: inc/custom-post-types/course.php:551
881
  msgid "Students"
882
  msgstr ""
883
 
@@ -946,7 +1082,7 @@ msgid "Quiz id %s does not exist."
946
  msgstr ""
947
 
948
  #: inc/admin/meta-box/fields/course-permalink.php:16
949
- #: inc/admin/settings/class-lp-settings-courses.php:43
950
  msgctxt "default-slug"
951
  msgid "courses"
952
  msgstr ""
@@ -1030,8 +1166,8 @@ msgstr ""
1030
  #: inc/admin/meta-box/fields/list-emails.php:7
1031
  #: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:40
1032
  #: inc/admin/views/meta-boxes/order/exports-invoice.php:80
1033
- #: inc/class-lp-checkout.php:303
1034
- #: inc/class-lp-checkout.php:311
1035
  #: inc/lp-deprecated.php:2275
1036
  #: templates/checkout/account-register.php:25
1037
  #: templates/global/become-teacher-form.php:35
@@ -1048,15 +1184,15 @@ msgstr ""
1048
  msgid "Description"
1049
  msgstr ""
1050
 
1051
- #: inc/admin/meta-box/fields/list-emails.php:49
1052
  msgid "Manage"
1053
  msgstr ""
1054
 
1055
- #: inc/admin/meta-box/fields/list-emails.php:56
1056
  msgid "Enable all"
1057
  msgstr ""
1058
 
1059
- #: inc/admin/meta-box/fields/list-emails.php:57
1060
  msgid "Disable all"
1061
  msgstr ""
1062
 
@@ -1066,7 +1202,7 @@ msgstr ""
1066
 
1067
  #: inc/admin/meta-box/fields/payment-order.php:10
1068
  #: inc/emails/class-lp-email.php:1029
1069
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:495
1070
  msgid "Enable/Disable"
1071
  msgstr ""
1072
 
@@ -1096,26 +1232,6 @@ msgstr ""
1096
  msgid "Enable gutenberg"
1097
  msgstr ""
1098
 
1099
- #: inc/admin/settings/class-lp-settings-advanced.php:72
1100
- #: inc/admin/settings/class-lp-settings-courses.php:177
1101
- #: inc/course/lp-course-functions.php:464
1102
- #: inc/custom-post-types/lesson.php:158
1103
- #: inc/lp-core-functions.php:418
1104
- #: inc/lp-template-functions.php:1067
1105
- msgid "Lesson"
1106
- msgstr ""
1107
-
1108
- #: inc/admin/settings/class-lp-settings-advanced.php:79
1109
- #: inc/admin/settings/class-lp-settings-courses.php:185
1110
- #: inc/course/lp-course-functions.php:465
1111
- #: inc/custom-post-types/question.php:320
1112
- #: inc/custom-post-types/quiz.php:87
1113
- #: inc/lp-core-functions.php:419
1114
- #: inc/lp-template-functions.php:1057
1115
- #: templates/profile/tabs/quizzes.php:54
1116
- msgid "Quiz"
1117
- msgstr ""
1118
-
1119
  #: inc/admin/settings/class-lp-settings-advanced.php:86
1120
  #: inc/custom-post-types/question.php:207
1121
  #: inc/custom-post-types/quiz.php:174
@@ -1147,112 +1263,6 @@ msgstr ""
1147
  msgid "Question navigation position is sticky, if not right below the quiz content"
1148
  msgstr ""
1149
 
1150
- #: inc/admin/settings/class-lp-settings-courses.php:29
1151
- #: inc/custom-post-types/course.php:120
1152
- msgctxt "slug"
1153
- msgid "courses"
1154
- msgstr ""
1155
-
1156
- #: inc/admin/settings/class-lp-settings-courses.php:62
1157
- msgid "The site will be redirected to the URL added after clicking finish course button."
1158
- msgstr ""
1159
-
1160
- #: inc/admin/settings/class-lp-settings-courses.php:63
1161
- msgid "Set blank, the site will be redirected to the single course page"
1162
- msgstr ""
1163
-
1164
- #: inc/admin/settings/class-lp-settings-courses.php:73
1165
- #: inc/admin/settings/class-lp-settings-emails.php:64
1166
- #: inc/admin/settings/class-lp-settings-general.php:16
1167
- #: inc/admin/settings/class-lp-settings-payments.php:53
1168
- #: inc/admin/settings/class-lp-settings-profile.php:59
1169
- #: inc/admin/sub-menus/class-lp-submenu-statistics.php:26
1170
- #: inc/admin/views/meta-boxes/course/settings.php:22
1171
- #: inc/user/class-lp-profile.php:279
1172
- msgid "General"
1173
- msgstr ""
1174
-
1175
- #: inc/admin/settings/class-lp-settings-courses.php:77
1176
- msgid "Review courses"
1177
- msgstr ""
1178
-
1179
- #: inc/admin/settings/class-lp-settings-courses.php:78
1180
- msgid "Courses created by instructors will be pending in review first."
1181
- msgstr ""
1182
-
1183
- #: inc/admin/settings/class-lp-settings-courses.php:84
1184
- msgid "Auto start"
1185
- msgstr ""
1186
-
1187
- #: inc/admin/settings/class-lp-settings-courses.php:88
1188
- msgid "Students will get started courses immediately after successfully purchased."
1189
- msgstr ""
1190
-
1191
- #: inc/admin/settings/class-lp-settings-courses.php:91
1192
- msgid "Enable confirmation popup finish course, complete item"
1193
- msgstr ""
1194
-
1195
- #: inc/admin/settings/class-lp-settings-courses.php:92
1196
- msgid "Show confirmation popup before finishing course or completing item."
1197
- msgstr ""
1198
-
1199
- #: inc/admin/settings/class-lp-settings-courses.php:98
1200
- msgid "Archive page layout"
1201
- msgstr ""
1202
-
1203
- #: inc/admin/settings/class-lp-settings-courses.php:99
1204
- msgid "Type display list course on Course Archive page"
1205
- msgstr ""
1206
-
1207
- #: inc/admin/settings/class-lp-settings-courses.php:106
1208
- msgid "Courses per page"
1209
- msgstr ""
1210
-
1211
- #: inc/admin/settings/class-lp-settings-courses.php:107
1212
- msgid "Number of courses displayed per page."
1213
- msgstr ""
1214
-
1215
- #: inc/admin/settings/class-lp-settings-courses.php:117
1216
- msgid "Thumbnail dimensions"
1217
- msgstr ""
1218
-
1219
- #: inc/admin/settings/class-lp-settings-courses.php:123
1220
- msgid "Redirect when finish course"
1221
- msgstr ""
1222
-
1223
- #: inc/admin/settings/class-lp-settings-courses.php:140
1224
- msgid "Curriculum Settings"
1225
- msgstr ""
1226
-
1227
- #: inc/admin/settings/class-lp-settings-courses.php:144
1228
- msgid "Section Per Page"
1229
- msgstr ""
1230
-
1231
- #: inc/admin/settings/class-lp-settings-courses.php:148
1232
- msgid "Number of sections displayed per page ( Enter -1 for display all sections)."
1233
- msgstr ""
1234
-
1235
- #: inc/admin/settings/class-lp-settings-courses.php:151
1236
- msgid "Course Item Per Page"
1237
- msgstr ""
1238
-
1239
- #: inc/admin/settings/class-lp-settings-courses.php:155
1240
- msgid "Number of course items displayed per page in section ( Enter -1 for display all course items)."
1241
- msgstr ""
1242
-
1243
- #: inc/admin/settings/class-lp-settings-courses.php:167
1244
- #: inc/admin/settings/class-lp-settings-profile.php:145
1245
- msgid "Permalinks"
1246
- msgstr ""
1247
-
1248
- #: inc/admin/settings/class-lp-settings-courses.php:193
1249
- msgid "Category base"
1250
- msgstr ""
1251
-
1252
- #: inc/admin/settings/class-lp-settings-courses.php:201
1253
- msgid "Tag base"
1254
- msgstr ""
1255
-
1256
  #: inc/admin/settings/class-lp-settings-emails.php:25
1257
  #: inc/admin/settings/class-lp-settings-emails.php:165
1258
  msgid "Emails"
@@ -1349,23 +1359,23 @@ msgid "Enable default fields"
1349
  msgstr ""
1350
 
1351
  #: inc/admin/settings/class-lp-settings-profile.php:89
1352
- #: inc/user/lp-user-functions.php:1975
1353
- #: inc/user/lp-user-functions.php:1977
1354
  #: templates/profile/tabs/settings/basic-information.php:33
1355
  msgid "First name"
1356
  msgstr ""
1357
 
1358
  #: inc/admin/settings/class-lp-settings-profile.php:96
1359
- #: inc/user/lp-user-functions.php:1988
1360
- #: inc/user/lp-user-functions.php:1990
1361
  #: templates/profile/tabs/settings/basic-information.php:39
1362
  msgid "Last name"
1363
  msgstr ""
1364
 
1365
  #: inc/admin/settings/class-lp-settings-profile.php:103
1366
  #: inc/admin/settings/class-lp-settings-profile.php:115
1367
- #: inc/user/lp-user-functions.php:2001
1368
- #: inc/user/lp-user-functions.php:2003
1369
  #: templates/profile/tabs/settings/basic-information.php:45
1370
  msgid "Display name"
1371
  msgstr ""
@@ -1435,9 +1445,9 @@ msgstr ""
1435
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:22
1436
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:29
1437
  #: inc/class-lp-gdpr.php:183
1438
- #: inc/custom-post-types/order.php:814
1439
- #: inc/custom-post-types/order.php:815
1440
- #: inc/custom-post-types/order.php:819
1441
  #: inc/user/class-lp-profile.php:260
1442
  msgid "Orders"
1443
  msgstr ""
@@ -1452,7 +1462,7 @@ msgstr ""
1452
  #: inc/admin/settings/class-lp-settings-profile.php:188
1453
  #: inc/admin/sub-menus/class-lp-submenu-settings.php:18
1454
  #: inc/user/class-lp-profile.php:274
1455
- #: learnpress.php:476
1456
  msgid "Settings"
1457
  msgstr ""
1458
 
@@ -1511,7 +1521,7 @@ msgid "Reset Password"
1511
  msgstr ""
1512
 
1513
  #: inc/admin/sub-menus/class-lp-submenu-addons.php:14
1514
- #: learnpress.php:478
1515
  msgid "Add-ons"
1516
  msgstr ""
1517
 
@@ -1746,7 +1756,7 @@ msgstr ""
1746
 
1747
  #: inc/admin/views/meta-boxes/course/assigned.php:29
1748
  #: inc/admin/views/meta-boxes/quiz/assigned.php:48
1749
- #: inc/custom-post-types/abstract.php:767
1750
  #: inc/custom-post-types/question.php:369
1751
  msgid "Not assigned yet"
1752
  msgstr ""
@@ -1769,8 +1779,8 @@ msgstr ""
1769
 
1770
  #: inc/admin/views/meta-boxes/course/settings.php:50
1771
  #: inc/admin/views/meta-boxes/course/settings.php:367
1772
- #: inc/custom-post-types/course.php:532
1773
- #: inc/custom-post-types/course.php:549
1774
  #: inc/custom-post-types/lesson.php:221
1775
  #: inc/custom-post-types/question.php:319
1776
  #: inc/custom-post-types/quiz.php:236
@@ -1782,8 +1792,8 @@ msgstr ""
1782
  #: inc/admin/views/meta-boxes/quiz/settings.php:17
1783
  #: inc/custom-post-types/lesson.php:227
1784
  #: inc/custom-post-types/quiz.php:239
1785
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1062
1786
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:483
1787
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:636
1788
  msgid "Duration"
1789
  msgstr ""
@@ -1962,7 +1972,7 @@ msgstr ""
1962
 
1963
  #: inc/admin/views/meta-boxes/course/settings.php:451
1964
  #: inc/templates/class-lp-template-course.php:301
1965
- #: inc/templates/class-lp-template-course.php:915
1966
  #: inc/widgets/course-extra.php:35
1967
  msgid "Requirements"
1968
  msgstr ""
@@ -1996,8 +2006,8 @@ msgstr ""
1996
 
1997
  #: inc/admin/views/meta-boxes/fields/extra-faq.php:41
1998
  #: inc/admin/views/meta-boxes/fields/extra-faq.php:61
1999
- #: inc/custom-post-types/course.php:533
2000
- #: inc/custom-post-types/course.php:550
2001
  #: inc/external-plugin/elementor/widgets/become-a-teacher.php:26
2002
  #: inc/external-plugin/elementor/widgets/list-courses.php:32
2003
  msgid "Content"
@@ -2023,12 +2033,12 @@ msgid "Lesson Settings"
2023
  msgstr ""
2024
 
2025
  #: inc/admin/views/meta-boxes/lesson/settings.php:29
2026
- #: inc/custom-post-types/abstract.php:991
2027
  #: inc/custom-post-types/lesson.php:130
2028
  #: inc/custom-post-types/lesson.php:230
2029
  #: inc/lp-template-functions.php:1070
2030
  #: templates/loop/single-course/loop-section-item.php:31
2031
- #: templates/single-course/section/item-meta.php:28
2032
  msgid "Preview"
2033
  msgstr ""
2034
 
@@ -2071,8 +2081,8 @@ msgstr ""
2071
 
2072
  #: inc/admin/views/meta-boxes/order/child-order.php:23
2073
  #: inc/class-lp-gdpr.php:453
2074
- #: inc/custom-post-types/order.php:662
2075
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1302
2076
  #: templates/emails/order-items-table.php:72
2077
  #: templates/emails/plain/order-items-table.php:58
2078
  #: templates/profile/tabs/orders/list.php:31
@@ -2093,7 +2103,7 @@ msgstr ""
2093
  #: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:71
2094
  #: inc/admin/views/meta-boxes/order/details.php:153
2095
  #: inc/custom-post-types/course.php:79
2096
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:428
2097
  #: templates/checkout/order-received.php:60
2098
  msgid "Item"
2099
  msgstr ""
@@ -2119,9 +2129,9 @@ msgstr ""
2119
 
2120
  #: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:104
2121
  #: inc/admin/views/meta-boxes/order/details.php:156
2122
- #: inc/custom-post-types/order.php:661
2123
  #: templates/checkout/order-received.php:107
2124
- #: templates/checkout/review-order.php:99
2125
  #: templates/emails/order-items-table.php:118
2126
  #: templates/emails/plain/order-items-table.php:88
2127
  #: templates/order/order-details.php:26
@@ -2287,6 +2297,10 @@ msgstr ""
2287
  msgid "Quiz Settings"
2288
  msgstr ""
2289
 
 
 
 
 
2290
  #: inc/admin/views/meta-boxes/quiz/settings.php:30
2291
  msgid "The condition that must be achieved in order to be passed the quiz."
2292
  msgstr ""
@@ -2526,15 +2540,15 @@ msgstr ""
2526
  msgid "Test publish key"
2527
  msgstr ""
2528
 
2529
- #: inc/admin/views/setup/steps/currency.php:51
2530
  msgid "Thousands Separator"
2531
  msgstr ""
2532
 
2533
- #: inc/admin/views/setup/steps/currency.php:56
2534
  msgid "Decimals Separator"
2535
  msgstr ""
2536
 
2537
- #: inc/admin/views/setup/steps/currency.php:61
2538
  msgid "Number of Decimals"
2539
  msgstr ""
2540
 
@@ -2678,7 +2692,7 @@ msgid "Sale by"
2678
  msgstr ""
2679
 
2680
  #: inc/admin/views/statistics/orders.php:47
2681
- #: inc/custom-post-types/order.php:660
2682
  #: templates/checkout/order-received.php:94
2683
  #: templates/profile/tabs/orders/list.php:32
2684
  #: templates/profile/tabs/quizzes.php:57
@@ -2686,7 +2700,7 @@ msgid "Date"
2686
  msgstr ""
2687
 
2688
  #: inc/admin/views/statistics/orders.php:49
2689
- #: inc/custom-post-types/course.php:167
2690
  msgid "Course Category"
2691
  msgstr ""
2692
 
@@ -2761,12 +2775,12 @@ msgid "No courses."
2761
  msgstr ""
2762
 
2763
  #: inc/admin/views/user/courses.php:40
2764
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1308
2765
  msgid "Start time"
2766
  msgstr ""
2767
 
2768
  #: inc/admin/views/user/courses.php:41
2769
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1314
2770
  #: templates/profile/tabs/courses/course-list.php:25
2771
  msgid "End time"
2772
  msgstr ""
@@ -2791,9 +2805,9 @@ msgid "Unknown error"
2791
  msgstr ""
2792
 
2793
  #: inc/attributes/course.php:140
2794
- #: inc/attributes/course.php:306
2795
- #: inc/attributes/course.php:319
2796
  #: inc/attributes/course.php:321
 
2797
  msgid "Attributes"
2798
  msgstr ""
2799
 
@@ -2801,64 +2815,64 @@ msgstr ""
2801
  msgid "No terms found."
2802
  msgstr ""
2803
 
2804
- #: inc/attributes/course.php:242
2805
  msgid "Edit &#8220;%s&#8221;"
2806
  msgstr ""
2807
 
2808
- #: inc/attributes/course.php:249
2809
  msgid "Clear"
2810
  msgstr ""
2811
 
2812
- #: inc/attributes/course.php:264
2813
  msgid "Terms"
2814
  msgstr ""
2815
 
2816
- #: inc/attributes/course.php:317
2817
- #: inc/attributes/course.php:320
2818
  msgid "Attribute"
2819
  msgstr ""
2820
 
2821
- #: inc/attributes/course.php:322
2822
  msgid "Add New Attribute"
2823
  msgstr ""
2824
 
2825
- #: inc/attributes/course.php:323
2826
  msgid "All Attributes"
2827
  msgstr ""
2828
 
2829
- #: inc/attributes/course.php:369
2830
  msgid "Search Course %s"
2831
  msgstr ""
2832
 
2833
- #: inc/attributes/course.php:370
2834
  msgid "All Course %s"
2835
  msgstr ""
2836
 
2837
- #: inc/attributes/course.php:371
2838
  msgid "Parent Course %s"
2839
  msgstr ""
2840
 
2841
- #: inc/attributes/course.php:372
2842
  msgid "Parent Course %s:"
2843
  msgstr ""
2844
 
2845
- #: inc/attributes/course.php:373
2846
  msgid "Edit Course %s"
2847
  msgstr ""
2848
 
2849
- #: inc/attributes/course.php:374
2850
  msgid "Update Course %s"
2851
  msgstr ""
2852
 
2853
- #: inc/attributes/course.php:375
2854
  msgid "Add New Course %s"
2855
  msgstr ""
2856
 
2857
- #: inc/attributes/course.php:376
2858
  msgid "New Course %s"
2859
  msgstr ""
2860
 
2861
- #: inc/attributes/course.php:377
2862
  msgid "No &quot;Course %s&quot; found"
2863
  msgstr ""
2864
 
@@ -2943,33 +2957,33 @@ msgstr ""
2943
  msgid "Error! You cannot finish this course. Please contact your administrator for more information."
2944
  msgstr ""
2945
 
2946
- #: inc/class-lp-ajax.php:278
2947
  msgid "Error! Invalid lesson or failed security check."
2948
  msgstr ""
2949
 
2950
- #: inc/class-lp-ajax.php:289
2951
  msgid "Congrats! You have completed \"%s\"."
2952
  msgstr ""
2953
 
2954
  #: inc/class-lp-assets.php:72
2955
- #: inc/lp-core-functions.php:2170
2956
- #: inc/lp-core-functions.php:3197
2957
  #: assets/js/dist/frontend/quiz.min.js:41
2958
  msgid "OK"
2959
  msgstr ""
2960
 
2961
  #: inc/class-lp-assets.php:74
2962
  #: inc/class-lp-gdpr.php:464
2963
- #: inc/lp-core-functions.php:2172
2964
- #: inc/lp-core-functions.php:3199
2965
  #: templates/global/lp-modal-overlay.php:24
2966
  msgid "Yes"
2967
  msgstr ""
2968
 
2969
  #: inc/class-lp-assets.php:75
2970
  #: inc/class-lp-gdpr.php:464
2971
- #: inc/lp-core-functions.php:2173
2972
- #: inc/lp-core-functions.php:3200
2973
  #: templates/global/lp-modal-overlay.php:23
2974
  msgid "No"
2975
  msgstr ""
@@ -2987,7 +3001,7 @@ msgid "Redirecting"
2987
  msgstr ""
2988
 
2989
  #: inc/class-lp-assets.php:87
2990
- #: inc/class-lp-checkout.php:624
2991
  msgid "Invalid field"
2992
  msgstr ""
2993
 
@@ -3028,12 +3042,12 @@ msgstr ""
3028
  msgid "Page %d"
3029
  msgstr ""
3030
 
3031
- #: inc/class-lp-checkout.php:300
3032
  msgid "Your session has expired."
3033
  msgstr ""
3034
 
3035
- #: inc/class-lp-checkout.php:304
3036
- #: inc/class-lp-checkout.php:308
3037
  #: templates/checkout/account-register.php:28
3038
  #: templates/checkout/account-register.php:29
3039
  #: templates/global/form-register.php:32
@@ -3041,8 +3055,8 @@ msgstr ""
3041
  msgid "Username"
3042
  msgstr ""
3043
 
3044
- #: inc/class-lp-checkout.php:305
3045
- #: inc/class-lp-checkout.php:309
3046
  #: inc/user/class-lp-profile.php:286
3047
  #: templates/checkout/account-login.php:30
3048
  #: templates/checkout/account-login.php:31
@@ -3057,63 +3071,63 @@ msgstr ""
3057
  msgid "Password"
3058
  msgstr ""
3059
 
3060
- #: inc/class-lp-checkout.php:306
3061
  #: templates/checkout/account-register.php:36
3062
  #: templates/global/form-register.php:40
3063
  msgid "Confirm Password"
3064
  msgstr ""
3065
 
3066
- #: inc/class-lp-checkout.php:364
3067
- #: inc/class-lp-checkout.php:374
3068
- #: inc/class-lp-checkout.php:439
3069
  msgid "Error %d: Unable to create order. Please try again."
3070
  msgstr ""
3071
 
3072
- #: inc/class-lp-checkout.php:454
3073
  msgid "Unable to checkout. Order creation failed."
3074
  msgstr ""
3075
 
3076
- #: inc/class-lp-checkout.php:513
3077
- #: inc/class-lp-checkout.php:521
3078
- #: inc/class-lp-checkout.php:529
3079
- #: inc/class-lp-checkout.php:533
3080
- #: inc/class-lp-checkout.php:543
3081
- #: inc/class-lp-checkout.php:551
3082
- #: inc/class-lp-checkout.php:559
3083
  msgid "%s is required field."
3084
  msgstr ""
3085
 
3086
- #: inc/class-lp-checkout.php:515
3087
- #: inc/class-lp-checkout.php:523
3088
  msgid "%s is exists."
3089
  msgstr ""
3090
 
3091
- #: inc/class-lp-checkout.php:517
3092
  msgid "%s is not a valid username."
3093
  msgstr ""
3094
 
3095
- #: inc/class-lp-checkout.php:525
3096
  msgid "%s is not a valid email."
3097
  msgstr ""
3098
 
3099
- #: inc/class-lp-checkout.php:547
3100
  msgid "%s is not exists."
3101
  msgstr ""
3102
 
3103
- #: inc/class-lp-checkout.php:561
3104
  msgid "Your email is not a valid."
3105
  msgstr ""
3106
 
3107
- #: inc/class-lp-checkout.php:650
3108
  msgid "No payment method is selected"
3109
  msgstr ""
3110
 
3111
- #: inc/class-lp-checkout.php:684
3112
  #: templates/checkout/empty-cart.php:16
3113
  msgid "Your cart is currently empty."
3114
  msgstr ""
3115
 
3116
- #: inc/class-lp-checkout.php:693
3117
  msgid "Type item buy invalid!"
3118
  msgstr ""
3119
 
@@ -3326,18 +3340,18 @@ msgstr ""
3326
  msgid "Grade"
3327
  msgstr ""
3328
 
3329
- #: inc/class-lp-page-controller.php:151
3330
  #: inc/course/lp-course-functions.php:176
3331
  msgctxt "slug"
3332
  msgid "uncategorized"
3333
  msgstr ""
3334
 
3335
- #: inc/class-lp-page-controller.php:260
3336
  #: inc/lp-template-functions.php:368
3337
  msgid "Course Search Results"
3338
  msgstr ""
3339
 
3340
- #: inc/class-lp-page-controller.php:329
3341
  msgid "No payment method is available."
3342
  msgstr ""
3343
 
@@ -3444,12 +3458,12 @@ msgctxt "course item status title"
3444
  msgid "Unread"
3445
  msgstr ""
3446
 
3447
- #: inc/course/lp-course-functions.php:767
3448
  msgid "Edit this item"
3449
  msgstr ""
3450
 
3451
- #: inc/course/lp-course-functions.php:1009
3452
- #: inc/lp-core-functions.php:2574
3453
  #: inc/templates/class-lp-template-profile.php:103
3454
  #: inc/user-item/class-lp-user-item-quiz.php:147
3455
  #: inc/user-item/class-lp-user-item.php:816
@@ -3459,8 +3473,8 @@ msgstr ""
3459
  msgid "Passed"
3460
  msgstr ""
3461
 
3462
- #: inc/course/lp-course-functions.php:1012
3463
- #: inc/lp-core-functions.php:2577
3464
  #: inc/templates/class-lp-template-profile.php:104
3465
  #: inc/user-item/class-lp-user-item-quiz.php:148
3466
  #: inc/user-item/class-lp-user-item.php:817
@@ -3470,8 +3484,8 @@ msgstr ""
3470
  msgid "Failed"
3471
  msgstr ""
3472
 
3473
- #: inc/course/lp-course-functions.php:1015
3474
- #: inc/lp-core-functions.php:2580
3475
  #: inc/lp-deprecated.php:403
3476
  #: inc/templates/class-lp-template-profile.php:101
3477
  #: inc/user-item/class-lp-user-item-quiz.php:144
@@ -3482,27 +3496,27 @@ msgstr ""
3482
  msgid "In Progress"
3483
  msgstr ""
3484
 
3485
- #: inc/course/lp-course-functions.php:1095
3486
  msgid "lessons completed per total number of lessons."
3487
  msgstr ""
3488
 
3489
- #: inc/course/lp-course-functions.php:1098
3490
  msgid "quizzes passed per total number of quizzes."
3491
  msgstr ""
3492
 
3493
- #: inc/course/lp-course-functions.php:1101
3494
  msgid "Final Quiz"
3495
  msgstr ""
3496
 
3497
- #: inc/course/lp-course-functions.php:1104
3498
  msgid "correct answers per total number of questions."
3499
  msgstr ""
3500
 
3501
- #: inc/course/lp-course-functions.php:1107
3502
  msgid "score achieved per total score of the questions."
3503
  msgstr ""
3504
 
3505
- #: inc/course/lp-course-functions.php:1116
3506
  msgid "Require"
3507
  msgstr ""
3508
 
@@ -3640,68 +3654,68 @@ msgstr ""
3640
  msgid "Invalid quiz."
3641
  msgstr ""
3642
 
3643
- #: inc/custom-post-types/abstract.php:343
3644
  msgid "This item has already assigned to course. It will be removed from course if it is not published."
3645
  msgstr ""
3646
 
3647
- #: inc/custom-post-types/abstract.php:358
3648
  msgid "This question has already assigned to quiz. It will be removed from quiz if it is not published."
3649
  msgstr ""
3650
 
3651
- #: inc/custom-post-types/abstract.php:646
3652
  msgid "Unknown"
3653
  msgstr ""
3654
 
3655
- #: inc/custom-post-types/abstract.php:729
3656
  msgid "Course (%1$d %2$s)"
3657
  msgid_plural "Course (%1$d %2$s)"
3658
  msgstr[0] ""
3659
  msgstr[1] ""
3660
 
3661
- #: inc/custom-post-types/abstract.php:761
3662
  msgid "Remove Filter"
3663
  msgstr ""
3664
 
3665
- #: inc/custom-post-types/abstract.php:950
3666
- #: inc/custom-post-types/abstract.php:953
3667
  msgid "updated."
3668
  msgstr ""
3669
 
3670
- #: inc/custom-post-types/abstract.php:951
3671
  msgid "Custom field updated."
3672
  msgstr ""
3673
 
3674
- #: inc/custom-post-types/abstract.php:952
3675
  msgid "Custom field deleted."
3676
  msgstr ""
3677
 
3678
  #. translators: %s: date and time of the revision
3679
- #: inc/custom-post-types/abstract.php:955
3680
  msgid "Lesson restored to revision from %s"
3681
  msgstr ""
3682
 
3683
- #: inc/custom-post-types/abstract.php:956
3684
  msgid "published."
3685
  msgstr ""
3686
 
3687
- #: inc/custom-post-types/abstract.php:957
3688
  msgid "saved."
3689
  msgstr ""
3690
 
3691
- #: inc/custom-post-types/abstract.php:958
3692
  msgid "submitted."
3693
  msgstr ""
3694
 
3695
- #: inc/custom-post-types/abstract.php:960
3696
  msgid "scheduled for: <strong>%1$s</strong>."
3697
  msgstr ""
3698
 
3699
  #. translators: Publish box date format, see http://php.net/date
3700
- #: inc/custom-post-types/abstract.php:962
3701
  msgid "M j, Y @ G:i"
3702
  msgstr ""
3703
 
3704
- #: inc/custom-post-types/abstract.php:964
3705
  msgid "draft updated."
3706
  msgstr ""
3707
 
@@ -3761,7 +3775,7 @@ msgstr ""
3761
 
3762
  #: inc/custom-post-types/course.php:112
3763
  #: inc/custom-post-types/lesson.php:162
3764
- #: inc/custom-post-types/order.php:821
3765
  #: inc/custom-post-types/question.php:211
3766
  msgid "Add New"
3767
  msgstr ""
@@ -3786,113 +3800,119 @@ msgstr ""
3786
  msgid "No course found in Trash"
3787
  msgstr ""
3788
 
3789
- #: inc/custom-post-types/course.php:164
3790
- #: inc/custom-post-types/course.php:166
 
 
 
 
 
 
3791
  msgid "Course Categories"
3792
  msgstr ""
3793
 
3794
- #: inc/custom-post-types/course.php:168
3795
  #: templates/single-course/meta/category.php:15
3796
  msgid "Category"
3797
  msgstr ""
3798
 
3799
- #: inc/custom-post-types/course.php:169
3800
  msgid "Add New Course Category"
3801
  msgstr ""
3802
 
3803
- #: inc/custom-post-types/course.php:170
3804
  msgid "All Categories"
3805
  msgstr ""
3806
 
3807
- #: inc/custom-post-types/course.php:182
3808
  msgctxt "slug"
3809
  msgid "course-category"
3810
  msgstr ""
3811
 
3812
- #: inc/custom-post-types/course.php:196
3813
- #: inc/custom-post-types/course.php:210
3814
  msgid "Course Tags"
3815
  msgstr ""
3816
 
3817
- #: inc/custom-post-types/course.php:197
3818
  #: inc/custom-post-types/question.php:184
3819
  #: inc/custom-post-types/question.php:185
3820
  msgid "Tag"
3821
  msgstr ""
3822
 
3823
- #: inc/custom-post-types/course.php:198
3824
  msgid "Search Course Tags"
3825
  msgstr ""
3826
 
3827
- #: inc/custom-post-types/course.php:199
3828
  msgid "Popular Course Tags"
3829
  msgstr ""
3830
 
3831
- #: inc/custom-post-types/course.php:200
3832
  msgid "All Course Tags"
3833
  msgstr ""
3834
 
3835
- #: inc/custom-post-types/course.php:203
3836
  msgid "Edit Course Tag"
3837
  msgstr ""
3838
 
3839
- #: inc/custom-post-types/course.php:204
3840
  msgid "Update Course Tag"
3841
  msgstr ""
3842
 
3843
- #: inc/custom-post-types/course.php:205
3844
  msgid "Add New Course Tag"
3845
  msgstr ""
3846
 
3847
- #: inc/custom-post-types/course.php:206
3848
  msgid "New Course Tag Name"
3849
  msgstr ""
3850
 
3851
- #: inc/custom-post-types/course.php:207
3852
  msgid "Separate tags with commas"
3853
  msgstr ""
3854
 
3855
- #: inc/custom-post-types/course.php:208
3856
  msgid "Add or remove tags"
3857
  msgstr ""
3858
 
3859
- #: inc/custom-post-types/course.php:209
3860
  msgid "Choose from the most used tags"
3861
  msgstr ""
3862
 
3863
- #: inc/custom-post-types/course.php:220
3864
  msgctxt "slug"
3865
  msgid "course-tag"
3866
  msgstr ""
3867
 
3868
- #: inc/custom-post-types/course.php:535
3869
- #: inc/custom-post-types/course.php:552
3870
  #: templates/emails/order-items-table.php:87
3871
  msgid "Price"
3872
  msgstr ""
3873
 
3874
- #: inc/custom-post-types/course.php:541
3875
- #: inc/custom-post-types/course.php:544
3876
  msgid "Thumbnail"
3877
  msgstr ""
3878
 
3879
- #: inc/custom-post-types/course.php:586
3880
  msgid "<strong>%d</strong> section"
3881
  msgid_plural "<strong>%d</strong> sections"
3882
  msgstr[0] ""
3883
  msgstr[1] ""
3884
 
3885
- #: inc/custom-post-types/course.php:602
3886
  msgid "<strong>%d</strong> "
3887
  msgid_plural "<strong>%d</strong> "
3888
  msgstr[0] ""
3889
  msgstr[1] ""
3890
 
3891
- #: inc/custom-post-types/course.php:628
3892
  msgid "No content"
3893
  msgstr ""
3894
 
3895
- #: inc/custom-post-types/course.php:647
3896
  #: inc/lp-template-functions.php:67
3897
  msgid "Curriculum"
3898
  msgstr ""
@@ -3961,83 +3981,83 @@ msgid "Order number, course name etc..."
3961
  msgstr ""
3962
 
3963
  #: inc/custom-post-types/order.php:574
3964
- #: inc/custom-post-types/order.php:820
3965
  msgid "View Order"
3966
  msgstr ""
3967
 
3968
- #: inc/custom-post-types/order.php:588
3969
  msgid "View child orders"
3970
  msgstr ""
3971
 
3972
- #: inc/custom-post-types/order.php:657
3973
- #: inc/custom-post-types/order.php:816
3974
  #: templates/profile/tabs/orders/list.php:29
3975
  msgid "Order"
3976
  msgstr ""
3977
 
3978
- #: inc/custom-post-types/order.php:658
3979
  msgid "Student"
3980
  msgstr ""
3981
 
3982
- #: inc/custom-post-types/order.php:659
3983
  #: inc/lp-deprecated.php:372
3984
  msgid "Purchased"
3985
  msgstr ""
3986
 
3987
- #: inc/custom-post-types/order.php:712
3988
  #: inc/order/class-lp-order.php:458
3989
  msgid "(Guest)"
3990
  msgstr ""
3991
 
3992
- #: inc/custom-post-types/order.php:768
3993
  #: templates/checkout/order-received.php:71
3994
  msgid "Course does not exist"
3995
  msgstr ""
3996
 
3997
- #: inc/custom-post-types/order.php:770
3998
  msgid "Deleted"
3999
  msgstr ""
4000
 
4001
- #: inc/custom-post-types/order.php:786
4002
  #: templates/checkout/order-received.php:88
4003
  msgid "(No item)"
4004
  msgstr ""
4005
 
4006
- #: inc/custom-post-types/order.php:796
4007
  msgid "Pay via <strong>%s</strong>"
4008
  msgstr ""
4009
 
4010
- #: inc/custom-post-types/order.php:817
4011
  msgid "Add New Order"
4012
  msgstr ""
4013
 
4014
- #: inc/custom-post-types/order.php:818
4015
- #: inc/custom-post-types/order.php:985
4016
  #: templates/order/order-details.php:20
4017
  msgid "Order Details"
4018
  msgstr ""
4019
 
4020
- #: inc/custom-post-types/order.php:822
4021
  msgid "Update Order"
4022
  msgstr ""
4023
 
4024
- #: inc/custom-post-types/order.php:823
4025
  msgid "Search Orders"
4026
  msgstr ""
4027
 
4028
- #: inc/custom-post-types/order.php:824
4029
  msgid "No order found"
4030
  msgstr ""
4031
 
4032
- #: inc/custom-post-types/order.php:825
4033
  msgid "No order found in Trash"
4034
  msgstr ""
4035
 
4036
- #: inc/custom-post-types/order.php:993
4037
  msgid "Order Actions"
4038
  msgstr ""
4039
 
4040
- #: inc/custom-post-types/order.php:1001
4041
  msgid "Order Exports"
4042
  msgstr ""
4043
 
@@ -4352,7 +4372,7 @@ msgstr ""
4352
  #: inc/emails/instructor/class-lp-email-finished-course-instructor.php:25
4353
  #: inc/emails/instructor/class-lp-email-new-order-instructor.php:21
4354
  #: inc/lp-template-functions.php:73
4355
- #: templates/single-course/meta/instructor.php:20
4356
  msgid "Instructor"
4357
  msgstr ""
4358
 
@@ -4639,27 +4659,27 @@ msgstr ""
4639
  msgid "Pay with PayPal"
4640
  msgstr ""
4641
 
4642
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:373
4643
  msgid "IPN payment completed"
4644
  msgstr ""
4645
 
4646
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:499
4647
  msgid "Enable PayPal Standard"
4648
  msgstr ""
4649
 
4650
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:502
4651
  msgid "PayPal email"
4652
  msgstr ""
4653
 
4654
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:507
4655
  msgid "Sandbox mode"
4656
  msgstr ""
4657
 
4658
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:511
4659
  msgid "Enable PayPal sandbox"
4660
  msgstr ""
4661
 
4662
- #: inc/gateways/paypal/class-lp-gateway-paypal.php:514
4663
  msgid "Sandbox email address"
4664
  msgstr ""
4665
 
@@ -4703,40 +4723,36 @@ msgstr ""
4703
  msgid "The email address of the user."
4704
  msgstr ""
4705
 
4706
- #: inc/jwt/includes/class-jwt-public.php:151
4707
- #: inc/jwt/includes/class-jwt-public.php:388
4708
- msgid "The iss do not match with this server"
4709
  msgstr ""
4710
 
4711
- #: inc/jwt/includes/class-jwt-public.php:162
4712
- #: inc/jwt/includes/class-jwt-public.php:399
4713
- msgid "User ID not found in the token"
4714
  msgstr ""
4715
 
4716
- #: inc/jwt/includes/class-jwt-public.php:172
4717
- #: inc/jwt/includes/class-jwt-public.php:409
4718
- msgid "Token must have an expiration."
4719
  msgstr ""
4720
 
4721
- #: inc/jwt/includes/class-jwt-public.php:182
4722
- #: inc/jwt/includes/class-jwt-public.php:419
4723
- msgid "Token has expired."
4724
  msgstr ""
4725
 
4726
- #: inc/jwt/includes/class-jwt-public.php:228
4727
- #: inc/jwt/includes/class-jwt-public.php:373
4728
- msgid "LearnPress JWT is not configurated properly, please contact the admin"
4729
  msgstr ""
4730
 
4731
- #: inc/jwt/includes/class-jwt-public.php:344
4732
- msgid "Authorization header not found."
4733
  msgstr ""
4734
 
4735
- #: inc/jwt/includes/class-jwt-public.php:360
4736
- msgid "Authentication token is missing."
4737
  msgstr ""
4738
 
4739
- #: inc/jwt/includes/class-jwt-public.php:434
4740
  msgid "Valid access token."
4741
  msgstr ""
4742
 
@@ -4744,10 +4760,10 @@ msgstr ""
4744
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:64
4745
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:89
4746
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:114
4747
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:982
4748
  #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:32
4749
  #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:58
4750
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:413
4751
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:32
4752
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:197
4753
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:32
@@ -4788,8 +4804,8 @@ msgid "Course is not exists."
4788
  msgstr ""
4789
 
4790
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:347
4791
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:392
4792
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:555
4793
  msgid "Error: Can't add Course to cart."
4794
  msgstr ""
4795
 
@@ -4846,272 +4862,272 @@ msgstr ""
4846
  msgid "%s secs"
4847
  msgstr ""
4848
 
4849
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:988
4850
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:419
4851
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:203
4852
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:572
4853
  msgid "Course name."
4854
  msgstr ""
4855
 
4856
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:993
4857
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:424
4858
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:208
4859
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:577
4860
  msgid "Course slug."
4861
  msgstr ""
4862
 
4863
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:998
4864
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:429
4865
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:213
4866
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:582
4867
  msgid "Course URL."
4868
  msgstr ""
4869
 
4870
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1005
4871
  msgid "Course Image URL."
4872
  msgstr ""
4873
 
4874
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1011
4875
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:436
4876
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:220
4877
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:589
4878
  msgid "The date the Course was created, in the site's timezone."
4879
  msgstr ""
4880
 
4881
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1018
4882
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:442
4883
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:226
4884
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:595
4885
  msgid "The date the Course was created, as GMT."
4886
  msgstr ""
4887
 
4888
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1025
4889
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:448
4890
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:232
4891
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:601
4892
  msgid "The date the Course was last modified, in the site's timezone."
4893
  msgstr ""
4894
 
4895
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1032
4896
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:454
4897
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:238
4898
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:607
4899
  msgid "The date the Course was last modified, as GMT."
4900
  msgstr ""
4901
 
4902
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1039
4903
  msgid "Shows if the course is on sale."
4904
  msgstr ""
4905
 
4906
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1045
4907
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:460
4908
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:244
4909
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:613
4910
  msgid "Course status (post status)."
4911
  msgstr ""
4912
 
4913
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1052
4914
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:467
4915
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:251
4916
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:620
4917
  msgid "Content course."
4918
  msgstr ""
4919
 
4920
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1057
4921
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:472
4922
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:256
4923
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:625
4924
  msgid "Retrieves the course excerpt.."
4925
  msgstr ""
4926
 
4927
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1067
4928
  msgid "Count student enrolled"
4929
  msgstr ""
4930
 
4931
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1073
4932
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:477
4933
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:630
4934
  msgid "Can finish course"
4935
  msgstr ""
4936
 
4937
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1079
4938
  msgid "Can retake course"
4939
  msgstr ""
4940
 
4941
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1085
4942
  msgid "Total retake"
4943
  msgstr ""
4944
 
4945
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1091
4946
  msgid "Retaken"
4947
  msgstr ""
4948
 
4949
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1097
4950
  msgid "Course Review add-on"
4951
  msgstr ""
4952
 
4953
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1103
4954
  msgid "Course Price"
4955
  msgstr ""
4956
 
4957
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1109
4958
  msgid "Course Origin Price"
4959
  msgstr ""
4960
 
4961
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1115
4962
  msgid "Course Sale Price"
4963
  msgstr ""
4964
 
4965
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1121
4966
  msgid "List of categories."
4967
  msgstr ""
4968
 
4969
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1128
4970
  msgid "Category ID."
4971
  msgstr ""
4972
 
4973
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1133
4974
  msgid "Category name."
4975
  msgstr ""
4976
 
4977
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1139
4978
  msgid "Category slug."
4979
  msgstr ""
4980
 
4981
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1148
4982
  msgid "List of tags."
4983
  msgstr ""
4984
 
4985
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1155
4986
  msgid "Tag ID."
4987
  msgstr ""
4988
 
4989
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1160
4990
  msgid "Tag name."
4991
  msgstr ""
4992
 
4993
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1166
4994
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1193
4995
  msgid "Tag slug."
4996
  msgstr ""
4997
 
4998
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1175
4999
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1208
5000
  msgid "Retrieves the course sections and items.."
5001
  msgstr ""
5002
 
5003
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1182
5004
  msgid "User ID."
5005
  msgstr ""
5006
 
5007
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1187
5008
  msgid "Display name."
5009
  msgstr ""
5010
 
5011
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1199
5012
  msgid "Social Infor."
5013
  msgstr ""
5014
 
5015
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1215
5016
  #: inc/jwt/rest-api/version1/class-lp-rest-section-items-v1-controller.php:14
5017
  msgid "Section ID."
5018
  msgstr ""
5019
 
5020
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1220
5021
  #: inc/jwt/rest-api/version1/class-lp-rest-sections-v1-controller.php:122
5022
  msgid "Section name."
5023
  msgstr ""
5024
 
5025
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1225
5026
  #: inc/jwt/rest-api/version1/class-lp-rest-sections-v1-controller.php:14
5027
  msgid "Course ID."
5028
  msgstr ""
5029
 
5030
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1230
5031
  #: inc/jwt/rest-api/version1/class-lp-rest-sections-v1-controller.php:127
5032
  msgid "Section description."
5033
  msgstr ""
5034
 
5035
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1235
5036
  msgid "Section items."
5037
  msgstr ""
5038
 
5039
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1240
5040
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1255
5041
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:493
5042
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:266
5043
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:646
5044
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:682
5045
  msgid "Item ID."
5046
  msgstr ""
5047
 
5048
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1245
5049
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:687
5050
  msgid "Item Type."
5051
  msgstr ""
5052
 
5053
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1250
5054
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:692
5055
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:721
5056
  msgid "Item title."
5057
  msgstr ""
5058
 
5059
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1260
5060
  msgid "Percent."
5061
  msgstr ""
5062
 
5063
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1265
5064
  msgid "Duration."
5065
  msgstr ""
5066
 
5067
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1270
5068
  msgid "Graduation."
5069
  msgstr ""
5070
 
5071
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1275
5072
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:525
5073
  msgid "Status."
5074
  msgstr ""
5075
 
5076
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1280
5077
  msgid "Locked."
5078
  msgstr ""
5079
 
5080
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1290
5081
  msgid "List of course user data."
5082
  msgstr ""
5083
 
5084
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1297
5085
  msgid "Graduation"
5086
  msgstr ""
5087
 
5088
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1320
5089
  #: templates/profile/tabs/courses/course-list.php:24
5090
  msgid "Expiration time"
5091
  msgstr ""
5092
 
5093
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1340
5094
  msgid "Limit result set to courses assigned a specific category ID."
5095
  msgstr ""
5096
 
5097
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1346
5098
  msgid "Limit result set to courses assigned a specific tag ID."
5099
  msgstr ""
5100
 
5101
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1352
5102
  msgid "Filter by course to in-progress, passed, failed."
5103
  msgstr ""
5104
 
5105
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1359
5106
  #: inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php:602
5107
  msgid "Get item learned by user."
5108
  msgstr ""
5109
 
5110
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1365
5111
  msgid "Get item popularity."
5112
  msgstr ""
5113
 
5114
- #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1370
5115
  msgid "Disable some fields schema."
5116
  msgstr ""
5117
 
@@ -5136,42 +5152,46 @@ msgstr ""
5136
  msgid "Congrats! You complete lesson is successfully"
5137
  msgstr ""
5138
 
5139
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:488
5140
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:261
5141
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:641
5142
  msgid "Assigned."
5143
  msgstr ""
5144
 
5145
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:498
5146
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:271
5147
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:651
5148
  msgid "Title."
5149
  msgstr ""
5150
 
5151
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:503
5152
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:276
5153
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:656
5154
  #: inc/jwt/rest-api/version1/class-lp-rest-section-items-v1-controller.php:223
5155
  msgid "Item slug."
5156
  msgstr ""
5157
 
5158
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:508
5159
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:281
5160
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:661
5161
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:697
5162
  msgid "Item Content."
5163
  msgstr ""
5164
 
5165
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:513
5166
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:286
5167
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:666
5168
  msgid "Item Author."
5169
  msgstr ""
5170
 
5171
- #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:520
5172
  msgid "Retrieves the Lesson result.."
5173
  msgstr ""
5174
 
 
 
 
 
5175
  #: inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php:14
5176
  #: inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php:475
5177
  msgid "Method '%s' not implemented. Must be overridden in subclass."
@@ -5404,820 +5424,820 @@ msgstr ""
5404
  msgid "Your password has been updated, Please login again to continue!"
5405
  msgstr ""
5406
 
5407
- #: inc/lp-core-functions.php:887
5408
  msgid "Minute(s)"
5409
  msgstr ""
5410
 
5411
- #: inc/lp-core-functions.php:888
5412
  msgid "Hour(s)"
5413
  msgstr ""
5414
 
5415
- #: inc/lp-core-functions.php:889
5416
  msgid "Day(s)"
5417
  msgstr ""
5418
 
5419
- #: inc/lp-core-functions.php:890
5420
  msgid "Week(s)"
5421
  msgstr ""
5422
 
5423
- #: inc/lp-core-functions.php:1035
5424
  msgid "Left"
5425
  msgstr ""
5426
 
5427
- #: inc/lp-core-functions.php:1036
5428
  msgid "Right"
5429
  msgstr ""
5430
 
5431
- #: inc/lp-core-functions.php:1037
5432
  msgid "Left with space"
5433
  msgstr ""
5434
 
5435
- #: inc/lp-core-functions.php:1038
5436
  msgid "Right with space"
5437
  msgstr ""
5438
 
5439
- #: inc/lp-core-functions.php:1097
5440
  msgid "Afghan afghani"
5441
  msgstr ""
5442
 
5443
- #: inc/lp-core-functions.php:1098
5444
  msgid "Albanian lek"
5445
  msgstr ""
5446
 
5447
- #: inc/lp-core-functions.php:1099
5448
  msgid "Algerian dinar"
5449
  msgstr ""
5450
 
5451
- #: inc/lp-core-functions.php:1100
5452
  msgid "Euro"
5453
  msgstr ""
5454
 
5455
- #: inc/lp-core-functions.php:1101
5456
  msgid "Angolan kwanza"
5457
  msgstr ""
5458
 
5459
- #: inc/lp-core-functions.php:1102
5460
  msgid "East Caribbean dollar"
5461
  msgstr ""
5462
 
5463
- #: inc/lp-core-functions.php:1103
5464
  msgid "Argentine peso"
5465
  msgstr ""
5466
 
5467
- #: inc/lp-core-functions.php:1104
5468
  msgid "Armenian dram"
5469
  msgstr ""
5470
 
5471
- #: inc/lp-core-functions.php:1105
5472
  msgid "Aruban florin"
5473
  msgstr ""
5474
 
5475
- #: inc/lp-core-functions.php:1106
5476
  msgid "Australian dollar"
5477
  msgstr ""
5478
 
5479
- #: inc/lp-core-functions.php:1107
5480
  msgid "Azerbaijani manat"
5481
  msgstr ""
5482
 
5483
- #: inc/lp-core-functions.php:1108
5484
  msgid "Bahamian dollar"
5485
  msgstr ""
5486
 
5487
- #: inc/lp-core-functions.php:1109
5488
  msgid "Bahraini dinar"
5489
  msgstr ""
5490
 
5491
- #: inc/lp-core-functions.php:1110
5492
  msgid "Bangladeshi taka"
5493
  msgstr ""
5494
 
5495
- #: inc/lp-core-functions.php:1111
5496
  msgid "Barbadian dollar"
5497
  msgstr ""
5498
 
5499
- #: inc/lp-core-functions.php:1112
5500
  msgid "Belarusian ruble"
5501
  msgstr ""
5502
 
5503
- #: inc/lp-core-functions.php:1113
5504
  msgid "Belizean dollar"
5505
  msgstr ""
5506
 
5507
- #: inc/lp-core-functions.php:1114
5508
  msgid "West African CFA franc"
5509
  msgstr ""
5510
 
5511
- #: inc/lp-core-functions.php:1115
5512
  msgid "Bermudian dollar"
5513
  msgstr ""
5514
 
5515
- #: inc/lp-core-functions.php:1116
5516
  msgid "Bhutanese ngultrum"
5517
  msgstr ""
5518
 
5519
- #: inc/lp-core-functions.php:1117
5520
  msgid "Bolivian boliviano"
5521
  msgstr ""
5522
 
5523
- #: inc/lp-core-functions.php:1118
5524
  msgid "US dollar"
5525
  msgstr ""
5526
 
5527
- #: inc/lp-core-functions.php:1119
5528
  msgid "Bosnia and Herzegovina convertible mark"
5529
  msgstr ""
5530
 
5531
- #: inc/lp-core-functions.php:1120
5532
  msgid "Botswana pula"
5533
  msgstr ""
5534
 
5535
- #: inc/lp-core-functions.php:1121
5536
  msgid "Brazilian real"
5537
  msgstr ""
5538
 
5539
- #: inc/lp-core-functions.php:1122
5540
  msgid "Brunei dollar"
5541
  msgstr ""
5542
 
5543
- #: inc/lp-core-functions.php:1123
5544
  msgid "Bulgarian lev"
5545
  msgstr ""
5546
 
5547
- #: inc/lp-core-functions.php:1124
5548
  msgid "Burmese kyat"
5549
  msgstr ""
5550
 
5551
- #: inc/lp-core-functions.php:1125
5552
  msgid "Burundian franc"
5553
  msgstr ""
5554
 
5555
- #: inc/lp-core-functions.php:1126
5556
  msgid "Cambodian riel"
5557
  msgstr ""
5558
 
5559
- #: inc/lp-core-functions.php:1127
5560
  msgid "Central African CFA franc"
5561
  msgstr ""
5562
 
5563
- #: inc/lp-core-functions.php:1128
5564
  msgid "Canadian dollar"
5565
  msgstr ""
5566
 
5567
- #: inc/lp-core-functions.php:1129
5568
  msgid "Cape Verdean escudo"
5569
  msgstr ""
5570
 
5571
- #: inc/lp-core-functions.php:1130
5572
  msgid "Cayman Islands dollar"
5573
  msgstr ""
5574
 
5575
- #: inc/lp-core-functions.php:1131
5576
  msgid "Chilean peso"
5577
  msgstr ""
5578
 
5579
- #: inc/lp-core-functions.php:1132
5580
  msgid "Chinese renminbi"
5581
  msgstr ""
5582
 
5583
- #: inc/lp-core-functions.php:1133
5584
  msgid "Colombian peso"
5585
  msgstr ""
5586
 
5587
- #: inc/lp-core-functions.php:1134
5588
  msgid "Comorian franc"
5589
  msgstr ""
5590
 
5591
- #: inc/lp-core-functions.php:1135
5592
  msgid "Congolese franc"
5593
  msgstr ""
5594
 
5595
- #: inc/lp-core-functions.php:1136
5596
  msgid "New Zealand dollar"
5597
  msgstr ""
5598
 
5599
- #: inc/lp-core-functions.php:1137
5600
  msgid "Costa Rican colón"
5601
  msgstr ""
5602
 
5603
- #: inc/lp-core-functions.php:1138
5604
  msgid "Croatian kuna"
5605
  msgstr ""
5606
 
5607
- #: inc/lp-core-functions.php:1139
5608
  msgid "Cuban peso"
5609
  msgstr ""
5610
 
5611
- #: inc/lp-core-functions.php:1140
5612
  msgid "Netherlands Antilles guilder"
5613
  msgstr ""
5614
 
5615
- #: inc/lp-core-functions.php:1141
5616
  msgid "Czech koruna"
5617
  msgstr ""
5618
 
5619
- #: inc/lp-core-functions.php:1142
5620
  msgid "Danish krone"
5621
  msgstr ""
5622
 
5623
- #: inc/lp-core-functions.php:1143
5624
  msgid "Djiboutian franc"
5625
  msgstr ""
5626
 
5627
- #: inc/lp-core-functions.php:1144
5628
  msgid "Dominican peso"
5629
  msgstr ""
5630
 
5631
- #: inc/lp-core-functions.php:1145
5632
  msgid "Egyptian pound"
5633
  msgstr ""
5634
 
5635
- #: inc/lp-core-functions.php:1146
5636
  msgid "Salvadoran colón"
5637
  msgstr ""
5638
 
5639
- #: inc/lp-core-functions.php:1147
5640
  msgid "Eritrean nakfa"
5641
  msgstr ""
5642
 
5643
- #: inc/lp-core-functions.php:1148
5644
  msgid "Ethiopian birr"
5645
  msgstr ""
5646
 
5647
- #: inc/lp-core-functions.php:1149
5648
  msgid "Falkland Islands pound"
5649
  msgstr ""
5650
 
5651
- #: inc/lp-core-functions.php:1150
5652
  msgid "Fijian dollar"
5653
  msgstr ""
5654
 
5655
- #: inc/lp-core-functions.php:1151
5656
  msgid "CFP franc"
5657
  msgstr ""
5658
 
5659
- #: inc/lp-core-functions.php:1152
5660
  msgid "Gambian dalasi"
5661
  msgstr ""
5662
 
5663
- #: inc/lp-core-functions.php:1153
5664
  msgid "Georgian lari"
5665
  msgstr ""
5666
 
5667
- #: inc/lp-core-functions.php:1154
5668
  msgid "Ghanian cedi"
5669
  msgstr ""
5670
 
5671
- #: inc/lp-core-functions.php:1155
5672
  msgid "Gibraltar pound"
5673
  msgstr ""
5674
 
5675
- #: inc/lp-core-functions.php:1156
5676
  msgid "Guatemalan quetzal"
5677
  msgstr ""
5678
 
5679
- #: inc/lp-core-functions.php:1157
5680
  msgid "British pound"
5681
  msgstr ""
5682
 
5683
- #: inc/lp-core-functions.php:1158
5684
  msgid "Guinean franc"
5685
  msgstr ""
5686
 
5687
- #: inc/lp-core-functions.php:1159
5688
  msgid "Guyanese dollar"
5689
  msgstr ""
5690
 
5691
- #: inc/lp-core-functions.php:1160
5692
  msgid "Haitian gourde"
5693
  msgstr ""
5694
 
5695
- #: inc/lp-core-functions.php:1161
5696
  msgid "Honduran lempira"
5697
  msgstr ""
5698
 
5699
- #: inc/lp-core-functions.php:1162
5700
  msgid "Hong Kong dollar"
5701
  msgstr ""
5702
 
5703
- #: inc/lp-core-functions.php:1163
5704
  msgid "Hungarian forint"
5705
  msgstr ""
5706
 
5707
- #: inc/lp-core-functions.php:1164
5708
  msgid "Icelandic króna"
5709
  msgstr ""
5710
 
5711
- #: inc/lp-core-functions.php:1165
5712
  msgid "Indian rupee"
5713
  msgstr ""
5714
 
5715
- #: inc/lp-core-functions.php:1166
5716
  msgid "Indonesian rupiah"
5717
  msgstr ""
5718
 
5719
- #: inc/lp-core-functions.php:1167
5720
  msgid "Iranian rial"
5721
  msgstr ""
5722
 
5723
- #: inc/lp-core-functions.php:1168
5724
  msgid "Iraqi dinar"
5725
  msgstr ""
5726
 
5727
- #: inc/lp-core-functions.php:1169
5728
  msgid "Israeli new sheqel"
5729
  msgstr ""
5730
 
5731
- #: inc/lp-core-functions.php:1170
5732
  msgid "Jamaican dollar"
5733
  msgstr ""
5734
 
5735
- #: inc/lp-core-functions.php:1171
5736
  msgid "Japanese yen "
5737
  msgstr ""
5738
 
5739
- #: inc/lp-core-functions.php:1172
5740
  msgid "Jordanian dinar"
5741
  msgstr ""
5742
 
5743
- #: inc/lp-core-functions.php:1173
5744
  msgid "Kazakhstani tenge"
5745
  msgstr ""
5746
 
5747
- #: inc/lp-core-functions.php:1174
5748
  msgid "Kenyan shilling"
5749
  msgstr ""
5750
 
5751
- #: inc/lp-core-functions.php:1175
5752
  msgid "North Korean won"
5753
  msgstr ""
5754
 
5755
- #: inc/lp-core-functions.php:1176
5756
  msgid "Kuwaiti dinar"
5757
  msgstr ""
5758
 
5759
- #: inc/lp-core-functions.php:1177
5760
  msgid "Kyrgyzstani som"
5761
  msgstr ""
5762
 
5763
- #: inc/lp-core-functions.php:1178
5764
  msgid "South Korean won"
5765
  msgstr ""
5766
 
5767
- #: inc/lp-core-functions.php:1179
5768
  msgid "Lao kip"
5769
  msgstr ""
5770
 
5771
- #: inc/lp-core-functions.php:1180
5772
  msgid "Latvian lats"
5773
  msgstr ""
5774
 
5775
- #: inc/lp-core-functions.php:1181
5776
  msgid "Lebanese pound"
5777
  msgstr ""
5778
 
5779
- #: inc/lp-core-functions.php:1182
5780
  msgid "Lesotho loti"
5781
  msgstr ""
5782
 
5783
- #: inc/lp-core-functions.php:1183
5784
  msgid "Liberian dollar"
5785
  msgstr ""
5786
 
5787
- #: inc/lp-core-functions.php:1184
5788
- #: inc/lp-core-functions.php:1255
5789
  msgid "Libyan dinar"
5790
  msgstr ""
5791
 
5792
- #: inc/lp-core-functions.php:1185
5793
  msgid "Swiss franc"
5794
  msgstr ""
5795
 
5796
- #: inc/lp-core-functions.php:1186
5797
  msgid "Lithuanian litas"
5798
  msgstr ""
5799
 
5800
- #: inc/lp-core-functions.php:1187
5801
  msgid "Macanese pataca"
5802
  msgstr ""
5803
 
5804
- #: inc/lp-core-functions.php:1188
5805
  msgid "Macedonian denar"
5806
  msgstr ""
5807
 
5808
- #: inc/lp-core-functions.php:1189
5809
  msgid "Malagasy ariary"
5810
  msgstr ""
5811
 
5812
- #: inc/lp-core-functions.php:1190
5813
  msgid "Malawian kwacha"
5814
  msgstr ""
5815
 
5816
- #: inc/lp-core-functions.php:1191
5817
  msgid "Malaysian ringgit"
5818
  msgstr ""
5819
 
5820
- #: inc/lp-core-functions.php:1192
5821
  msgid "Maldivian rufiyaa"
5822
  msgstr ""
5823
 
5824
- #: inc/lp-core-functions.php:1193
5825
  msgid "Mauritanian ouguiya"
5826
  msgstr ""
5827
 
5828
- #: inc/lp-core-functions.php:1194
5829
  msgid "Mauritian rupee"
5830
  msgstr ""
5831
 
5832
- #: inc/lp-core-functions.php:1195
5833
  msgid "Mexican peso"
5834
  msgstr ""
5835
 
5836
- #: inc/lp-core-functions.php:1196
5837
  msgid "Moldovan leu"
5838
  msgstr ""
5839
 
5840
- #: inc/lp-core-functions.php:1197
5841
  msgid "Mongolian tugrik"
5842
  msgstr ""
5843
 
5844
- #: inc/lp-core-functions.php:1198
5845
  msgid "Moroccan dirham"
5846
  msgstr ""
5847
 
5848
- #: inc/lp-core-functions.php:1199
5849
  msgid "Mozambican metical"
5850
  msgstr ""
5851
 
5852
- #: inc/lp-core-functions.php:1200
5853
  msgid "Namibian dollar"
5854
  msgstr ""
5855
 
5856
- #: inc/lp-core-functions.php:1201
5857
  msgid "Nepalese rupee"
5858
  msgstr ""
5859
 
5860
- #: inc/lp-core-functions.php:1202
5861
  msgid "Nicaraguan córdoba"
5862
  msgstr ""
5863
 
5864
- #: inc/lp-core-functions.php:1203
5865
  msgid "Nigerian naira"
5866
  msgstr ""
5867
 
5868
- #: inc/lp-core-functions.php:1204
5869
  msgid "Norwegian krone"
5870
  msgstr ""
5871
 
5872
- #: inc/lp-core-functions.php:1205
5873
  msgid "Omani rial"
5874
  msgstr ""
5875
 
5876
- #: inc/lp-core-functions.php:1206
5877
  msgid "Pakistani rupee"
5878
  msgstr ""
5879
 
5880
- #: inc/lp-core-functions.php:1207
5881
  msgid "Panamanian balboa"
5882
  msgstr ""
5883
 
5884
- #: inc/lp-core-functions.php:1208
5885
  msgid "Papua New Guinea kina"
5886
  msgstr ""
5887
 
5888
- #: inc/lp-core-functions.php:1209
5889
  msgid "Paraguayan guarani"
5890
  msgstr ""
5891
 
5892
- #: inc/lp-core-functions.php:1210
5893
  msgid "Peruvian nuevo sol"
5894
  msgstr ""
5895
 
5896
- #: inc/lp-core-functions.php:1211
5897
  msgid "Philippine peso"
5898
  msgstr ""
5899
 
5900
- #: inc/lp-core-functions.php:1212
5901
  msgid "Polish zloty"
5902
  msgstr ""
5903
 
5904
- #: inc/lp-core-functions.php:1213
5905
  msgid "Qatari riyal"
5906
  msgstr ""
5907
 
5908
- #: inc/lp-core-functions.php:1214
5909
  msgid "Romanian leu"
5910
  msgstr ""
5911
 
5912
- #: inc/lp-core-functions.php:1215
5913
  msgid "Russian ruble"
5914
  msgstr ""
5915
 
5916
- #: inc/lp-core-functions.php:1216
5917
  msgid "Rwandan franc"
5918
  msgstr ""
5919
 
5920
- #: inc/lp-core-functions.php:1217
5921
  msgid "Samoan tālā"
5922
  msgstr ""
5923
 
5924
- #: inc/lp-core-functions.php:1218
5925
  msgid "São Tomé and Príncipe dobra"
5926
  msgstr ""
5927
 
5928
- #: inc/lp-core-functions.php:1219
5929
  msgid "Saudi riyal"
5930
  msgstr ""
5931
 
5932
- #: inc/lp-core-functions.php:1220
5933
  msgid "Serbian dinar"
5934
  msgstr ""
5935
 
5936
- #: inc/lp-core-functions.php:1221
5937
  msgid "Seychellois rupee"
5938
  msgstr ""
5939
 
5940
- #: inc/lp-core-functions.php:1222
5941
  msgid "Sierra Leonean leone"
5942
  msgstr ""
5943
 
5944
- #: inc/lp-core-functions.php:1223
5945
  msgid "Singapore dollar"
5946
  msgstr ""
5947
 
5948
- #: inc/lp-core-functions.php:1224
5949
  msgid "Solomon Islands dollar"
5950
  msgstr ""
5951
 
5952
- #: inc/lp-core-functions.php:1225
5953
  msgid "Somali shilling"
5954
  msgstr ""
5955
 
5956
- #: inc/lp-core-functions.php:1226
5957
  msgid "South African rand"
5958
  msgstr ""
5959
 
5960
- #: inc/lp-core-functions.php:1227
5961
  msgid "Sri Lankan rupee"
5962
  msgstr ""
5963
 
5964
- #: inc/lp-core-functions.php:1228
5965
  msgid "St. Helena pound"
5966
  msgstr ""
5967
 
5968
- #: inc/lp-core-functions.php:1229
5969
  msgid "Sudanese pound"
5970
  msgstr ""
5971
 
5972
- #: inc/lp-core-functions.php:1230
5973
  msgid "Surinamese dollar"
5974
  msgstr ""
5975
 
5976
- #: inc/lp-core-functions.php:1231
5977
  msgid "Swazi lilangeni"
5978
  msgstr ""
5979
 
5980
- #: inc/lp-core-functions.php:1232
5981
  msgid "Swedish krona"
5982
  msgstr ""
5983
 
5984
- #: inc/lp-core-functions.php:1233
5985
  msgid "Syrian pound"
5986
  msgstr ""
5987
 
5988
- #: inc/lp-core-functions.php:1234
5989
  msgid "New Taiwan dollar"
5990
  msgstr ""
5991
 
5992
- #: inc/lp-core-functions.php:1235
5993
  msgid "Tajikistani somoni"
5994
  msgstr ""
5995
 
5996
- #: inc/lp-core-functions.php:1236
5997
  msgid "Tanzanian shilling"
5998
  msgstr ""
5999
 
6000
- #: inc/lp-core-functions.php:1237
6001
  msgid "Thai baht "
6002
  msgstr ""
6003
 
6004
- #: inc/lp-core-functions.php:1238
6005
  msgid "Tongan pa’anga"
6006
  msgstr ""
6007
 
6008
- #: inc/lp-core-functions.php:1239
6009
  msgid "Trinidad and Tobago dollar"
6010
  msgstr ""
6011
 
6012
- #: inc/lp-core-functions.php:1240
6013
  msgid "Tunisian dinar"
6014
  msgstr ""
6015
 
6016
- #: inc/lp-core-functions.php:1241
6017
  msgid "Turkish lira"
6018
  msgstr ""
6019
 
6020
- #: inc/lp-core-functions.php:1242
6021
  msgid "Turkmenistani manat"
6022
  msgstr ""
6023
 
6024
- #: inc/lp-core-functions.php:1243
6025
  msgid "Ugandan shilling"
6026
  msgstr ""
6027
 
6028
- #: inc/lp-core-functions.php:1244
6029
  msgid "Ukrainian hryvnia"
6030
  msgstr ""
6031
 
6032
- #: inc/lp-core-functions.php:1245
6033
  msgid "United Arab Emirates dirham"
6034
  msgstr ""
6035
 
6036
- #: inc/lp-core-functions.php:1246
6037
  msgid "Uruguayan peso"
6038
  msgstr ""
6039
 
6040
- #: inc/lp-core-functions.php:1247
6041
  msgid "Uzbekistani som"
6042
  msgstr ""
6043
 
6044
- #: inc/lp-core-functions.php:1248
6045
  msgid "Vanuatu vatu"
6046
  msgstr ""
6047
 
6048
- #: inc/lp-core-functions.php:1249
6049
  msgid "Venezuelan bolivar"
6050
  msgstr ""
6051
 
6052
- #: inc/lp-core-functions.php:1250
6053
  msgid "Vietnamese dong"
6054
  msgstr ""
6055
 
6056
- #: inc/lp-core-functions.php:1251
6057
  msgid "Yemeni rial"
6058
  msgstr ""
6059
 
6060
- #: inc/lp-core-functions.php:1252
6061
  msgid "Zambian kwacha"
6062
  msgstr ""
6063
 
6064
- #: inc/lp-core-functions.php:1253
6065
  msgid "Zimbabwean dollar"
6066
  msgstr ""
6067
 
6068
- #: inc/lp-core-functions.php:1254
6069
  msgid "Jersey pound"
6070
  msgstr ""
6071
 
6072
- #: inc/lp-core-functions.php:1565
6073
  #: inc/lp-template-functions.php:1690
6074
  msgid "%s week"
6075
  msgid_plural "%s weeks"
6076
  msgstr[0] ""
6077
  msgstr[1] ""
6078
 
6079
- #: inc/lp-core-functions.php:1569
6080
  #: inc/lp-template-functions.php:1686
6081
  msgid "%s day"
6082
  msgid_plural "%s days"
6083
  msgstr[0] ""
6084
  msgstr[1] ""
6085
 
6086
- #: inc/lp-core-functions.php:1574
6087
  #: inc/lp-template-functions.php:1681
6088
  msgid "%s hour"
6089
  msgid_plural "%s hours"
6090
  msgstr[0] ""
6091
  msgstr[1] ""
6092
 
6093
- #: inc/lp-core-functions.php:1578
6094
  #: inc/lp-template-functions.php:1675
6095
  msgid "%s minute"
6096
  msgid_plural "%s minutes"
6097
  msgstr[0] ""
6098
  msgstr[1] ""
6099
 
6100
- #: inc/lp-core-functions.php:2375
6101
  msgid "Cart"
6102
  msgstr ""
6103
 
6104
- #: inc/lp-core-functions.php:2379
6105
  msgid "Enable cart"
6106
  msgstr ""
6107
 
6108
- #: inc/lp-core-functions.php:2380
6109
  msgid "Check this option to enable user purchase multiple courses at one time."
6110
  msgstr ""
6111
 
6112
- #: inc/lp-core-functions.php:2389
6113
  msgid "Add to cart redirect"
6114
  msgstr ""
6115
 
6116
- #: inc/lp-core-functions.php:2390
6117
  msgid "Redirect to checkout immediately after adding course to cart."
6118
  msgstr ""
6119
 
6120
- #: inc/lp-core-functions.php:2396
6121
  msgid "AJAX add to cart"
6122
  msgstr ""
6123
 
6124
- #: inc/lp-core-functions.php:2397
6125
  msgid "Using AJAX to add course to cart."
6126
  msgstr ""
6127
 
6128
- #: inc/lp-core-functions.php:2403
6129
  msgid "Cart page"
6130
  msgstr ""
6131
 
6132
- #: inc/lp-core-functions.php:2774
6133
  msgctxt "static-page-name"
6134
  msgid "Checkout"
6135
  msgstr ""
6136
 
6137
- #: inc/lp-core-functions.php:2775
6138
  msgctxt "static-page-name"
6139
  msgid "Courses"
6140
  msgstr ""
6141
 
6142
- #: inc/lp-core-functions.php:2776
6143
  msgctxt "static-page-name"
6144
  msgid "Profile"
6145
  msgstr ""
6146
 
6147
- #: inc/lp-core-functions.php:2777
6148
  msgctxt "static-page-name"
6149
  msgid "Become a Teacher"
6150
  msgstr ""
6151
 
6152
- #: inc/lp-core-functions.php:3461
6153
  msgid "Loading..."
6154
  msgstr ""
6155
 
6156
- #: inc/lp-core-functions.php:3464
6157
  msgid "Get Passing Grade"
6158
  msgstr ""
6159
 
6160
- #: inc/lp-core-functions.php:3469
6161
  msgid "Evaluate by the number of lessons completed per total number of lessons."
6162
  msgstr ""
6163
 
6164
- #: inc/lp-core-functions.php:3470
6165
  msgid "E.g: Course has 10 lessons and user completed 5 lessons then the result = 5/10 (50.%)"
6166
  msgstr ""
6167
 
6168
- #: inc/lp-core-functions.php:3472
6169
  msgid "Evaluate by result of final quiz in the course. You have to add a quiz to the end of the course."
6170
  msgstr ""
6171
 
6172
- #: inc/lp-core-functions.php:3478
6173
  msgid "Evaluate by the number of quizzes passed per total number of quizzes."
6174
  msgstr ""
6175
 
6176
- #: inc/lp-core-functions.php:3479
6177
  msgid "E.g: The course has 10 quizzes and the user passed 5 quizzes then the result = 5/10 (50%)."
6178
  msgstr ""
6179
 
6180
- #: inc/lp-core-functions.php:3486
6181
  msgid "Evaluate by total number of correct answers per total number of questions."
6182
  msgstr ""
6183
 
6184
- #: inc/lp-core-functions.php:3487
6185
  msgid "E.g: Course has 10 questions. User correct 5 questions. Result is 5/10 (50%)."
6186
  msgstr ""
6187
 
6188
- #: inc/lp-core-functions.php:3492
6189
  msgid "Evaluate by total score achieved per total score of the questions."
6190
  msgstr ""
6191
 
6192
- #: inc/lp-core-functions.php:3498
6193
  msgid "Evaluate via lessons"
6194
  msgstr ""
6195
 
6196
- #: inc/lp-core-functions.php:3502
6197
  msgid "Evaluate via results of the final quiz"
6198
  msgstr ""
6199
 
6200
- #: inc/lp-core-functions.php:3506
6201
  msgid "Evaluate via quizzes passed"
6202
  msgstr ""
6203
 
6204
- #: inc/lp-core-functions.php:3510
6205
  msgid "Evaluate via questions"
6206
  msgstr ""
6207
 
6208
- #: inc/lp-core-functions.php:3514
6209
  msgid "Evaluate via mark"
6210
  msgstr ""
6211
 
6212
- #: inc/lp-core-functions.php:3832
6213
  msgid "Heads up, Please backup before upgrade!"
6214
  msgstr ""
6215
 
6216
- #: inc/lp-core-functions.php:3835
6217
  msgid "The latest update includes some substantial changes across different areas of the plugin. We highly recommend you backup your site before upgrading, and make sure you first update in a staging environment"
6218
  msgstr ""
6219
 
6220
- #: inc/lp-core-functions.php:3836
6221
  msgid "Learners require WordPress version "
6222
  msgstr ""
6223
 
@@ -6565,88 +6585,88 @@ msgstr ""
6565
  msgid "No course ID available"
6566
  msgstr ""
6567
 
6568
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:206
6569
  msgid "Showing only one result"
6570
  msgstr ""
6571
 
6572
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:209
6573
  msgid "Showing last course of %s results"
6574
  msgstr ""
6575
 
6576
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:212
6577
  msgid "Showing %1$s of %2$s results"
6578
  msgstr ""
6579
 
6580
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:338
6581
  msgid "Error: No course available!."
6582
  msgstr ""
6583
 
6584
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:346
6585
  msgid "Invalid course!"
6586
  msgstr ""
6587
 
6588
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:352
6589
  msgid "Error: Cannot enroll course."
6590
  msgstr ""
6591
 
6592
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:373
6593
  msgid "Error: Can't Enroll course."
6594
  msgstr ""
6595
 
6596
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:413
6597
  msgid "Congrats! You enroll course successfully. Redirecting..."
6598
  msgstr ""
6599
 
6600
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:431
6601
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:570
6602
  msgid "Error: Please setup page for checkout."
6603
  msgstr ""
6604
 
6605
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:436
6606
  msgid "Redirecting..."
6607
  msgstr ""
6608
 
6609
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:466
6610
  msgid "Error: Invalid Course ID."
6611
  msgstr ""
6612
 
6613
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:472
6614
  msgid "Error: No Course available."
6615
  msgstr ""
6616
 
6617
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:478
6618
  msgid "Error: Cannot purchase course!."
6619
  msgstr ""
6620
 
6621
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:516
6622
  msgid "Reset Course progress"
6623
  msgstr ""
6624
 
6625
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:522
6626
  msgid "Continue Course progress"
6627
  msgstr ""
6628
 
6629
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:530
6630
  msgid "Repurchase Options"
6631
  msgstr ""
6632
 
6633
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:577
6634
  msgid "\"%s\" has been added to your cart."
6635
  msgstr ""
6636
 
6637
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:602
6638
  msgid "Invalid params"
6639
  msgstr ""
6640
 
6641
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:608
6642
  msgid "Invalid course"
6643
  msgstr ""
6644
 
6645
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:620
6646
  msgid "You can't retry course"
6647
  msgstr ""
6648
 
6649
- #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:646
6650
  msgid "Now you can learn this course"
6651
  msgstr ""
6652
 
@@ -6765,33 +6785,33 @@ msgid "Key features"
6765
  msgstr ""
6766
 
6767
  #: inc/templates/class-lp-template-course.php:347
6768
- #: inc/templates/class-lp-template-course.php:923
6769
  msgid "Target audiences"
6770
  msgstr ""
6771
 
6772
- #: inc/templates/class-lp-template-course.php:883
6773
  msgid "%d lesson"
6774
  msgid_plural "%d lessons"
6775
  msgstr[0] ""
6776
  msgstr[1] ""
6777
 
6778
- #: inc/templates/class-lp-template-course.php:887
6779
  msgid "%d quiz"
6780
  msgid_plural "%d quizzes"
6781
  msgstr[0] ""
6782
  msgstr[1] ""
6783
 
6784
- #: inc/templates/class-lp-template-course.php:891
6785
  msgid "%d student"
6786
  msgid_plural "%d students"
6787
  msgstr[0] ""
6788
  msgstr[1] ""
6789
 
6790
- #: inc/templates/class-lp-template-course.php:919
6791
  msgid "Features"
6792
  msgstr ""
6793
 
6794
- #: inc/templates/class-lp-template-course.php:1016
6795
  msgid "View More"
6796
  msgstr ""
6797
 
@@ -6870,7 +6890,7 @@ msgstr ""
6870
  msgid "Not enrolled"
6871
  msgstr ""
6872
 
6873
- #: inc/user/class-lp-profile.php:1109
6874
  msgid "User Avatar"
6875
  msgstr ""
6876
 
@@ -7008,47 +7028,47 @@ msgstr ""
7008
  msgid "You have already enrolled in this course"
7009
  msgstr ""
7010
 
7011
- #: inc/user/lp-user-functions.php:1204
7012
  msgid "Old password incorrect!"
7013
  msgstr ""
7014
 
7015
- #: inc/user/lp-user-functions.php:1210
7016
  msgid "Confirmation password incorrect!"
7017
  msgstr ""
7018
 
7019
- #: inc/user/lp-user-functions.php:1497
7020
  msgid "Invalid item id."
7021
  msgstr ""
7022
 
7023
- #: inc/user/lp-user-functions.php:1530
7024
  msgid "Invalid item data."
7025
  msgstr ""
7026
 
7027
- #: inc/user/lp-user-functions.php:1704
7028
  msgid "Invalid Course ID."
7029
  msgstr ""
7030
 
7031
- #: inc/user/lp-user-functions.php:1724
7032
  msgid "Invalid Quiz"
7033
  msgstr ""
7034
 
7035
- #: inc/user/lp-user-functions.php:2145
7036
  msgid "Facebook Profile"
7037
  msgstr ""
7038
 
7039
- #: inc/user/lp-user-functions.php:2148
7040
  msgid "Twitter Profile"
7041
  msgstr ""
7042
 
7043
- #: inc/user/lp-user-functions.php:2151
7044
  msgid "Google Profile"
7045
  msgstr ""
7046
 
7047
- #: inc/user/lp-user-functions.php:2154
7048
  msgid "Youtube Channel"
7049
  msgstr ""
7050
 
7051
- #: inc/user/lp-user-functions.php:2157
7052
  msgid "Linkedin Profile"
7053
  msgstr ""
7054
 
@@ -7204,11 +7224,11 @@ msgstr ""
7204
  msgid "Recent Courses"
7205
  msgstr ""
7206
 
7207
- #: learnpress.php:477
7208
  msgid "Documentation"
7209
  msgstr ""
7210
 
7211
- #: learnpress.php:489
7212
  msgid "LearnPress plugin base directory must be <strong>learnpress/learnpres.php</strong> (case sensitive) to ensure all functions work properly and fully operational (currently <strong>%s</strong>)"
7213
  msgstr ""
7214
 
@@ -7335,11 +7355,11 @@ msgctxt "payment method"
7335
  msgid "Secure Connection"
7336
  msgstr ""
7337
 
7338
- #: templates/checkout/review-order.php:19
7339
  msgid "Your order"
7340
  msgstr ""
7341
 
7342
- #: templates/checkout/review-order.php:85
7343
  #: templates/order/order-details.php:96
7344
  msgid "Subtotal"
7345
  msgstr ""
@@ -7615,11 +7635,11 @@ msgstr ""
7615
  msgid "Finish course"
7616
  msgstr ""
7617
 
7618
- #: templates/single-course/buttons/retry.php:22
7619
  msgid "Do you want to retake course"
7620
  msgstr ""
7621
 
7622
- #: templates/single-course/buttons/retry.php:37
7623
  msgid "Retake course"
7624
  msgstr ""
7625
 
@@ -7651,7 +7671,7 @@ msgctxt "course graduation"
7651
  msgid "un-graduated"
7652
  msgstr ""
7653
 
7654
- #: templates/single-course/instructor.php:23
7655
  msgid "About the Instructor"
7656
  msgstr ""
7657
 
@@ -7884,3 +7904,7 @@ msgstr ""
7884
  #: assets/js/dist/frontend/quiz.min.js:128
7885
  msgid "Submitting..."
7886
  msgstr ""
 
 
 
 
2
  # This file is distributed under the same license as the LearnPress plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: LearnPress 4.1.6.6-beta-3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/lp-doing\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-06-13T11:40:54+03:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: learnpress\n"
40
  msgid "http://thimpress.com"
41
  msgstr ""
42
 
43
+ #: config/settings/course.php:8
44
+ msgid "The site will be redirected to the URL added after clicking finish course button."
45
+ msgstr ""
46
+
47
+ #: config/settings/course.php:9
48
+ msgid "Set blank, the site will be redirected to the single course page"
49
+ msgstr ""
50
+
51
+ #: config/settings/course.php:19
52
+ #: inc/admin/settings/class-lp-settings-emails.php:64
53
+ #: inc/admin/settings/class-lp-settings-general.php:16
54
+ #: inc/admin/settings/class-lp-settings-payments.php:53
55
+ #: inc/admin/settings/class-lp-settings-profile.php:59
56
+ #: inc/admin/sub-menus/class-lp-submenu-statistics.php:26
57
+ #: inc/admin/views/meta-boxes/course/settings.php:22
58
+ #: inc/user/class-lp-profile.php:279
59
+ msgid "General"
60
+ msgstr ""
61
+
62
+ #: config/settings/course.php:23
63
+ msgid "Review courses"
64
+ msgstr ""
65
+
66
+ #: config/settings/course.php:24
67
+ msgid "Courses created by instructors will be pending in review first."
68
+ msgstr ""
69
+
70
+ #: config/settings/course.php:30
71
+ msgid "Auto start"
72
+ msgstr ""
73
+
74
+ #: config/settings/course.php:34
75
+ msgid "Students will get started courses immediately after successfully purchased."
76
+ msgstr ""
77
+
78
+ #: config/settings/course.php:37
79
+ msgid "Enable confirmation popup finish course, complete item"
80
+ msgstr ""
81
+
82
+ #: config/settings/course.php:38
83
+ msgid "Show confirmation popup before finishing course or completing item."
84
+ msgstr ""
85
+
86
+ #: config/settings/course.php:44
87
+ msgid "Archive page layout"
88
+ msgstr ""
89
+
90
+ #: config/settings/course.php:45
91
+ msgid "Type display list course on Course Archive page"
92
+ msgstr ""
93
+
94
+ #: config/settings/course.php:52
95
+ msgid "Courses per page"
96
+ msgstr ""
97
+
98
+ #: config/settings/course.php:53
99
+ msgid "Number of courses displayed per page."
100
+ msgstr ""
101
+
102
+ #: config/settings/course.php:63
103
+ msgid "Enable loading ajax Courses on the Course Archive page"
104
+ msgstr ""
105
+
106
+ #: config/settings/course.php:64
107
+ msgid "On/Off <i>loading ajax Courses</i>"
108
+ msgstr ""
109
+
110
+ #: config/settings/course.php:70
111
+ msgid "Not run Ajax when reloading Course Archive page"
112
+ msgstr ""
113
+
114
+ #: config/settings/course.php:71
115
+ msgid "Ajax is only applied when selecting pagination, filtering, searching and sorting. Not applicable when reloading Course Archive page."
116
+ msgstr ""
117
+
118
+ #: config/settings/course.php:78
119
+ msgid "Thumbnail dimensions"
120
+ msgstr ""
121
+
122
+ #: config/settings/course.php:84
123
+ msgid "Redirect when finish course"
124
+ msgstr ""
125
+
126
+ #: config/settings/course.php:101
127
+ msgid "Curriculum Settings"
128
+ msgstr ""
129
+
130
+ #: config/settings/course.php:105
131
+ msgid "Section Per Page"
132
+ msgstr ""
133
+
134
+ #: config/settings/course.php:109
135
+ msgid "Number of sections displayed per page ( Enter -1 for display all sections)."
136
+ msgstr ""
137
+
138
+ #: config/settings/course.php:112
139
+ msgid "Course Item Per Page"
140
+ msgstr ""
141
+
142
+ #: config/settings/course.php:116
143
+ msgid "Number of course items displayed per page in section ( Enter -1 for display all course items)."
144
+ msgstr ""
145
+
146
+ #: config/settings/course.php:128
147
+ #: inc/admin/settings/class-lp-settings-profile.php:145
148
+ msgid "Permalinks"
149
+ msgstr ""
150
+
151
+ #: config/settings/course.php:132
152
+ #: inc/admin/lp-admin-functions.php:57
153
+ #: inc/admin/meta-box/fields/course-permalink.php:27
154
+ #: inc/admin/settings/class-lp-settings-advanced.php:65
155
+ #: inc/admin/views/statistics/orders.php:48
156
+ #: inc/admin/views/user/courses.php:39
157
+ #: inc/custom-post-types/abstract.php:663
158
+ #: inc/custom-post-types/quiz.php:237
159
+ #: templates/emails/order-items-table.php:85
160
+ #: templates/order/order-details.php:25
161
+ msgid "Course"
162
+ msgstr ""
163
+
164
+ #: config/settings/course.php:138
165
+ #: inc/admin/settings/class-lp-settings-advanced.php:72
166
+ #: inc/course/lp-course-functions.php:464
167
+ #: inc/custom-post-types/lesson.php:158
168
+ #: inc/lp-core-functions.php:402
169
+ #: inc/lp-template-functions.php:1067
170
+ msgid "Lesson"
171
+ msgstr ""
172
+
173
+ #: config/settings/course.php:146
174
+ #: inc/admin/settings/class-lp-settings-advanced.php:79
175
+ #: inc/course/lp-course-functions.php:465
176
+ #: inc/custom-post-types/question.php:320
177
+ #: inc/custom-post-types/quiz.php:87
178
+ #: inc/lp-core-functions.php:403
179
+ #: inc/lp-template-functions.php:1057
180
+ #: templates/profile/tabs/quizzes.php:54
181
+ msgid "Quiz"
182
+ msgstr ""
183
+
184
+ #: config/settings/course.php:154
185
+ msgid "Category base"
186
+ msgstr ""
187
+
188
+ #: config/settings/course.php:162
189
+ msgid "Tag base"
190
+ msgstr ""
191
+
192
  #: config/settings/general.php:13
193
  msgid "Pages setup"
194
  msgstr ""
224
  #: config/settings/general.php:57
225
  #: config/settings/general.php:62
226
  #: inc/admin/views/setup/setup-paypal.php:28
227
+ #: inc/admin/views/setup/steps/currency.php:18
228
+ #: inc/admin/views/setup/steps/currency.php:22
229
  msgid "Currency"
230
  msgstr ""
231
 
234
  msgstr ""
235
 
236
  #: config/settings/general.php:70
237
+ #: inc/admin/views/setup/steps/currency.php:38
238
  msgid "Currency position"
239
  msgstr ""
240
 
293
  msgstr ""
294
 
295
  #: inc/abstract-settings.php:89
296
+ #: inc/settings/abstract-settings-page.php:51
297
  msgid "No setting available."
298
  msgstr ""
299
 
313
  msgid "The following these functions %1$s do not exists in %2$s"
314
  msgstr ""
315
 
316
+ #: inc/admin/class-lp-admin-ajax.php:383
317
  msgid "Ops! ID not found"
318
  msgstr ""
319
 
320
+ #: inc/admin/class-lp-admin-ajax.php:426
321
  msgid "Duplicate post fail, please try again"
322
  msgstr ""
323
 
324
+ #: inc/admin/class-lp-admin-ajax.php:593
325
  msgid "Access denied"
326
  msgstr ""
327
 
328
+ #: inc/admin/class-lp-admin-ajax.php:599
329
  msgid "Check nonce failed"
330
  msgstr ""
331
 
332
+ #: inc/admin/class-lp-admin-ajax.php:605
333
+ #: inc/admin/class-lp-admin-ajax.php:656
334
  #: templates/order/order-details.php:15
335
  msgid "Invalid order"
336
  msgstr ""
337
 
338
+ #: inc/admin/class-lp-admin-ajax.php:650
339
  msgid "Permission denied"
340
  msgstr ""
341
 
342
+ #: inc/admin/class-lp-admin-ajax.php:892
343
+ #: inc/admin/class-lp-admin-ajax.php:1084
344
  msgid "Edit Page"
345
  msgstr ""
346
 
347
+ #: inc/admin/class-lp-admin-ajax.php:893
348
+ #: inc/admin/class-lp-admin-ajax.php:1086
349
  msgid "View Page"
350
  msgstr ""
351
 
352
+ #: inc/admin/class-lp-admin-ajax.php:895
353
  msgid "Error! Page creation failed. Please try again."
354
  msgstr ""
355
 
356
+ #: inc/admin/class-lp-admin-ajax.php:898
357
  msgid "Empty page name!"
358
  msgstr ""
359
 
435
  #: inc/admin/class-lp-admin.php:249
436
  #: inc/admin/views/meta-boxes/fields/date.php:35
437
  #: inc/class-lp-assets.php:73
438
+ #: inc/lp-core-functions.php:2157
439
+ #: inc/lp-core-functions.php:3184
440
  #: inc/order/class-lp-order.php:954
441
  #: assets/js/dist/frontend/quiz.min.js:44
442
  msgid "Cancel"
479
 
480
  #: inc/admin/class-lp-admin.php:312
481
  #: inc/admin/lp-admin-actions.php:217
 
482
  #: inc/admin/settings/class-lp-settings-profile.php:150
483
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:21
484
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:28
485
+ #: inc/class-lp-page-controller.php:279
486
  #: inc/custom-post-types/course.php:107
487
  #: inc/custom-post-types/course.php:109
488
  #: inc/lp-template-functions.php:370
489
+ #: inc/settings/class-lp-settings-courses.php:16
490
  #: inc/user/class-lp-profile.php:246
491
  #: inc/user/class-lp-profile.php:597
492
  msgid "Courses"
574
  #: inc/admin/views/meta-boxes/quiz/assigned.php:28
575
  #: inc/admin/views/meta-boxes/quiz/assigned.php:37
576
  #: inc/admin/views/user/courses.php:20
577
+ #: inc/custom-post-types/abstract.php:692
578
+ #: inc/custom-post-types/abstract.php:811
579
+ #: inc/custom-post-types/abstract.php:820
580
  #: inc/custom-post-types/question.php:366
581
  #: inc/order/class-lp-order.php:946
582
  msgid "View"
583
  msgstr ""
584
 
585
  #: inc/admin/class-lp-install-sample-data.php:193
586
+ #: inc/attributes/course.php:245
587
+ #: inc/custom-post-types/abstract.php:690
588
  #: inc/custom-post-types/question.php:364
589
  #: templates/content-lesson/content.php:20
590
  #: assets/js/dist/frontend/quiz.min.js:87
635
 
636
  #: inc/admin/class-lp-modal-search-items.php:183
637
  #: inc/admin/class-lp-modal-search-users.php:141
638
+ #: inc/lp-core-functions.php:787
639
  msgid "<"
640
  msgstr ""
641
 
642
  #: inc/admin/class-lp-modal-search-items.php:184
643
  #: inc/admin/class-lp-modal-search-users.php:142
644
+ #: inc/lp-core-functions.php:788
645
  msgid ">"
646
  msgstr ""
647
 
721
 
722
  #: inc/admin/class-lp-plugin-install-list-table.php:490
723
  #: inc/class-lp-datetime.php:209
724
+ #: inc/custom-post-types/order.php:755
725
  #: inc/order/class-lp-order.php:150
726
  #: inc/user-item/class-lp-user-item.php:240
727
  msgid "%s ago"
876
  msgstr ""
877
 
878
  #: inc/admin/lp-admin-actions.php:222
879
+ #: inc/custom-post-types/course.php:554
880
  msgid "Categories"
881
  msgstr ""
882
 
889
  msgid "Duplicate"
890
  msgstr ""
891
 
 
 
 
 
 
 
 
 
 
 
 
 
 
892
  #: inc/admin/lp-admin-functions.php:79
893
  msgctxt "copy quiz"
894
  msgid "Duplicate"
1012
  #: inc/admin/views/statistics/orders.php:8
1013
  #: inc/admin/views/statistics/users.php:8
1014
  #: inc/admin/views/statistics/users.php:48
1015
+ #: inc/custom-post-types/course.php:533
1016
+ #: inc/custom-post-types/course.php:550
1017
  msgid "Students"
1018
  msgstr ""
1019
 
1082
  msgstr ""
1083
 
1084
  #: inc/admin/meta-box/fields/course-permalink.php:16
1085
+ #: inc/settings/class-lp-settings-courses.php:46
1086
  msgctxt "default-slug"
1087
  msgid "courses"
1088
  msgstr ""
1166
  #: inc/admin/meta-box/fields/list-emails.php:7
1167
  #: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:40
1168
  #: inc/admin/views/meta-boxes/order/exports-invoice.php:80
1169
+ #: inc/class-lp-checkout.php:305
1170
+ #: inc/class-lp-checkout.php:313
1171
  #: inc/lp-deprecated.php:2275
1172
  #: templates/checkout/account-register.php:25
1173
  #: templates/global/become-teacher-form.php:35
1184
  msgid "Description"
1185
  msgstr ""
1186
 
1187
+ #: inc/admin/meta-box/fields/list-emails.php:51
1188
  msgid "Manage"
1189
  msgstr ""
1190
 
1191
+ #: inc/admin/meta-box/fields/list-emails.php:58
1192
  msgid "Enable all"
1193
  msgstr ""
1194
 
1195
+ #: inc/admin/meta-box/fields/list-emails.php:59
1196
  msgid "Disable all"
1197
  msgstr ""
1198
 
1202
 
1203
  #: inc/admin/meta-box/fields/payment-order.php:10
1204
  #: inc/emails/class-lp-email.php:1029
1205
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:425
1206
  msgid "Enable/Disable"
1207
  msgstr ""
1208
 
1232
  msgid "Enable gutenberg"
1233
  msgstr ""
1234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1235
  #: inc/admin/settings/class-lp-settings-advanced.php:86
1236
  #: inc/custom-post-types/question.php:207
1237
  #: inc/custom-post-types/quiz.php:174
1263
  msgid "Question navigation position is sticky, if not right below the quiz content"
1264
  msgstr ""
1265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1266
  #: inc/admin/settings/class-lp-settings-emails.php:25
1267
  #: inc/admin/settings/class-lp-settings-emails.php:165
1268
  msgid "Emails"
1359
  msgstr ""
1360
 
1361
  #: inc/admin/settings/class-lp-settings-profile.php:89
1362
+ #: inc/user/lp-user-functions.php:1976
1363
+ #: inc/user/lp-user-functions.php:1978
1364
  #: templates/profile/tabs/settings/basic-information.php:33
1365
  msgid "First name"
1366
  msgstr ""
1367
 
1368
  #: inc/admin/settings/class-lp-settings-profile.php:96
1369
+ #: inc/user/lp-user-functions.php:1989
1370
+ #: inc/user/lp-user-functions.php:1991
1371
  #: templates/profile/tabs/settings/basic-information.php:39
1372
  msgid "Last name"
1373
  msgstr ""
1374
 
1375
  #: inc/admin/settings/class-lp-settings-profile.php:103
1376
  #: inc/admin/settings/class-lp-settings-profile.php:115
1377
+ #: inc/user/lp-user-functions.php:2002
1378
+ #: inc/user/lp-user-functions.php:2004
1379
  #: templates/profile/tabs/settings/basic-information.php:45
1380
  msgid "Display name"
1381
  msgstr ""
1445
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:22
1446
  #: inc/admin/sub-menus/class-lp-submenu-statistics.php:29
1447
  #: inc/class-lp-gdpr.php:183
1448
+ #: inc/custom-post-types/order.php:816
1449
+ #: inc/custom-post-types/order.php:817
1450
+ #: inc/custom-post-types/order.php:821
1451
  #: inc/user/class-lp-profile.php:260
1452
  msgid "Orders"
1453
  msgstr ""
1462
  #: inc/admin/settings/class-lp-settings-profile.php:188
1463
  #: inc/admin/sub-menus/class-lp-submenu-settings.php:18
1464
  #: inc/user/class-lp-profile.php:274
1465
+ #: learnpress.php:484
1466
  msgid "Settings"
1467
  msgstr ""
1468
 
1521
  msgstr ""
1522
 
1523
  #: inc/admin/sub-menus/class-lp-submenu-addons.php:14
1524
+ #: learnpress.php:486
1525
  msgid "Add-ons"
1526
  msgstr ""
1527
 
1756
 
1757
  #: inc/admin/views/meta-boxes/course/assigned.php:29
1758
  #: inc/admin/views/meta-boxes/quiz/assigned.php:48
1759
+ #: inc/custom-post-types/abstract.php:710
1760
  #: inc/custom-post-types/question.php:369
1761
  msgid "Not assigned yet"
1762
  msgstr ""
1779
 
1780
  #: inc/admin/views/meta-boxes/course/settings.php:50
1781
  #: inc/admin/views/meta-boxes/course/settings.php:367
1782
+ #: inc/custom-post-types/course.php:531
1783
+ #: inc/custom-post-types/course.php:548
1784
  #: inc/custom-post-types/lesson.php:221
1785
  #: inc/custom-post-types/question.php:319
1786
  #: inc/custom-post-types/quiz.php:236
1792
  #: inc/admin/views/meta-boxes/quiz/settings.php:17
1793
  #: inc/custom-post-types/lesson.php:227
1794
  #: inc/custom-post-types/quiz.php:239
1795
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1066
1796
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:500
1797
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:636
1798
  msgid "Duration"
1799
  msgstr ""
1972
 
1973
  #: inc/admin/views/meta-boxes/course/settings.php:451
1974
  #: inc/templates/class-lp-template-course.php:301
1975
+ #: inc/templates/class-lp-template-course.php:919
1976
  #: inc/widgets/course-extra.php:35
1977
  msgid "Requirements"
1978
  msgstr ""
2006
 
2007
  #: inc/admin/views/meta-boxes/fields/extra-faq.php:41
2008
  #: inc/admin/views/meta-boxes/fields/extra-faq.php:61
2009
+ #: inc/custom-post-types/course.php:532
2010
+ #: inc/custom-post-types/course.php:549
2011
  #: inc/external-plugin/elementor/widgets/become-a-teacher.php:26
2012
  #: inc/external-plugin/elementor/widgets/list-courses.php:32
2013
  msgid "Content"
2033
  msgstr ""
2034
 
2035
  #: inc/admin/views/meta-boxes/lesson/settings.php:29
2036
+ #: inc/custom-post-types/abstract.php:832
2037
  #: inc/custom-post-types/lesson.php:130
2038
  #: inc/custom-post-types/lesson.php:230
2039
  #: inc/lp-template-functions.php:1070
2040
  #: templates/loop/single-course/loop-section-item.php:31
2041
+ #: templates/single-course/section/item-meta.php:32
2042
  msgid "Preview"
2043
  msgstr ""
2044
 
2081
 
2082
  #: inc/admin/views/meta-boxes/order/child-order.php:23
2083
  #: inc/class-lp-gdpr.php:453
2084
+ #: inc/custom-post-types/order.php:664
2085
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1306
2086
  #: templates/emails/order-items-table.php:72
2087
  #: templates/emails/plain/order-items-table.php:58
2088
  #: templates/profile/tabs/orders/list.php:31
2103
  #: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:71
2104
  #: inc/admin/views/meta-boxes/order/details.php:153
2105
  #: inc/custom-post-types/course.php:79
2106
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:358
2107
  #: templates/checkout/order-received.php:60
2108
  msgid "Item"
2109
  msgstr ""
2129
 
2130
  #: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:104
2131
  #: inc/admin/views/meta-boxes/order/details.php:156
2132
+ #: inc/custom-post-types/order.php:663
2133
  #: templates/checkout/order-received.php:107
2134
+ #: templates/checkout/review-order.php:103
2135
  #: templates/emails/order-items-table.php:118
2136
  #: templates/emails/plain/order-items-table.php:88
2137
  #: templates/order/order-details.php:26
2297
  msgid "Quiz Settings"
2298
  msgstr ""
2299
 
2300
+ #: inc/admin/views/meta-boxes/quiz/settings.php:18
2301
+ msgid "Set 0 for no limit, larger than 0 for limit"
2302
+ msgstr ""
2303
+
2304
  #: inc/admin/views/meta-boxes/quiz/settings.php:30
2305
  msgid "The condition that must be achieved in order to be passed the quiz."
2306
  msgstr ""
2540
  msgid "Test publish key"
2541
  msgstr ""
2542
 
2543
+ #: inc/admin/views/setup/steps/currency.php:52
2544
  msgid "Thousands Separator"
2545
  msgstr ""
2546
 
2547
+ #: inc/admin/views/setup/steps/currency.php:57
2548
  msgid "Decimals Separator"
2549
  msgstr ""
2550
 
2551
+ #: inc/admin/views/setup/steps/currency.php:62
2552
  msgid "Number of Decimals"
2553
  msgstr ""
2554
 
2692
  msgstr ""
2693
 
2694
  #: inc/admin/views/statistics/orders.php:47
2695
+ #: inc/custom-post-types/order.php:662
2696
  #: templates/checkout/order-received.php:94
2697
  #: templates/profile/tabs/orders/list.php:32
2698
  #: templates/profile/tabs/quizzes.php:57
2700
  msgstr ""
2701
 
2702
  #: inc/admin/views/statistics/orders.php:49
2703
+ #: inc/custom-post-types/course.php:166
2704
  msgid "Course Category"
2705
  msgstr ""
2706
 
2775
  msgstr ""
2776
 
2777
  #: inc/admin/views/user/courses.php:40
2778
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1312
2779
  msgid "Start time"
2780
  msgstr ""
2781
 
2782
  #: inc/admin/views/user/courses.php:41
2783
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1318
2784
  #: templates/profile/tabs/courses/course-list.php:25
2785
  msgid "End time"
2786
  msgstr ""
2805
  msgstr ""
2806
 
2807
  #: inc/attributes/course.php:140
2808
+ #: inc/attributes/course.php:308
 
2809
  #: inc/attributes/course.php:321
2810
+ #: inc/attributes/course.php:323
2811
  msgid "Attributes"
2812
  msgstr ""
2813
 
2815
  msgid "No terms found."
2816
  msgstr ""
2817
 
2818
+ #: inc/attributes/course.php:244
2819
  msgid "Edit &#8220;%s&#8221;"
2820
  msgstr ""
2821
 
2822
+ #: inc/attributes/course.php:251
2823
  msgid "Clear"
2824
  msgstr ""
2825
 
2826
+ #: inc/attributes/course.php:266
2827
  msgid "Terms"
2828
  msgstr ""
2829
 
2830
+ #: inc/attributes/course.php:319
2831
+ #: inc/attributes/course.php:322
2832
  msgid "Attribute"
2833
  msgstr ""
2834
 
2835
+ #: inc/attributes/course.php:324
2836
  msgid "Add New Attribute"
2837
  msgstr ""
2838
 
2839
+ #: inc/attributes/course.php:325
2840
  msgid "All Attributes"
2841
  msgstr ""
2842
 
2843
+ #: inc/attributes/course.php:371
2844
  msgid "Search Course %s"
2845
  msgstr ""
2846
 
2847
+ #: inc/attributes/course.php:372
2848
  msgid "All Course %s"
2849
  msgstr ""
2850
 
2851
+ #: inc/attributes/course.php:373
2852
  msgid "Parent Course %s"
2853
  msgstr ""
2854
 
2855
+ #: inc/attributes/course.php:374
2856
  msgid "Parent Course %s:"
2857
  msgstr ""
2858
 
2859
+ #: inc/attributes/course.php:375
2860
  msgid "Edit Course %s"
2861
  msgstr ""
2862
 
2863
+ #: inc/attributes/course.php:376
2864
  msgid "Update Course %s"
2865
  msgstr ""
2866
 
2867
+ #: inc/attributes/course.php:377
2868
  msgid "Add New Course %s"
2869
  msgstr ""
2870
 
2871
+ #: inc/attributes/course.php:378
2872
  msgid "New Course %s"
2873
  msgstr ""
2874
 
2875
+ #: inc/attributes/course.php:379
2876
  msgid "No &quot;Course %s&quot; found"
2877
  msgstr ""
2878
 
2957
  msgid "Error! You cannot finish this course. Please contact your administrator for more information."
2958
  msgstr ""
2959
 
2960
+ #: inc/class-lp-ajax.php:282
2961
  msgid "Error! Invalid lesson or failed security check."
2962
  msgstr ""
2963
 
2964
+ #: inc/class-lp-ajax.php:293
2965
  msgid "Congrats! You have completed \"%s\"."
2966
  msgstr ""
2967
 
2968
  #: inc/class-lp-assets.php:72
2969
+ #: inc/lp-core-functions.php:2156
2970
+ #: inc/lp-core-functions.php:3183
2971
  #: assets/js/dist/frontend/quiz.min.js:41
2972
  msgid "OK"
2973
  msgstr ""
2974
 
2975
  #: inc/class-lp-assets.php:74
2976
  #: inc/class-lp-gdpr.php:464
2977
+ #: inc/lp-core-functions.php:2158
2978
+ #: inc/lp-core-functions.php:3185
2979
  #: templates/global/lp-modal-overlay.php:24
2980
  msgid "Yes"
2981
  msgstr ""
2982
 
2983
  #: inc/class-lp-assets.php:75
2984
  #: inc/class-lp-gdpr.php:464
2985
+ #: inc/lp-core-functions.php:2159
2986
+ #: inc/lp-core-functions.php:3186
2987
  #: templates/global/lp-modal-overlay.php:23
2988
  msgid "No"
2989
  msgstr ""
3001
  msgstr ""
3002
 
3003
  #: inc/class-lp-assets.php:87
3004
+ #: inc/class-lp-checkout.php:626
3005
  msgid "Invalid field"
3006
  msgstr ""
3007
 
3042
  msgid "Page %d"
3043
  msgstr ""
3044
 
3045
+ #: inc/class-lp-checkout.php:302
3046
  msgid "Your session has expired."
3047
  msgstr ""
3048
 
3049
+ #: inc/class-lp-checkout.php:306
3050
+ #: inc/class-lp-checkout.php:310
3051
  #: templates/checkout/account-register.php:28
3052
  #: templates/checkout/account-register.php:29
3053
  #: templates/global/form-register.php:32
3055
  msgid "Username"
3056
  msgstr ""
3057
 
3058
+ #: inc/class-lp-checkout.php:307
3059
+ #: inc/class-lp-checkout.php:311
3060
  #: inc/user/class-lp-profile.php:286
3061
  #: templates/checkout/account-login.php:30
3062
  #: templates/checkout/account-login.php:31
3071
  msgid "Password"
3072
  msgstr ""
3073
 
3074
+ #: inc/class-lp-checkout.php:308
3075
  #: templates/checkout/account-register.php:36
3076
  #: templates/global/form-register.php:40
3077
  msgid "Confirm Password"
3078
  msgstr ""
3079
 
3080
+ #: inc/class-lp-checkout.php:366
3081
+ #: inc/class-lp-checkout.php:376
3082
+ #: inc/class-lp-checkout.php:441
3083
  msgid "Error %d: Unable to create order. Please try again."
3084
  msgstr ""
3085
 
3086
+ #: inc/class-lp-checkout.php:456
3087
  msgid "Unable to checkout. Order creation failed."
3088
  msgstr ""
3089
 
3090
+ #: inc/class-lp-checkout.php:515
3091
+ #: inc/class-lp-checkout.php:523
3092
+ #: inc/class-lp-checkout.php:531
3093
+ #: inc/class-lp-checkout.php:535
3094
+ #: inc/class-lp-checkout.php:545
3095
+ #: inc/class-lp-checkout.php:553
3096
+ #: inc/class-lp-checkout.php:561
3097
  msgid "%s is required field."
3098
  msgstr ""
3099
 
3100
+ #: inc/class-lp-checkout.php:517
3101
+ #: inc/class-lp-checkout.php:525
3102
  msgid "%s is exists."
3103
  msgstr ""
3104
 
3105
+ #: inc/class-lp-checkout.php:519
3106
  msgid "%s is not a valid username."
3107
  msgstr ""
3108
 
3109
+ #: inc/class-lp-checkout.php:527
3110
  msgid "%s is not a valid email."
3111
  msgstr ""
3112
 
3113
+ #: inc/class-lp-checkout.php:549
3114
  msgid "%s is not exists."
3115
  msgstr ""
3116
 
3117
+ #: inc/class-lp-checkout.php:563
3118
  msgid "Your email is not a valid."
3119
  msgstr ""
3120
 
3121
+ #: inc/class-lp-checkout.php:652
3122
  msgid "No payment method is selected"
3123
  msgstr ""
3124
 
3125
+ #: inc/class-lp-checkout.php:686
3126
  #: templates/checkout/empty-cart.php:16
3127
  msgid "Your cart is currently empty."
3128
  msgstr ""
3129
 
3130
+ #: inc/class-lp-checkout.php:695
3131
  msgid "Type item buy invalid!"
3132
  msgstr ""
3133
 
3340
  msgid "Grade"
3341
  msgstr ""
3342
 
3343
+ #: inc/class-lp-page-controller.php:168
3344
  #: inc/course/lp-course-functions.php:176
3345
  msgctxt "slug"
3346
  msgid "uncategorized"
3347
  msgstr ""
3348
 
3349
+ #: inc/class-lp-page-controller.php:277
3350
  #: inc/lp-template-functions.php:368
3351
  msgid "Course Search Results"
3352
  msgstr ""
3353
 
3354
+ #: inc/class-lp-page-controller.php:346
3355
  msgid "No payment method is available."
3356
  msgstr ""
3357
 
3458
  msgid "Unread"
3459
  msgstr ""
3460
 
3461
+ #: inc/course/lp-course-functions.php:770
3462
  msgid "Edit this item"
3463
  msgstr ""
3464
 
3465
+ #: inc/course/lp-course-functions.php:1014
3466
+ #: inc/lp-core-functions.php:2560
3467
  #: inc/templates/class-lp-template-profile.php:103
3468
  #: inc/user-item/class-lp-user-item-quiz.php:147
3469
  #: inc/user-item/class-lp-user-item.php:816
3473
  msgid "Passed"
3474
  msgstr ""
3475
 
3476
+ #: inc/course/lp-course-functions.php:1017
3477
+ #: inc/lp-core-functions.php:2563
3478
  #: inc/templates/class-lp-template-profile.php:104
3479
  #: inc/user-item/class-lp-user-item-quiz.php:148
3480
  #: inc/user-item/class-lp-user-item.php:817
3484
  msgid "Failed"
3485
  msgstr ""
3486
 
3487
+ #: inc/course/lp-course-functions.php:1020
3488
+ #: inc/lp-core-functions.php:2566
3489
  #: inc/lp-deprecated.php:403
3490
  #: inc/templates/class-lp-template-profile.php:101
3491
  #: inc/user-item/class-lp-user-item-quiz.php:144
3496
  msgid "In Progress"
3497
  msgstr ""
3498
 
3499
+ #: inc/course/lp-course-functions.php:1100
3500
  msgid "lessons completed per total number of lessons."
3501
  msgstr ""
3502
 
3503
+ #: inc/course/lp-course-functions.php:1103
3504
  msgid "quizzes passed per total number of quizzes."
3505
  msgstr ""
3506
 
3507
+ #: inc/course/lp-course-functions.php:1106
3508
  msgid "Final Quiz"
3509
  msgstr ""
3510
 
3511
+ #: inc/course/lp-course-functions.php:1109
3512
  msgid "correct answers per total number of questions."
3513
  msgstr ""
3514
 
3515
+ #: inc/course/lp-course-functions.php:1112
3516
  msgid "score achieved per total score of the questions."
3517
  msgstr ""
3518
 
3519
+ #: inc/course/lp-course-functions.php:1121
3520
  msgid "Require"
3521
  msgstr ""
3522
 
3654
  msgid "Invalid quiz."
3655
  msgstr ""
3656
 
3657
+ #: inc/custom-post-types/abstract.php:338
3658
  msgid "This item has already assigned to course. It will be removed from course if it is not published."
3659
  msgstr ""
3660
 
3661
+ #: inc/custom-post-types/abstract.php:353
3662
  msgid "This question has already assigned to quiz. It will be removed from quiz if it is not published."
3663
  msgstr ""
3664
 
3665
+ #: inc/custom-post-types/abstract.php:589
3666
  msgid "Unknown"
3667
  msgstr ""
3668
 
3669
+ #: inc/custom-post-types/abstract.php:672
3670
  msgid "Course (%1$d %2$s)"
3671
  msgid_plural "Course (%1$d %2$s)"
3672
  msgstr[0] ""
3673
  msgstr[1] ""
3674
 
3675
+ #: inc/custom-post-types/abstract.php:704
3676
  msgid "Remove Filter"
3677
  msgstr ""
3678
 
3679
+ #: inc/custom-post-types/abstract.php:791
3680
+ #: inc/custom-post-types/abstract.php:794
3681
  msgid "updated."
3682
  msgstr ""
3683
 
3684
+ #: inc/custom-post-types/abstract.php:792
3685
  msgid "Custom field updated."
3686
  msgstr ""
3687
 
3688
+ #: inc/custom-post-types/abstract.php:793
3689
  msgid "Custom field deleted."
3690
  msgstr ""
3691
 
3692
  #. translators: %s: date and time of the revision
3693
+ #: inc/custom-post-types/abstract.php:796
3694
  msgid "Lesson restored to revision from %s"
3695
  msgstr ""
3696
 
3697
+ #: inc/custom-post-types/abstract.php:797
3698
  msgid "published."
3699
  msgstr ""
3700
 
3701
+ #: inc/custom-post-types/abstract.php:798
3702
  msgid "saved."
3703
  msgstr ""
3704
 
3705
+ #: inc/custom-post-types/abstract.php:799
3706
  msgid "submitted."
3707
  msgstr ""
3708
 
3709
+ #: inc/custom-post-types/abstract.php:801
3710
  msgid "scheduled for: <strong>%1$s</strong>."
3711
  msgstr ""
3712
 
3713
  #. translators: Publish box date format, see http://php.net/date
3714
+ #: inc/custom-post-types/abstract.php:803
3715
  msgid "M j, Y @ G:i"
3716
  msgstr ""
3717
 
3718
+ #: inc/custom-post-types/abstract.php:805
3719
  msgid "draft updated."
3720
  msgstr ""
3721
 
3775
 
3776
  #: inc/custom-post-types/course.php:112
3777
  #: inc/custom-post-types/lesson.php:162
3778
+ #: inc/custom-post-types/order.php:823
3779
  #: inc/custom-post-types/question.php:211
3780
  msgid "Add New"
3781
  msgstr ""
3800
  msgid "No course found in Trash"
3801
  msgstr ""
3802
 
3803
+ #: inc/custom-post-types/course.php:120
3804
+ #: inc/settings/class-lp-settings-courses.php:32
3805
+ msgctxt "slug"
3806
+ msgid "courses"
3807
+ msgstr ""
3808
+
3809
+ #: inc/custom-post-types/course.php:163
3810
+ #: inc/custom-post-types/course.php:165
3811
  msgid "Course Categories"
3812
  msgstr ""
3813
 
3814
+ #: inc/custom-post-types/course.php:167
3815
  #: templates/single-course/meta/category.php:15
3816
  msgid "Category"
3817
  msgstr ""
3818
 
3819
+ #: inc/custom-post-types/course.php:168
3820
  msgid "Add New Course Category"
3821
  msgstr ""
3822
 
3823
+ #: inc/custom-post-types/course.php:169
3824
  msgid "All Categories"
3825
  msgstr ""
3826
 
3827
+ #: inc/custom-post-types/course.php:181
3828
  msgctxt "slug"
3829
  msgid "course-category"
3830
  msgstr ""
3831
 
3832
+ #: inc/custom-post-types/course.php:195
3833
+ #: inc/custom-post-types/course.php:209
3834
  msgid "Course Tags"
3835
  msgstr ""
3836
 
3837
+ #: inc/custom-post-types/course.php:196
3838
  #: inc/custom-post-types/question.php:184
3839
  #: inc/custom-post-types/question.php:185
3840
  msgid "Tag"
3841
  msgstr ""
3842
 
3843
+ #: inc/custom-post-types/course.php:197
3844
  msgid "Search Course Tags"
3845
  msgstr ""
3846
 
3847
+ #: inc/custom-post-types/course.php:198
3848
  msgid "Popular Course Tags"
3849
  msgstr ""
3850
 
3851
+ #: inc/custom-post-types/course.php:199
3852
  msgid "All Course Tags"
3853
  msgstr ""
3854
 
3855
+ #: inc/custom-post-types/course.php:202
3856
  msgid "Edit Course Tag"
3857
  msgstr ""
3858
 
3859
+ #: inc/custom-post-types/course.php:203
3860
  msgid "Update Course Tag"
3861
  msgstr ""
3862
 
3863
+ #: inc/custom-post-types/course.php:204
3864
  msgid "Add New Course Tag"
3865
  msgstr ""
3866
 
3867
+ #: inc/custom-post-types/course.php:205
3868
  msgid "New Course Tag Name"
3869
  msgstr ""
3870
 
3871
+ #: inc/custom-post-types/course.php:206
3872
  msgid "Separate tags with commas"
3873
  msgstr ""
3874
 
3875
+ #: inc/custom-post-types/course.php:207
3876
  msgid "Add or remove tags"
3877
  msgstr ""
3878
 
3879
+ #: inc/custom-post-types/course.php:208
3880
  msgid "Choose from the most used tags"
3881
  msgstr ""
3882
 
3883
+ #: inc/custom-post-types/course.php:219
3884
  msgctxt "slug"
3885
  msgid "course-tag"
3886
  msgstr ""
3887
 
3888
+ #: inc/custom-post-types/course.php:534
3889
+ #: inc/custom-post-types/course.php:551
3890
  #: templates/emails/order-items-table.php:87
3891
  msgid "Price"
3892
  msgstr ""
3893
 
3894
+ #: inc/custom-post-types/course.php:540
3895
+ #: inc/custom-post-types/course.php:543
3896
  msgid "Thumbnail"
3897
  msgstr ""
3898
 
3899
+ #: inc/custom-post-types/course.php:585
3900
  msgid "<strong>%d</strong> section"
3901
  msgid_plural "<strong>%d</strong> sections"
3902
  msgstr[0] ""
3903
  msgstr[1] ""
3904
 
3905
+ #: inc/custom-post-types/course.php:601
3906
  msgid "<strong>%d</strong> "
3907
  msgid_plural "<strong>%d</strong> "
3908
  msgstr[0] ""
3909
  msgstr[1] ""
3910
 
3911
+ #: inc/custom-post-types/course.php:627
3912
  msgid "No content"
3913
  msgstr ""
3914
 
3915
+ #: inc/custom-post-types/course.php:646
3916
  #: inc/lp-template-functions.php:67
3917
  msgid "Curriculum"
3918
  msgstr ""
3981
  msgstr ""
3982
 
3983
  #: inc/custom-post-types/order.php:574
3984
+ #: inc/custom-post-types/order.php:822
3985
  msgid "View Order"
3986
  msgstr ""
3987
 
3988
+ #: inc/custom-post-types/order.php:590
3989
  msgid "View child orders"
3990
  msgstr ""
3991
 
3992
+ #: inc/custom-post-types/order.php:659
3993
+ #: inc/custom-post-types/order.php:818
3994
  #: templates/profile/tabs/orders/list.php:29
3995
  msgid "Order"
3996
  msgstr ""
3997
 
3998
+ #: inc/custom-post-types/order.php:660
3999
  msgid "Student"
4000
  msgstr ""
4001
 
4002
+ #: inc/custom-post-types/order.php:661
4003
  #: inc/lp-deprecated.php:372
4004
  msgid "Purchased"
4005
  msgstr ""
4006
 
4007
+ #: inc/custom-post-types/order.php:714
4008
  #: inc/order/class-lp-order.php:458
4009
  msgid "(Guest)"
4010
  msgstr ""
4011
 
4012
+ #: inc/custom-post-types/order.php:770
4013
  #: templates/checkout/order-received.php:71
4014
  msgid "Course does not exist"
4015
  msgstr ""
4016
 
4017
+ #: inc/custom-post-types/order.php:772
4018
  msgid "Deleted"
4019
  msgstr ""
4020
 
4021
+ #: inc/custom-post-types/order.php:788
4022
  #: templates/checkout/order-received.php:88
4023
  msgid "(No item)"
4024
  msgstr ""
4025
 
4026
+ #: inc/custom-post-types/order.php:798
4027
  msgid "Pay via <strong>%s</strong>"
4028
  msgstr ""
4029
 
4030
+ #: inc/custom-post-types/order.php:819
4031
  msgid "Add New Order"
4032
  msgstr ""
4033
 
4034
+ #: inc/custom-post-types/order.php:820
4035
+ #: inc/custom-post-types/order.php:987
4036
  #: templates/order/order-details.php:20
4037
  msgid "Order Details"
4038
  msgstr ""
4039
 
4040
+ #: inc/custom-post-types/order.php:824
4041
  msgid "Update Order"
4042
  msgstr ""
4043
 
4044
+ #: inc/custom-post-types/order.php:825
4045
  msgid "Search Orders"
4046
  msgstr ""
4047
 
4048
+ #: inc/custom-post-types/order.php:826
4049
  msgid "No order found"
4050
  msgstr ""
4051
 
4052
+ #: inc/custom-post-types/order.php:827
4053
  msgid "No order found in Trash"
4054
  msgstr ""
4055
 
4056
+ #: inc/custom-post-types/order.php:995
4057
  msgid "Order Actions"
4058
  msgstr ""
4059
 
4060
+ #: inc/custom-post-types/order.php:1003
4061
  msgid "Order Exports"
4062
  msgstr ""
4063
 
4372
  #: inc/emails/instructor/class-lp-email-finished-course-instructor.php:25
4373
  #: inc/emails/instructor/class-lp-email-new-order-instructor.php:21
4374
  #: inc/lp-template-functions.php:73
4375
+ #: templates/single-course/meta/instructor.php:23
4376
  msgid "Instructor"
4377
  msgstr ""
4378
 
4659
  msgid "Pay with PayPal"
4660
  msgstr ""
4661
 
4662
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:302
4663
  msgid "IPN payment completed"
4664
  msgstr ""
4665
 
4666
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:429
4667
  msgid "Enable PayPal Standard"
4668
  msgstr ""
4669
 
4670
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:432
4671
  msgid "PayPal email"
4672
  msgstr ""
4673
 
4674
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:437
4675
  msgid "Sandbox mode"
4676
  msgstr ""
4677
 
4678
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:441
4679
  msgid "Enable PayPal sandbox"
4680
  msgstr ""
4681
 
4682
+ #: inc/gateways/paypal/class-lp-gateway-paypal.php:444
4683
  msgid "Sandbox email address"
4684
  msgstr ""
4685
 
4723
  msgid "The email address of the user."
4724
  msgstr ""
4725
 
4726
+ #: inc/jwt/includes/class-jwt-public.php:155
4727
+ #: inc/jwt/includes/class-jwt-public.php:300
4728
+ msgid "LearnPress JWT is not configurated properly, please contact the admin"
4729
  msgstr ""
4730
 
4731
+ #: inc/jwt/includes/class-jwt-public.php:271
4732
+ msgid "Authorization header not found."
 
4733
  msgstr ""
4734
 
4735
+ #: inc/jwt/includes/class-jwt-public.php:287
4736
+ msgid "Authentication token is missing."
 
4737
  msgstr ""
4738
 
4739
+ #: inc/jwt/includes/class-jwt-public.php:315
4740
+ msgid "The iss do not match with this server"
 
4741
  msgstr ""
4742
 
4743
+ #: inc/jwt/includes/class-jwt-public.php:326
4744
+ msgid "User ID not found in the token"
 
4745
  msgstr ""
4746
 
4747
+ #: inc/jwt/includes/class-jwt-public.php:336
4748
+ msgid "Token must have an expiration."
4749
  msgstr ""
4750
 
4751
+ #: inc/jwt/includes/class-jwt-public.php:346
4752
+ msgid "Token has expired."
4753
  msgstr ""
4754
 
4755
+ #: inc/jwt/includes/class-jwt-public.php:361
4756
  msgid "Valid access token."
4757
  msgstr ""
4758
 
4760
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:64
4761
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:89
4762
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:114
4763
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:986
4764
  #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:32
4765
  #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:58
4766
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:430
4767
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:32
4768
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:197
4769
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:32
4804
  msgstr ""
4805
 
4806
  #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:347
4807
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:422
4808
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:585
4809
  msgid "Error: Can't add Course to cart."
4810
  msgstr ""
4811
 
4862
  msgid "%s secs"
4863
  msgstr ""
4864
 
4865
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:992
4866
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:436
4867
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:203
4868
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:572
4869
  msgid "Course name."
4870
  msgstr ""
4871
 
4872
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:997
4873
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:441
4874
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:208
4875
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:577
4876
  msgid "Course slug."
4877
  msgstr ""
4878
 
4879
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1002
4880
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:446
4881
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:213
4882
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:582
4883
  msgid "Course URL."
4884
  msgstr ""
4885
 
4886
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1009
4887
  msgid "Course Image URL."
4888
  msgstr ""
4889
 
4890
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1015
4891
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:453
4892
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:220
4893
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:589
4894
  msgid "The date the Course was created, in the site's timezone."
4895
  msgstr ""
4896
 
4897
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1022
4898
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:459
4899
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:226
4900
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:595
4901
  msgid "The date the Course was created, as GMT."
4902
  msgstr ""
4903
 
4904
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1029
4905
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:465
4906
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:232
4907
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:601
4908
  msgid "The date the Course was last modified, in the site's timezone."
4909
  msgstr ""
4910
 
4911
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1036
4912
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:471
4913
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:238
4914
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:607
4915
  msgid "The date the Course was last modified, as GMT."
4916
  msgstr ""
4917
 
4918
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1043
4919
  msgid "Shows if the course is on sale."
4920
  msgstr ""
4921
 
4922
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1049
4923
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:477
4924
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:244
4925
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:613
4926
  msgid "Course status (post status)."
4927
  msgstr ""
4928
 
4929
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1056
4930
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:484
4931
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:251
4932
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:620
4933
  msgid "Content course."
4934
  msgstr ""
4935
 
4936
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1061
4937
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:489
4938
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:256
4939
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:625
4940
  msgid "Retrieves the course excerpt.."
4941
  msgstr ""
4942
 
4943
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1071
4944
  msgid "Count student enrolled"
4945
  msgstr ""
4946
 
4947
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1077
4948
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:494
4949
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:630
4950
  msgid "Can finish course"
4951
  msgstr ""
4952
 
4953
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1083
4954
  msgid "Can retake course"
4955
  msgstr ""
4956
 
4957
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1089
4958
  msgid "Total retake"
4959
  msgstr ""
4960
 
4961
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1095
4962
  msgid "Retaken"
4963
  msgstr ""
4964
 
4965
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1101
4966
  msgid "Course Review add-on"
4967
  msgstr ""
4968
 
4969
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1107
4970
  msgid "Course Price"
4971
  msgstr ""
4972
 
4973
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1113
4974
  msgid "Course Origin Price"
4975
  msgstr ""
4976
 
4977
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1119
4978
  msgid "Course Sale Price"
4979
  msgstr ""
4980
 
4981
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1125
4982
  msgid "List of categories."
4983
  msgstr ""
4984
 
4985
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1132
4986
  msgid "Category ID."
4987
  msgstr ""
4988
 
4989
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1137
4990
  msgid "Category name."
4991
  msgstr ""
4992
 
4993
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1143
4994
  msgid "Category slug."
4995
  msgstr ""
4996
 
4997
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1152
4998
  msgid "List of tags."
4999
  msgstr ""
5000
 
5001
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1159
5002
  msgid "Tag ID."
5003
  msgstr ""
5004
 
5005
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1164
5006
  msgid "Tag name."
5007
  msgstr ""
5008
 
5009
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1170
5010
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1197
5011
  msgid "Tag slug."
5012
  msgstr ""
5013
 
5014
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1179
5015
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1212
5016
  msgid "Retrieves the course sections and items.."
5017
  msgstr ""
5018
 
5019
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1186
5020
  msgid "User ID."
5021
  msgstr ""
5022
 
5023
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1191
5024
  msgid "Display name."
5025
  msgstr ""
5026
 
5027
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1203
5028
  msgid "Social Infor."
5029
  msgstr ""
5030
 
5031
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1219
5032
  #: inc/jwt/rest-api/version1/class-lp-rest-section-items-v1-controller.php:14
5033
  msgid "Section ID."
5034
  msgstr ""
5035
 
5036
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1224
5037
  #: inc/jwt/rest-api/version1/class-lp-rest-sections-v1-controller.php:122
5038
  msgid "Section name."
5039
  msgstr ""
5040
 
5041
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1229
5042
  #: inc/jwt/rest-api/version1/class-lp-rest-sections-v1-controller.php:14
5043
  msgid "Course ID."
5044
  msgstr ""
5045
 
5046
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1234
5047
  #: inc/jwt/rest-api/version1/class-lp-rest-sections-v1-controller.php:127
5048
  msgid "Section description."
5049
  msgstr ""
5050
 
5051
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1239
5052
  msgid "Section items."
5053
  msgstr ""
5054
 
5055
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1244
5056
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1259
5057
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:510
5058
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:266
5059
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:646
5060
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:682
5061
  msgid "Item ID."
5062
  msgstr ""
5063
 
5064
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1249
5065
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:687
5066
  msgid "Item Type."
5067
  msgstr ""
5068
 
5069
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1254
5070
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:692
5071
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:721
5072
  msgid "Item title."
5073
  msgstr ""
5074
 
5075
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1264
5076
  msgid "Percent."
5077
  msgstr ""
5078
 
5079
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1269
5080
  msgid "Duration."
5081
  msgstr ""
5082
 
5083
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1274
5084
  msgid "Graduation."
5085
  msgstr ""
5086
 
5087
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1279
5088
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:542
5089
  msgid "Status."
5090
  msgstr ""
5091
 
5092
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1284
5093
  msgid "Locked."
5094
  msgstr ""
5095
 
5096
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1294
5097
  msgid "List of course user data."
5098
  msgstr ""
5099
 
5100
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1301
5101
  msgid "Graduation"
5102
  msgstr ""
5103
 
5104
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1324
5105
  #: templates/profile/tabs/courses/course-list.php:24
5106
  msgid "Expiration time"
5107
  msgstr ""
5108
 
5109
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1344
5110
  msgid "Limit result set to courses assigned a specific category ID."
5111
  msgstr ""
5112
 
5113
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1350
5114
  msgid "Limit result set to courses assigned a specific tag ID."
5115
  msgstr ""
5116
 
5117
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1356
5118
  msgid "Filter by course to in-progress, passed, failed."
5119
  msgstr ""
5120
 
5121
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1363
5122
  #: inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php:602
5123
  msgid "Get item learned by user."
5124
  msgstr ""
5125
 
5126
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1369
5127
  msgid "Get item popularity."
5128
  msgstr ""
5129
 
5130
+ #: inc/jwt/rest-api/version1/class-lp-rest-courses-v1-controller.php:1374
5131
  msgid "Disable some fields schema."
5132
  msgstr ""
5133
 
5152
  msgid "Congrats! You complete lesson is successfully"
5153
  msgstr ""
5154
 
5155
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:505
5156
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:261
5157
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:641
5158
  msgid "Assigned."
5159
  msgstr ""
5160
 
5161
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:515
5162
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:271
5163
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:651
5164
  msgid "Title."
5165
  msgstr ""
5166
 
5167
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:520
5168
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:276
5169
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:656
5170
  #: inc/jwt/rest-api/version1/class-lp-rest-section-items-v1-controller.php:223
5171
  msgid "Item slug."
5172
  msgstr ""
5173
 
5174
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:525
5175
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:281
5176
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:661
5177
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:697
5178
  msgid "Item Content."
5179
  msgstr ""
5180
 
5181
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:530
5182
  #: inc/jwt/rest-api/version1/class-lp-rest-questions-v1-controller.php:286
5183
  #: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:666
5184
  msgid "Item Author."
5185
  msgstr ""
5186
 
5187
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:537
5188
  msgid "Retrieves the Lesson result.."
5189
  msgstr ""
5190
 
5191
+ #: inc/jwt/rest-api/version1/class-lp-rest-lessons-v1-controller.php:549
5192
+ msgid "Video intro."
5193
+ msgstr ""
5194
+
5195
  #: inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php:14
5196
  #: inc/jwt/rest-api/version1/class-lp-rest-posts-controller.php:475
5197
  msgid "Method '%s' not implemented. Must be overridden in subclass."
5424
  msgid "Your password has been updated, Please login again to continue!"
5425
  msgstr ""
5426
 
5427
+ #: inc/lp-core-functions.php:871
5428
  msgid "Minute(s)"
5429
  msgstr ""
5430
 
5431
+ #: inc/lp-core-functions.php:872
5432
  msgid "Hour(s)"
5433
  msgstr ""
5434
 
5435
+ #: inc/lp-core-functions.php:873
5436
  msgid "Day(s)"
5437
  msgstr ""
5438
 
5439
+ #: inc/lp-core-functions.php:874
5440
  msgid "Week(s)"
5441
  msgstr ""
5442
 
5443
+ #: inc/lp-core-functions.php:1020
5444
  msgid "Left"
5445
  msgstr ""
5446
 
5447
+ #: inc/lp-core-functions.php:1021
5448
  msgid "Right"
5449
  msgstr ""
5450
 
5451
+ #: inc/lp-core-functions.php:1022
5452
  msgid "Left with space"
5453
  msgstr ""
5454
 
5455
+ #: inc/lp-core-functions.php:1023
5456
  msgid "Right with space"
5457
  msgstr ""
5458
 
5459
+ #: inc/lp-core-functions.php:1082
5460
  msgid "Afghan afghani"
5461
  msgstr ""
5462
 
5463
+ #: inc/lp-core-functions.php:1083
5464
  msgid "Albanian lek"
5465
  msgstr ""
5466
 
5467
+ #: inc/lp-core-functions.php:1084
5468
  msgid "Algerian dinar"
5469
  msgstr ""
5470
 
5471
+ #: inc/lp-core-functions.php:1085
5472
  msgid "Euro"
5473
  msgstr ""
5474
 
5475
+ #: inc/lp-core-functions.php:1086
5476
  msgid "Angolan kwanza"
5477
  msgstr ""
5478
 
5479
+ #: inc/lp-core-functions.php:1087
5480
  msgid "East Caribbean dollar"
5481
  msgstr ""
5482
 
5483
+ #: inc/lp-core-functions.php:1088
5484
  msgid "Argentine peso"
5485
  msgstr ""
5486
 
5487
+ #: inc/lp-core-functions.php:1089
5488
  msgid "Armenian dram"
5489
  msgstr ""
5490
 
5491
+ #: inc/lp-core-functions.php:1090
5492
  msgid "Aruban florin"
5493
  msgstr ""
5494
 
5495
+ #: inc/lp-core-functions.php:1091
5496
  msgid "Australian dollar"
5497
  msgstr ""
5498
 
5499
+ #: inc/lp-core-functions.php:1092
5500
  msgid "Azerbaijani manat"
5501
  msgstr ""
5502
 
5503
+ #: inc/lp-core-functions.php:1093
5504
  msgid "Bahamian dollar"
5505
  msgstr ""
5506
 
5507
+ #: inc/lp-core-functions.php:1094
5508
  msgid "Bahraini dinar"
5509
  msgstr ""
5510
 
5511
+ #: inc/lp-core-functions.php:1095
5512
  msgid "Bangladeshi taka"
5513
  msgstr ""
5514
 
5515
+ #: inc/lp-core-functions.php:1096
5516
  msgid "Barbadian dollar"
5517
  msgstr ""
5518
 
5519
+ #: inc/lp-core-functions.php:1097
5520
  msgid "Belarusian ruble"
5521
  msgstr ""
5522
 
5523
+ #: inc/lp-core-functions.php:1098
5524
  msgid "Belizean dollar"
5525
  msgstr ""
5526
 
5527
+ #: inc/lp-core-functions.php:1099
5528
  msgid "West African CFA franc"
5529
  msgstr ""
5530
 
5531
+ #: inc/lp-core-functions.php:1100
5532
  msgid "Bermudian dollar"
5533
  msgstr ""
5534
 
5535
+ #: inc/lp-core-functions.php:1101
5536
  msgid "Bhutanese ngultrum"
5537
  msgstr ""
5538
 
5539
+ #: inc/lp-core-functions.php:1102
5540
  msgid "Bolivian boliviano"
5541
  msgstr ""
5542
 
5543
+ #: inc/lp-core-functions.php:1103
5544
  msgid "US dollar"
5545
  msgstr ""
5546
 
5547
+ #: inc/lp-core-functions.php:1104
5548
  msgid "Bosnia and Herzegovina convertible mark"
5549
  msgstr ""
5550
 
5551
+ #: inc/lp-core-functions.php:1105
5552
  msgid "Botswana pula"
5553
  msgstr ""
5554
 
5555
+ #: inc/lp-core-functions.php:1106
5556
  msgid "Brazilian real"
5557
  msgstr ""
5558
 
5559
+ #: inc/lp-core-functions.php:1107
5560
  msgid "Brunei dollar"
5561
  msgstr ""
5562
 
5563
+ #: inc/lp-core-functions.php:1108
5564
  msgid "Bulgarian lev"
5565
  msgstr ""
5566
 
5567
+ #: inc/lp-core-functions.php:1109
5568
  msgid "Burmese kyat"
5569
  msgstr ""
5570
 
5571
+ #: inc/lp-core-functions.php:1110
5572
  msgid "Burundian franc"
5573
  msgstr ""
5574
 
5575
+ #: inc/lp-core-functions.php:1111
5576
  msgid "Cambodian riel"
5577
  msgstr ""
5578
 
5579
+ #: inc/lp-core-functions.php:1112
5580
  msgid "Central African CFA franc"
5581
  msgstr ""
5582
 
5583
+ #: inc/lp-core-functions.php:1113
5584
  msgid "Canadian dollar"
5585
  msgstr ""
5586
 
5587
+ #: inc/lp-core-functions.php:1114
5588
  msgid "Cape Verdean escudo"
5589
  msgstr ""
5590
 
5591
+ #: inc/lp-core-functions.php:1115
5592
  msgid "Cayman Islands dollar"
5593
  msgstr ""
5594
 
5595
+ #: inc/lp-core-functions.php:1116
5596
  msgid "Chilean peso"
5597
  msgstr ""
5598
 
5599
+ #: inc/lp-core-functions.php:1117
5600
  msgid "Chinese renminbi"
5601
  msgstr ""
5602
 
5603
+ #: inc/lp-core-functions.php:1118
5604
  msgid "Colombian peso"
5605
  msgstr ""
5606
 
5607
+ #: inc/lp-core-functions.php:1119
5608
  msgid "Comorian franc"
5609
  msgstr ""
5610
 
5611
+ #: inc/lp-core-functions.php:1120
5612
  msgid "Congolese franc"
5613
  msgstr ""
5614
 
5615
+ #: inc/lp-core-functions.php:1121
5616
  msgid "New Zealand dollar"
5617
  msgstr ""
5618
 
5619
+ #: inc/lp-core-functions.php:1122
5620
  msgid "Costa Rican colón"
5621
  msgstr ""
5622
 
5623
+ #: inc/lp-core-functions.php:1123
5624
  msgid "Croatian kuna"
5625
  msgstr ""
5626
 
5627
+ #: inc/lp-core-functions.php:1124
5628
  msgid "Cuban peso"
5629
  msgstr ""
5630
 
5631
+ #: inc/lp-core-functions.php:1125
5632
  msgid "Netherlands Antilles guilder"
5633
  msgstr ""
5634
 
5635
+ #: inc/lp-core-functions.php:1126
5636
  msgid "Czech koruna"
5637
  msgstr ""
5638
 
5639
+ #: inc/lp-core-functions.php:1127
5640
  msgid "Danish krone"
5641
  msgstr ""
5642
 
5643
+ #: inc/lp-core-functions.php:1128
5644
  msgid "Djiboutian franc"
5645
  msgstr ""
5646
 
5647
+ #: inc/lp-core-functions.php:1129
5648
  msgid "Dominican peso"
5649
  msgstr ""
5650
 
5651
+ #: inc/lp-core-functions.php:1130
5652
  msgid "Egyptian pound"
5653
  msgstr ""
5654
 
5655
+ #: inc/lp-core-functions.php:1131
5656
  msgid "Salvadoran colón"
5657
  msgstr ""
5658
 
5659
+ #: inc/lp-core-functions.php:1132
5660
  msgid "Eritrean nakfa"
5661
  msgstr ""
5662
 
5663
+ #: inc/lp-core-functions.php:1133
5664
  msgid "Ethiopian birr"
5665
  msgstr ""
5666
 
5667
+ #: inc/lp-core-functions.php:1134
5668
  msgid "Falkland Islands pound"
5669
  msgstr ""
5670
 
5671
+ #: inc/lp-core-functions.php:1135
5672
  msgid "Fijian dollar"
5673
  msgstr ""
5674
 
5675
+ #: inc/lp-core-functions.php:1136
5676
  msgid "CFP franc"
5677
  msgstr ""
5678
 
5679
+ #: inc/lp-core-functions.php:1137
5680
  msgid "Gambian dalasi"
5681
  msgstr ""
5682
 
5683
+ #: inc/lp-core-functions.php:1138
5684
  msgid "Georgian lari"
5685
  msgstr ""
5686
 
5687
+ #: inc/lp-core-functions.php:1139
5688
  msgid "Ghanian cedi"
5689
  msgstr ""
5690
 
5691
+ #: inc/lp-core-functions.php:1140
5692
  msgid "Gibraltar pound"
5693
  msgstr ""
5694
 
5695
+ #: inc/lp-core-functions.php:1141
5696
  msgid "Guatemalan quetzal"
5697
  msgstr ""
5698
 
5699
+ #: inc/lp-core-functions.php:1142
5700
  msgid "British pound"
5701
  msgstr ""
5702
 
5703
+ #: inc/lp-core-functions.php:1143
5704
  msgid "Guinean franc"
5705
  msgstr ""
5706
 
5707
+ #: inc/lp-core-functions.php:1144
5708
  msgid "Guyanese dollar"
5709
  msgstr ""
5710
 
5711
+ #: inc/lp-core-functions.php:1145
5712
  msgid "Haitian gourde"
5713
  msgstr ""
5714
 
5715
+ #: inc/lp-core-functions.php:1146
5716
  msgid "Honduran lempira"
5717
  msgstr ""
5718
 
5719
+ #: inc/lp-core-functions.php:1147
5720
  msgid "Hong Kong dollar"
5721
  msgstr ""
5722
 
5723
+ #: inc/lp-core-functions.php:1148
5724
  msgid "Hungarian forint"
5725
  msgstr ""
5726
 
5727
+ #: inc/lp-core-functions.php:1149
5728
  msgid "Icelandic króna"
5729
  msgstr ""
5730
 
5731
+ #: inc/lp-core-functions.php:1150
5732
  msgid "Indian rupee"
5733
  msgstr ""
5734
 
5735
+ #: inc/lp-core-functions.php:1151
5736
  msgid "Indonesian rupiah"
5737
  msgstr ""
5738
 
5739
+ #: inc/lp-core-functions.php:1152
5740
  msgid "Iranian rial"
5741
  msgstr ""
5742
 
5743
+ #: inc/lp-core-functions.php:1153
5744
  msgid "Iraqi dinar"
5745
  msgstr ""
5746
 
5747
+ #: inc/lp-core-functions.php:1154
5748
  msgid "Israeli new sheqel"
5749
  msgstr ""
5750
 
5751
+ #: inc/lp-core-functions.php:1155
5752
  msgid "Jamaican dollar"
5753
  msgstr ""
5754
 
5755
+ #: inc/lp-core-functions.php:1156
5756
  msgid "Japanese yen "
5757
  msgstr ""
5758
 
5759
+ #: inc/lp-core-functions.php:1157
5760
  msgid "Jordanian dinar"
5761
  msgstr ""
5762
 
5763
+ #: inc/lp-core-functions.php:1158
5764
  msgid "Kazakhstani tenge"
5765
  msgstr ""
5766
 
5767
+ #: inc/lp-core-functions.php:1159
5768
  msgid "Kenyan shilling"
5769
  msgstr ""
5770
 
5771
+ #: inc/lp-core-functions.php:1160
5772
  msgid "North Korean won"
5773
  msgstr ""
5774
 
5775
+ #: inc/lp-core-functions.php:1161
5776
  msgid "Kuwaiti dinar"
5777
  msgstr ""
5778
 
5779
+ #: inc/lp-core-functions.php:1162
5780
  msgid "Kyrgyzstani som"
5781
  msgstr ""
5782
 
5783
+ #: inc/lp-core-functions.php:1163
5784
  msgid "South Korean won"
5785
  msgstr ""
5786
 
5787
+ #: inc/lp-core-functions.php:1164
5788
  msgid "Lao kip"
5789
  msgstr ""
5790
 
5791
+ #: inc/lp-core-functions.php:1165
5792
  msgid "Latvian lats"
5793
  msgstr ""
5794
 
5795
+ #: inc/lp-core-functions.php:1166
5796
  msgid "Lebanese pound"
5797
  msgstr ""
5798
 
5799
+ #: inc/lp-core-functions.php:1167
5800
  msgid "Lesotho loti"
5801
  msgstr ""
5802
 
5803
+ #: inc/lp-core-functions.php:1168
5804
  msgid "Liberian dollar"
5805
  msgstr ""
5806
 
5807
+ #: inc/lp-core-functions.php:1169
5808
+ #: inc/lp-core-functions.php:1240
5809
  msgid "Libyan dinar"
5810
  msgstr ""
5811
 
5812
+ #: inc/lp-core-functions.php:1170
5813
  msgid "Swiss franc"
5814
  msgstr ""
5815
 
5816
+ #: inc/lp-core-functions.php:1171
5817
  msgid "Lithuanian litas"
5818
  msgstr ""
5819
 
5820
+ #: inc/lp-core-functions.php:1172
5821
  msgid "Macanese pataca"
5822
  msgstr ""
5823
 
5824
+ #: inc/lp-core-functions.php:1173
5825
  msgid "Macedonian denar"
5826
  msgstr ""
5827
 
5828
+ #: inc/lp-core-functions.php:1174
5829
  msgid "Malagasy ariary"
5830
  msgstr ""
5831
 
5832
+ #: inc/lp-core-functions.php:1175
5833
  msgid "Malawian kwacha"
5834
  msgstr ""
5835
 
5836
+ #: inc/lp-core-functions.php:1176
5837
  msgid "Malaysian ringgit"
5838
  msgstr ""
5839
 
5840
+ #: inc/lp-core-functions.php:1177
5841
  msgid "Maldivian rufiyaa"
5842
  msgstr ""
5843
 
5844
+ #: inc/lp-core-functions.php:1178
5845
  msgid "Mauritanian ouguiya"
5846
  msgstr ""
5847
 
5848
+ #: inc/lp-core-functions.php:1179
5849
  msgid "Mauritian rupee"
5850
  msgstr ""
5851
 
5852
+ #: inc/lp-core-functions.php:1180
5853
  msgid "Mexican peso"
5854
  msgstr ""
5855
 
5856
+ #: inc/lp-core-functions.php:1181
5857
  msgid "Moldovan leu"
5858
  msgstr ""
5859
 
5860
+ #: inc/lp-core-functions.php:1182
5861
  msgid "Mongolian tugrik"
5862
  msgstr ""
5863
 
5864
+ #: inc/lp-core-functions.php:1183
5865
  msgid "Moroccan dirham"
5866
  msgstr ""
5867
 
5868
+ #: inc/lp-core-functions.php:1184
5869
  msgid "Mozambican metical"
5870
  msgstr ""
5871
 
5872
+ #: inc/lp-core-functions.php:1185
5873
  msgid "Namibian dollar"
5874
  msgstr ""
5875
 
5876
+ #: inc/lp-core-functions.php:1186
5877
  msgid "Nepalese rupee"
5878
  msgstr ""
5879
 
5880
+ #: inc/lp-core-functions.php:1187
5881
  msgid "Nicaraguan córdoba"
5882
  msgstr ""
5883
 
5884
+ #: inc/lp-core-functions.php:1188
5885
  msgid "Nigerian naira"
5886
  msgstr ""
5887
 
5888
+ #: inc/lp-core-functions.php:1189
5889
  msgid "Norwegian krone"
5890
  msgstr ""
5891
 
5892
+ #: inc/lp-core-functions.php:1190
5893
  msgid "Omani rial"
5894
  msgstr ""
5895
 
5896
+ #: inc/lp-core-functions.php:1191
5897
  msgid "Pakistani rupee"
5898
  msgstr ""
5899
 
5900
+ #: inc/lp-core-functions.php:1192
5901
  msgid "Panamanian balboa"
5902
  msgstr ""
5903
 
5904
+ #: inc/lp-core-functions.php:1193
5905
  msgid "Papua New Guinea kina"
5906
  msgstr ""
5907
 
5908
+ #: inc/lp-core-functions.php:1194
5909
  msgid "Paraguayan guarani"
5910
  msgstr ""
5911
 
5912
+ #: inc/lp-core-functions.php:1195
5913
  msgid "Peruvian nuevo sol"
5914
  msgstr ""
5915
 
5916
+ #: inc/lp-core-functions.php:1196
5917
  msgid "Philippine peso"
5918
  msgstr ""
5919
 
5920
+ #: inc/lp-core-functions.php:1197
5921
  msgid "Polish zloty"
5922
  msgstr ""
5923
 
5924
+ #: inc/lp-core-functions.php:1198
5925
  msgid "Qatari riyal"
5926
  msgstr ""
5927
 
5928
+ #: inc/lp-core-functions.php:1199
5929
  msgid "Romanian leu"
5930
  msgstr ""
5931
 
5932
+ #: inc/lp-core-functions.php:1200
5933
  msgid "Russian ruble"
5934
  msgstr ""
5935
 
5936
+ #: inc/lp-core-functions.php:1201
5937
  msgid "Rwandan franc"
5938
  msgstr ""
5939
 
5940
+ #: inc/lp-core-functions.php:1202
5941
  msgid "Samoan tālā"
5942
  msgstr ""
5943
 
5944
+ #: inc/lp-core-functions.php:1203
5945
  msgid "São Tomé and Príncipe dobra"
5946
  msgstr ""
5947
 
5948
+ #: inc/lp-core-functions.php:1204
5949
  msgid "Saudi riyal"
5950
  msgstr ""
5951
 
5952
+ #: inc/lp-core-functions.php:1205
5953
  msgid "Serbian dinar"
5954
  msgstr ""
5955
 
5956
+ #: inc/lp-core-functions.php:1206
5957
  msgid "Seychellois rupee"
5958
  msgstr ""
5959
 
5960
+ #: inc/lp-core-functions.php:1207
5961
  msgid "Sierra Leonean leone"
5962
  msgstr ""
5963
 
5964
+ #: inc/lp-core-functions.php:1208
5965
  msgid "Singapore dollar"
5966
  msgstr ""
5967
 
5968
+ #: inc/lp-core-functions.php:1209
5969
  msgid "Solomon Islands dollar"
5970
  msgstr ""
5971
 
5972
+ #: inc/lp-core-functions.php:1210
5973
  msgid "Somali shilling"
5974
  msgstr ""
5975
 
5976
+ #: inc/lp-core-functions.php:1211
5977
  msgid "South African rand"
5978
  msgstr ""
5979
 
5980
+ #: inc/lp-core-functions.php:1212
5981
  msgid "Sri Lankan rupee"
5982
  msgstr ""
5983
 
5984
+ #: inc/lp-core-functions.php:1213
5985
  msgid "St. Helena pound"
5986
  msgstr ""
5987
 
5988
+ #: inc/lp-core-functions.php:1214
5989
  msgid "Sudanese pound"
5990
  msgstr ""
5991
 
5992
+ #: inc/lp-core-functions.php:1215
5993
  msgid "Surinamese dollar"
5994
  msgstr ""
5995
 
5996
+ #: inc/lp-core-functions.php:1216
5997
  msgid "Swazi lilangeni"
5998
  msgstr ""
5999
 
6000
+ #: inc/lp-core-functions.php:1217
6001
  msgid "Swedish krona"
6002
  msgstr ""
6003
 
6004
+ #: inc/lp-core-functions.php:1218
6005
  msgid "Syrian pound"
6006
  msgstr ""
6007
 
6008
+ #: inc/lp-core-functions.php:1219
6009
  msgid "New Taiwan dollar"
6010
  msgstr ""
6011
 
6012
+ #: inc/lp-core-functions.php:1220
6013
  msgid "Tajikistani somoni"
6014
  msgstr ""
6015
 
6016
+ #: inc/lp-core-functions.php:1221
6017
  msgid "Tanzanian shilling"
6018
  msgstr ""
6019
 
6020
+ #: inc/lp-core-functions.php:1222
6021
  msgid "Thai baht "
6022
  msgstr ""
6023
 
6024
+ #: inc/lp-core-functions.php:1223
6025
  msgid "Tongan pa’anga"
6026
  msgstr ""
6027
 
6028
+ #: inc/lp-core-functions.php:1224
6029
  msgid "Trinidad and Tobago dollar"
6030
  msgstr ""
6031
 
6032
+ #: inc/lp-core-functions.php:1225
6033
  msgid "Tunisian dinar"
6034
  msgstr ""
6035
 
6036
+ #: inc/lp-core-functions.php:1226
6037
  msgid "Turkish lira"
6038
  msgstr ""
6039
 
6040
+ #: inc/lp-core-functions.php:1227
6041
  msgid "Turkmenistani manat"
6042
  msgstr ""
6043
 
6044
+ #: inc/lp-core-functions.php:1228
6045
  msgid "Ugandan shilling"
6046
  msgstr ""
6047
 
6048
+ #: inc/lp-core-functions.php:1229
6049
  msgid "Ukrainian hryvnia"
6050
  msgstr ""
6051
 
6052
+ #: inc/lp-core-functions.php:1230
6053
  msgid "United Arab Emirates dirham"
6054
  msgstr ""
6055
 
6056
+ #: inc/lp-core-functions.php:1231
6057
  msgid "Uruguayan peso"
6058
  msgstr ""
6059
 
6060
+ #: inc/lp-core-functions.php:1232
6061
  msgid "Uzbekistani som"
6062
  msgstr ""
6063
 
6064
+ #: inc/lp-core-functions.php:1233
6065
  msgid "Vanuatu vatu"
6066
  msgstr ""
6067
 
6068
+ #: inc/lp-core-functions.php:1234
6069
  msgid "Venezuelan bolivar"
6070
  msgstr ""
6071
 
6072
+ #: inc/lp-core-functions.php:1235
6073
  msgid "Vietnamese dong"
6074
  msgstr ""
6075
 
6076
+ #: inc/lp-core-functions.php:1236
6077
  msgid "Yemeni rial"
6078
  msgstr ""
6079
 
6080
+ #: inc/lp-core-functions.php:1237
6081
  msgid "Zambian kwacha"
6082
  msgstr ""
6083
 
6084
+ #: inc/lp-core-functions.php:1238
6085
  msgid "Zimbabwean dollar"
6086
  msgstr ""
6087
 
6088
+ #: inc/lp-core-functions.php:1239
6089
  msgid "Jersey pound"
6090
  msgstr ""
6091
 
6092
+ #: inc/lp-core-functions.php:1550
6093
  #: inc/lp-template-functions.php:1690
6094
  msgid "%s week"
6095
  msgid_plural "%s weeks"
6096
  msgstr[0] ""
6097
  msgstr[1] ""
6098
 
6099
+ #: inc/lp-core-functions.php:1554
6100
  #: inc/lp-template-functions.php:1686
6101
  msgid "%s day"
6102
  msgid_plural "%s days"
6103
  msgstr[0] ""
6104
  msgstr[1] ""
6105
 
6106
+ #: inc/lp-core-functions.php:1559
6107
  #: inc/lp-template-functions.php:1681
6108
  msgid "%s hour"
6109
  msgid_plural "%s hours"
6110
  msgstr[0] ""
6111
  msgstr[1] ""
6112
 
6113
+ #: inc/lp-core-functions.php:1563
6114
  #: inc/lp-template-functions.php:1675
6115
  msgid "%s minute"
6116
  msgid_plural "%s minutes"
6117
  msgstr[0] ""
6118
  msgstr[1] ""
6119
 
6120
+ #: inc/lp-core-functions.php:2361
6121
  msgid "Cart"
6122
  msgstr ""
6123
 
6124
+ #: inc/lp-core-functions.php:2365
6125
  msgid "Enable cart"
6126
  msgstr ""
6127
 
6128
+ #: inc/lp-core-functions.php:2366
6129
  msgid "Check this option to enable user purchase multiple courses at one time."
6130
  msgstr ""
6131
 
6132
+ #: inc/lp-core-functions.php:2375
6133
  msgid "Add to cart redirect"
6134
  msgstr ""
6135
 
6136
+ #: inc/lp-core-functions.php:2376
6137
  msgid "Redirect to checkout immediately after adding course to cart."
6138
  msgstr ""
6139
 
6140
+ #: inc/lp-core-functions.php:2382
6141
  msgid "AJAX add to cart"
6142
  msgstr ""
6143
 
6144
+ #: inc/lp-core-functions.php:2383
6145
  msgid "Using AJAX to add course to cart."
6146
  msgstr ""
6147
 
6148
+ #: inc/lp-core-functions.php:2389
6149
  msgid "Cart page"
6150
  msgstr ""
6151
 
6152
+ #: inc/lp-core-functions.php:2760
6153
  msgctxt "static-page-name"
6154
  msgid "Checkout"
6155
  msgstr ""
6156
 
6157
+ #: inc/lp-core-functions.php:2761
6158
  msgctxt "static-page-name"
6159
  msgid "Courses"
6160
  msgstr ""
6161
 
6162
+ #: inc/lp-core-functions.php:2762
6163
  msgctxt "static-page-name"
6164
  msgid "Profile"
6165
  msgstr ""
6166
 
6167
+ #: inc/lp-core-functions.php:2763
6168
  msgctxt "static-page-name"
6169
  msgid "Become a Teacher"
6170
  msgstr ""
6171
 
6172
+ #: inc/lp-core-functions.php:3447
6173
  msgid "Loading..."
6174
  msgstr ""
6175
 
6176
+ #: inc/lp-core-functions.php:3450
6177
  msgid "Get Passing Grade"
6178
  msgstr ""
6179
 
6180
+ #: inc/lp-core-functions.php:3455
6181
  msgid "Evaluate by the number of lessons completed per total number of lessons."
6182
  msgstr ""
6183
 
6184
+ #: inc/lp-core-functions.php:3456
6185
  msgid "E.g: Course has 10 lessons and user completed 5 lessons then the result = 5/10 (50.%)"
6186
  msgstr ""
6187
 
6188
+ #: inc/lp-core-functions.php:3458
6189
  msgid "Evaluate by result of final quiz in the course. You have to add a quiz to the end of the course."
6190
  msgstr ""
6191
 
6192
+ #: inc/lp-core-functions.php:3464
6193
  msgid "Evaluate by the number of quizzes passed per total number of quizzes."
6194
  msgstr ""
6195
 
6196
+ #: inc/lp-core-functions.php:3465
6197
  msgid "E.g: The course has 10 quizzes and the user passed 5 quizzes then the result = 5/10 (50%)."
6198
  msgstr ""
6199
 
6200
+ #: inc/lp-core-functions.php:3472
6201
  msgid "Evaluate by total number of correct answers per total number of questions."
6202
  msgstr ""
6203
 
6204
+ #: inc/lp-core-functions.php:3473
6205
  msgid "E.g: Course has 10 questions. User correct 5 questions. Result is 5/10 (50%)."
6206
  msgstr ""
6207
 
6208
+ #: inc/lp-core-functions.php:3478
6209
  msgid "Evaluate by total score achieved per total score of the questions."
6210
  msgstr ""
6211
 
6212
+ #: inc/lp-core-functions.php:3484
6213
  msgid "Evaluate via lessons"
6214
  msgstr ""
6215
 
6216
+ #: inc/lp-core-functions.php:3488
6217
  msgid "Evaluate via results of the final quiz"
6218
  msgstr ""
6219
 
6220
+ #: inc/lp-core-functions.php:3492
6221
  msgid "Evaluate via quizzes passed"
6222
  msgstr ""
6223
 
6224
+ #: inc/lp-core-functions.php:3496
6225
  msgid "Evaluate via questions"
6226
  msgstr ""
6227
 
6228
+ #: inc/lp-core-functions.php:3500
6229
  msgid "Evaluate via mark"
6230
  msgstr ""
6231
 
6232
+ #: inc/lp-core-functions.php:3818
6233
  msgid "Heads up, Please backup before upgrade!"
6234
  msgstr ""
6235
 
6236
+ #: inc/lp-core-functions.php:3821
6237
  msgid "The latest update includes some substantial changes across different areas of the plugin. We highly recommend you backup your site before upgrading, and make sure you first update in a staging environment"
6238
  msgstr ""
6239
 
6240
+ #: inc/lp-core-functions.php:3822
6241
  msgid "Learners require WordPress version "
6242
  msgstr ""
6243
 
6585
  msgid "No course ID available"
6586
  msgstr ""
6587
 
6588
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:236
6589
  msgid "Showing only one result"
6590
  msgstr ""
6591
 
6592
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:239
6593
  msgid "Showing last course of %s results"
6594
  msgstr ""
6595
 
6596
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:242
6597
  msgid "Showing %1$s of %2$s results"
6598
  msgstr ""
6599
 
6600
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:368
6601
  msgid "Error: No course available!."
6602
  msgstr ""
6603
 
6604
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:376
6605
  msgid "Invalid course!"
6606
  msgstr ""
6607
 
6608
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:382
6609
  msgid "Error: Cannot enroll course."
6610
  msgstr ""
6611
 
6612
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:403
6613
  msgid "Error: Can't Enroll course."
6614
  msgstr ""
6615
 
6616
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:443
6617
  msgid "Congrats! You enroll course successfully. Redirecting..."
6618
  msgstr ""
6619
 
6620
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:461
6621
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:600
6622
  msgid "Error: Please setup page for checkout."
6623
  msgstr ""
6624
 
6625
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:466
6626
  msgid "Redirecting..."
6627
  msgstr ""
6628
 
6629
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:496
6630
  msgid "Error: Invalid Course ID."
6631
  msgstr ""
6632
 
6633
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:502
6634
  msgid "Error: No Course available."
6635
  msgstr ""
6636
 
6637
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:508
6638
  msgid "Error: Cannot purchase course!."
6639
  msgstr ""
6640
 
6641
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:546
6642
  msgid "Reset Course progress"
6643
  msgstr ""
6644
 
6645
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:552
6646
  msgid "Continue Course progress"
6647
  msgstr ""
6648
 
6649
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:560
6650
  msgid "Repurchase Options"
6651
  msgstr ""
6652
 
6653
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:607
6654
  msgid "\"%s\" has been added to your cart."
6655
  msgstr ""
6656
 
6657
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:632
6658
  msgid "Invalid params"
6659
  msgstr ""
6660
 
6661
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:638
6662
  msgid "Invalid course"
6663
  msgstr ""
6664
 
6665
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:650
6666
  msgid "You can't retry course"
6667
  msgstr ""
6668
 
6669
+ #: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:676
6670
  msgid "Now you can learn this course"
6671
  msgstr ""
6672
 
6785
  msgstr ""
6786
 
6787
  #: inc/templates/class-lp-template-course.php:347
6788
+ #: inc/templates/class-lp-template-course.php:927
6789
  msgid "Target audiences"
6790
  msgstr ""
6791
 
6792
+ #: inc/templates/class-lp-template-course.php:887
6793
  msgid "%d lesson"
6794
  msgid_plural "%d lessons"
6795
  msgstr[0] ""
6796
  msgstr[1] ""
6797
 
6798
+ #: inc/templates/class-lp-template-course.php:891
6799
  msgid "%d quiz"
6800
  msgid_plural "%d quizzes"
6801
  msgstr[0] ""
6802
  msgstr[1] ""
6803
 
6804
+ #: inc/templates/class-lp-template-course.php:895
6805
  msgid "%d student"
6806
  msgid_plural "%d students"
6807
  msgstr[0] ""
6808
  msgstr[1] ""
6809
 
6810
+ #: inc/templates/class-lp-template-course.php:923
6811
  msgid "Features"
6812
  msgstr ""
6813
 
6814
+ #: inc/templates/class-lp-template-course.php:1020
6815
  msgid "View More"
6816
  msgstr ""
6817
 
6890
  msgid "Not enrolled"
6891
  msgstr ""
6892
 
6893
+ #: inc/user/class-lp-profile.php:1111
6894
  msgid "User Avatar"
6895
  msgstr ""
6896
 
7028
  msgid "You have already enrolled in this course"
7029
  msgstr ""
7030
 
7031
+ #: inc/user/lp-user-functions.php:1205
7032
  msgid "Old password incorrect!"
7033
  msgstr ""
7034
 
7035
+ #: inc/user/lp-user-functions.php:1211
7036
  msgid "Confirmation password incorrect!"
7037
  msgstr ""
7038
 
7039
+ #: inc/user/lp-user-functions.php:1498
7040
  msgid "Invalid item id."
7041
  msgstr ""
7042
 
7043
+ #: inc/user/lp-user-functions.php:1531
7044
  msgid "Invalid item data."
7045
  msgstr ""
7046
 
7047
+ #: inc/user/lp-user-functions.php:1705
7048
  msgid "Invalid Course ID."
7049
  msgstr ""
7050
 
7051
+ #: inc/user/lp-user-functions.php:1725
7052
  msgid "Invalid Quiz"
7053
  msgstr ""
7054
 
7055
+ #: inc/user/lp-user-functions.php:2146
7056
  msgid "Facebook Profile"
7057
  msgstr ""
7058
 
7059
+ #: inc/user/lp-user-functions.php:2149
7060
  msgid "Twitter Profile"
7061
  msgstr ""
7062
 
7063
+ #: inc/user/lp-user-functions.php:2152
7064
  msgid "Google Profile"
7065
  msgstr ""
7066
 
7067
+ #: inc/user/lp-user-functions.php:2155
7068
  msgid "Youtube Channel"
7069
  msgstr ""
7070
 
7071
+ #: inc/user/lp-user-functions.php:2158
7072
  msgid "Linkedin Profile"
7073
  msgstr ""
7074
 
7224
  msgid "Recent Courses"
7225
  msgstr ""
7226
 
7227
+ #: learnpress.php:485
7228
  msgid "Documentation"
7229
  msgstr ""
7230
 
7231
+ #: learnpress.php:497
7232
  msgid "LearnPress plugin base directory must be <strong>learnpress/learnpres.php</strong> (case sensitive) to ensure all functions work properly and fully operational (currently <strong>%s</strong>)"
7233
  msgstr ""
7234
 
7355
  msgid "Secure Connection"
7356
  msgstr ""
7357
 
7358
+ #: templates/checkout/review-order.php:23
7359
  msgid "Your order"
7360
  msgstr ""
7361
 
7362
+ #: templates/checkout/review-order.php:89
7363
  #: templates/order/order-details.php:96
7364
  msgid "Subtotal"
7365
  msgstr ""
7635
  msgid "Finish course"
7636
  msgstr ""
7637
 
7638
+ #: templates/single-course/buttons/retry.php:25
7639
  msgid "Do you want to retake course"
7640
  msgstr ""
7641
 
7642
+ #: templates/single-course/buttons/retry.php:40
7643
  msgid "Retake course"
7644
  msgstr ""
7645
 
7671
  msgid "un-graduated"
7672
  msgstr ""
7673
 
7674
+ #: templates/single-course/instructor.php:26
7675
  msgid "About the Instructor"
7676
  msgstr ""
7677
 
7904
  #: assets/js/dist/frontend/quiz.min.js:128
7905
  msgid "Submitting..."
7906
  msgstr ""
7907
+
7908
+ #: assets/js/admin/admin.js:107
7909
+ msgid "Search by user"
7910
+ msgstr ""
learnpress.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://thimpress.com/learnpress
5
  * Description: LearnPress is a WordPress complete solution for creating a Learning Management System (LMS). It can help you to create courses, lessons and quizzes.
6
  * Author: ThimPress
7
- * Version: 4.1.6.5
8
  * Author URI: http://thimpress.com
9
  * Requires at least: 5.6
10
  * Tested up to: 6.0
@@ -287,6 +287,9 @@ if ( ! class_exists( 'LearnPress' ) ) {
287
  require_once 'inc/class-lp-debug.php';
288
 
289
  require_once 'inc/class-lp-settings.php';
 
 
 
290
  require_once 'inc/class-lp-global.php';
291
  require_once 'inc/class-lp-datetime.php';
292
 
@@ -325,7 +328,7 @@ if ( ! class_exists( 'LearnPress' ) ) {
325
 
326
  require_once 'inc/lp-webhooks.php';
327
  require_once 'inc/class-lp-request-handler.php';
328
- require_once 'inc/abstract-settings.php';
329
  require_once 'inc/admin/helpers/class-lp-plugins-helper.php';
330
 
331
  // Todo: tungnx check those files.
@@ -420,7 +423,7 @@ if ( ! class_exists( 'LearnPress' ) ) {
420
  require_once 'inc/admin/meta-box/class-lp-meta-box-helper.php';
421
 
422
  require_once 'inc/admin/class-lp-admin.php';
423
- require_once 'inc/admin/settings/abstract-settings-page.php';
424
 
425
  require_once 'inc/admin/class-lp-admin-ajax.php';
426
  }
4
  * Plugin URI: http://thimpress.com/learnpress
5
  * Description: LearnPress is a WordPress complete solution for creating a Learning Management System (LMS). It can help you to create courses, lessons and quizzes.
6
  * Author: ThimPress
7
+ * Version: 4.1.6.6
8
  * Author URI: http://thimpress.com
9
  * Requires at least: 5.6
10
  * Tested up to: 6.0
287
  require_once 'inc/class-lp-debug.php';
288
 
289
  require_once 'inc/class-lp-settings.php';
290
+ require_once 'inc/abstract-settings.php';
291
+ require_once 'inc/settings/abstract-settings-page.php';
292
+ require_once 'inc/settings/class-lp-settings-courses.php';
293
  require_once 'inc/class-lp-global.php';
294
  require_once 'inc/class-lp-datetime.php';
295
 
328
 
329
  require_once 'inc/lp-webhooks.php';
330
  require_once 'inc/class-lp-request-handler.php';
331
+
332
  require_once 'inc/admin/helpers/class-lp-plugins-helper.php';
333
 
334
  // Todo: tungnx check those files.
423
  require_once 'inc/admin/meta-box/class-lp-meta-box-helper.php';
424
 
425
  require_once 'inc/admin/class-lp-admin.php';
426
+ // require_once 'inc/admin/settings/abstract-settings-page.php';
427
 
428
  require_once 'inc/admin/class-lp-admin-ajax.php';
429
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: elearning, education, course, lms, learning management system
5
  Requires at least: 5.6
6
  Tested up to: 6.0
7
  Requires PHP: 7.0
8
- Stable tag: 4.1.6.5
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -203,6 +203,11 @@ https://www.transifex.com/projects/p/learnpress/
203
 
204
  == Changelog ==
205
 
 
 
 
 
 
206
  = 4.1.6.5 (2022-05-16) =
207
  ~ Fixed: error with block theme 2022.
208
  ~ Fixed: error with LP Addon Frontend Editor.
5
  Requires at least: 5.6
6
  Tested up to: 6.0
7
  Requires PHP: 7.0
8
+ Stable tag: 4.1.6.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
203
 
204
  == Changelog ==
205
 
206
+ = 4.1.6.6 (2022-06-13) =
207
+ ~ Fixed: security.
208
+ ~ Added: option "Enable loading ajax Courses on the Archive Course page".
209
+ ~ Added: option "No Page load Courses Ajax".
210
+
211
  = 4.1.6.5 (2022-05-16) =
212
  ~ Fixed: error with block theme 2022.
213
  ~ Fixed: error with LP Addon Frontend Editor.
templates/archive-course.php CHANGED
@@ -42,7 +42,7 @@ $page_title = learn_press_page_title( false );
42
  do_action( 'learn-press/before-courses-loop' );
43
  LP()->template( 'course' )->begin_courses_loop();
44
 
45
- if ( lp_is_archive_course_load_via_api() ) {
46
  echo '<div class="lp-archive-course-skeleton" style="width:100%">';
47
  echo lp_skeleton_animation_html( 10, 'random', 'height:20px', 'width:100%' );
48
  echo '</div>';
@@ -57,6 +57,12 @@ $page_title = learn_press_page_title( false );
57
  } else {
58
  LP()->template( 'course' )->no_courses_found();
59
  }
 
 
 
 
 
 
60
  }
61
 
62
  LP()->template( 'course' )->end_courses_loop();
42
  do_action( 'learn-press/before-courses-loop' );
43
  LP()->template( 'course' )->begin_courses_loop();
44
 
45
+ if ( LP_Settings_Courses::is_ajax_load_courses() && ! LP_Settings_Courses::is_no_load_ajax_first_courses() ) {
46
  echo '<div class="lp-archive-course-skeleton" style="width:100%">';
47
  echo lp_skeleton_animation_html( 10, 'random', 'height:20px', 'width:100%' );
48
  echo '</div>';
57
  } else {
58
  LP()->template( 'course' )->no_courses_found();
59
  }
60
+
61
+ if ( LP_Settings_Courses::is_ajax_load_courses() ) {
62
+ echo '<div class="lp-archive-course-skeleton no-first-load-ajax" style="width:100%; display: none">';
63
+ echo lp_skeleton_animation_html( 10, 'random', 'height:20px', 'width:100%' );
64
+ echo '</div>';
65
+ }
66
  }
67
 
68
  LP()->template( 'course' )->end_courses_loop();
templates/content-quiz/js.php CHANGED
@@ -10,7 +10,7 @@
10
  defined( 'ABSPATH' ) || exit;
11
 
12
  $user = learn_press_get_current_user();
13
- $course = LP_Global::course();
14
  if ( ! $course ) {
15
  return;
16
  }
10
  defined( 'ABSPATH' ) || exit;
11
 
12
  $user = learn_press_get_current_user();
13
+ $course = learn_press_get_course();
14
  if ( ! $course ) {
15
  return;
16
  }
templates/content-quiz/title.php CHANGED
@@ -12,7 +12,7 @@
12
  defined( 'ABSPATH' ) || exit();
13
 
14
  $quiz = LP_Global::course_item_quiz();
15
- $course = LP_Global::course();
16
  $title = $quiz->get_heading_title( 'display' );
17
 
18
  if ( ! $title ) {
12
  defined( 'ABSPATH' ) || exit();
13
 
14
  $quiz = LP_Global::course_item_quiz();
15
+ $course = learn_press_get_course();
16
  $title = $quiz->get_heading_title( 'display' );
17
 
18
  if ( ! $title ) {
templates/loop/course/instructor.php CHANGED
@@ -12,7 +12,6 @@
12
  defined( 'ABSPATH' ) || exit();
13
 
14
  $course = learn_press_get_course();
15
-
16
  if ( ! $course ) {
17
  return;
18
  }
12
  defined( 'ABSPATH' ) || exit();
13
 
14
  $course = learn_press_get_course();
 
15
  if ( ! $course ) {
16
  return;
17
  }
templates/loop/course/students.php CHANGED
@@ -15,7 +15,10 @@
15
  */
16
  defined( 'ABSPATH' ) || exit();
17
 
18
- $course = LP_Global::course();
 
 
 
19
  ?>
20
 
21
  <span class="course-students">
15
  */
16
  defined( 'ABSPATH' ) || exit();
17
 
18
+ $course = learn_press_get_course();
19
+ if ( ! $course ) {
20
+ return;
21
+ }
22
  ?>
23
 
24
  <span class="course-students">
templates/profile/tabs/settings/basic-information.php CHANGED
@@ -64,7 +64,7 @@ $user = $profile->get_user();
64
 
65
  <?php
66
  $custom_profile = lp_get_user_custom_register_fields( $user->ID );
67
- $custom_fields = LP()->settings()->get( 'register_profile_fields' );
68
 
69
  if ( $custom_fields ) {
70
  foreach ( $custom_fields as $field ) {
64
 
65
  <?php
66
  $custom_profile = lp_get_user_custom_register_fields( $user->ID );
67
+ $custom_fields = LP_Settings::instance()->get( 'register_profile_fields' );
68
 
69
  if ( $custom_fields ) {
70
  foreach ( $custom_fields as $field ) {
templates/single-course/buttons/continue.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
- $user = LP_Global::user();
15
  ?>
16
 
17
  <form name="continue-course" class="continue-course form-button lp-form" method="post" action="" style="display:none">
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
+ $user = learn_press_get_current_user();
15
  ?>
16
 
17
  <form name="continue-course" class="continue-course form-button lp-form" method="post" action="" style="display:none">
templates/single-course/buttons/external-link.php CHANGED
@@ -11,7 +11,10 @@
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
- $course = LP_Global::course();
 
 
 
15
  ?>
16
 
17
  <form name="course-external-link" class="course-external-link form-button lp-form" method="post">
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
+ $course = learn_press_get_course();
15
+ if ( ! $course ) {
16
+ return;
17
+ }
18
  ?>
19
 
20
  <form name="course-external-link" class="course-external-link form-button lp-form" method="post">
templates/single-course/buttons/retry.php CHANGED
@@ -15,7 +15,10 @@ if ( ! isset( $can_retake_times ) ) {
15
  return;
16
  }
17
 
18
- $course = LP_Global::course();
 
 
 
19
 
20
  $message_data_confirm = sprintf(
21
  '%s "%s"',
15
  return;
16
  }
17
 
18
+ $course = learn_press_get_course();
19
+ if ( ! $course ) {
20
+ return;
21
+ }
22
 
23
  $message_data_confirm = sprintf(
24
  '%s "%s"',
templates/single-course/content-item.php CHANGED
@@ -11,8 +11,12 @@
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
- $user = LP_Global::user();
15
- $course = LP_Global::course();
 
 
 
 
16
  $course_item = LP_Global::course_item();
17
  $can_view_content_course = $user->can_view_content_course( $course->get_id() );
18
  $can_view_content_item = $user->can_view_item( $course_item->get_id(), $can_view_content_course );
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
+ $user = learn_press_get_current_user();
15
+ $course = learn_press_get_course();
16
+ if ( ! $course ) {
17
+ return;
18
+ }
19
+
20
  $course_item = LP_Global::course_item();
21
  $can_view_content_course = $user->can_view_content_course( $course->get_id() );
22
  $can_view_content_item = $user->can_view_item( $course_item->get_id(), $can_view_content_course );
templates/single-course/content-item/popup-footer.php CHANGED
@@ -11,8 +11,8 @@
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
- $course = LP_Global::course();
15
- $user = LP_Global::user();
16
  ?>
17
 
18
  <div id="popup-footer">
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
+ $course = learn_press_get_course();
15
+ $user = learn_press_get_current_user();
16
  ?>
17
 
18
  <div id="popup-footer">
templates/single-course/instructor.php CHANGED
@@ -15,7 +15,10 @@
15
  */
16
  defined( 'ABSPATH' ) || exit();
17
 
18
- $course = LP_Global::course();
 
 
 
19
  ?>
20
 
21
  <div class="course-author">
15
  */
16
  defined( 'ABSPATH' ) || exit();
17
 
18
+ $course = learn_press_get_course();
19
+ if ( ! $course ) {
20
+ return;
21
+ }
22
  ?>
23
 
24
  <div class="course-author">
templates/single-course/meta/duration.php CHANGED
@@ -9,7 +9,7 @@
9
 
10
  defined( 'ABSPATH' ) or die;
11
 
12
- $course = LP_Global::course();
13
  ?>
14
 
15
  <div class="meta-item meta-item-duration"><?php echo learn_press_get_post_translated_duration( get_the_ID(), esc_html__( 'Lifetime access', 'learnpress' ) ); ?></div>
9
 
10
  defined( 'ABSPATH' ) or die;
11
 
12
+ $course = learn_press_get_course();
13
  ?>
14
 
15
  <div class="meta-item meta-item-duration"><?php echo learn_press_get_post_translated_duration( get_the_ID(), esc_html__( 'Lifetime access', 'learnpress' ) ); ?></div>
templates/single-course/meta/instructor.php CHANGED
@@ -9,7 +9,10 @@
9
 
10
  defined( 'ABSPATH' ) || exit;
11
 
12
- $course = LP_Global::course();
 
 
 
13
  ?>
14
 
15
  <div class="meta-item meta-item-instructor">
9
 
10
  defined( 'ABSPATH' ) || exit;
11
 
12
+ $course = learn_press_get_course();
13
+ if ( ! $course ) {
14
+ return;
15
+ }
16
  ?>
17
 
18
  <div class="meta-item meta-item-instructor">
templates/single-course/section/item-meta.php CHANGED
@@ -15,8 +15,12 @@ if ( ! isset( $item ) ) {
15
  return;
16
  }
17
 
18
- $course = LP_Global::course();
19
- $user = LP_Global::user();
 
 
 
 
20
  ?>
21
 
22
  <div class="course-item-meta">
15
  return;
16
  }
17
 
18
+ $course = learn_press_get_course();
19
+ if ( ! $course ) {
20
+ return;
21
+ }
22
+
23
+ $user = learn_press_get_current_user();
24
  ?>
25
 
26
  <div class="course-item-meta">
templates/single-course/sidebar/user-time.php CHANGED
@@ -16,8 +16,8 @@ defined( 'ABSPATH' ) || exit;
16
  * @var LP_Datetime $expiration_time
17
  */
18
  $time = current_time( 'mysql', true );
19
- $user = LP_Global::user();
20
- $course = LP_Global::course();
21
  ?>
22
 
23
  <div class="course-time">
16
  * @var LP_Datetime $expiration_time
17
  */
18
  $time = current_time( 'mysql', true );
19
+ $user = learn_press_get_current_user();
20
+ $course = learn_press_get_course();
21
  ?>
22
 
23
  <div class="course-time">
templates/single-course/tabs/curriculum.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
- $course = LP_Global::course();
15
  $user = learn_press_get_current_user();
16
 
17
  if ( ! $course || ! $user ) {
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
+ $course = learn_press_get_course();
15
  $user = learn_press_get_current_user();
16
 
17
  if ( ! $course || ! $user ) {
templates/single-course/tabs/instructor.php CHANGED
@@ -11,7 +11,10 @@
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
- $course = LP_Global::course();
 
 
 
15
  /**
16
  * @var LP_User
17
  */
11
 
12
  defined( 'ABSPATH' ) || exit();
13
 
14
+ $course = learn_press_get_course();
15
+ if ( ! $course ) {
16
+ return;
17
+ }
18
  /**
19
  * @var LP_User
20
  */
templates/single-course/tabs/overview.php CHANGED
@@ -17,8 +17,10 @@ defined( 'ABSPATH' ) || exit();
17
  /**
18
  * @var LP_Course $course
19
  */
20
- $course = LP_Global::course();
21
-
 
 
22
  ?>
23
 
24
  <div class="course-description" id="learn-press-course-description">
@@ -47,4 +49,4 @@ $course = LP_Global::course();
47
  do_action( 'learn_press_end_single_course_description' );
48
  ?>
49
 
50
- </div>
17
  /**
18
  * @var LP_Course $course
19
  */
20
+ $course = learn_press_get_course();
21
+ if ( ! $course ) {
22
+ return;
23
+ }
24
  ?>
25
 
26
  <div class="course-description" id="learn-press-course-description">
49
  do_action( 'learn_press_end_single_course_description' );
50
  ?>
51
 
52
+ </div>