PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | learnpress.php +41 -35 4.3.74.4.8 View file →
@@ -3,9 +3,9 @@
3 3 * Plugin Name: LearnPress
4 4 * Plugin URI: https://thimpress.com/learnpress
5 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 6 * Author: ThimPress
7 - * Version: 4.3.7
7 + * Version: 4.4.8
8 8 * Author URI: http://thimpress.com
9 9 * Requires at least: 6.0
10 10 * Requires PHP: 7.4
11 11 * Text Domain: learnpress
@@ -18,16 +18,21 @@
18 18 use LearnPress\TemplateHooks\CourseBuilder\Course\BuilderCourseTemplate;
19 19 use LearnPress\TemplateHooks\CourseBuilder\Course\BuilderEditCourseTemplate;
20 20 use LearnPress\Ajax\AI\OpenAiAjax;
21 21 use LearnPress\Ajax\BuilderDashboardAjax;
22 +use LearnPress\Ajax\CourseToolsAjax;
22 23 use LearnPress\Ajax\CourseBuilder\CourseBuilderAjax;
23 24 use LearnPress\Ajax\EditCurriculumAjax;
24 25 use LearnPress\Ajax\EditQuestionAjax;
25 26 use LearnPress\Ajax\EditQuizAjax;
26 -use LearnPress\Ajax\ExportOrderCSVAjax;
27 +use LearnPress\Ajax\Order\ExportOrderCSVAjax;
27 28 use LearnPress\Ajax\LessonAjax;
28 29 use LearnPress\Ajax\LoadContentViaAjax;
30 +use LearnPress\Ajax\SampleDataAJAX;
31 +use LearnPress\Ajax\SetupWizardAjax;
32 +use LearnPress\Ajax\AI\AIAssistantAjax;
29 33 use LearnPress\Ajax\MCP\McpApiKeysAjax;
34 +use LearnPress\Ajax\Webhook\WebhooksAjax;
30 35 use LearnPress\Ajax\CourseBuilder\CBEditCourseAjax;
31 36 use LearnPress\Ajax\SendEmailAjax;
32 37 use LearnPress\Background\LPBackgroundTrigger;
33 38 use LearnPress\ExternalPlugin\Elementor\LPElementor;
@@ -33,8 +38,9 @@
33 38 use LearnPress\ExternalPlugin\Elementor\LPElementor;
34 39 use LearnPress\ExternalPlugin\RankMath\LPRankMath;
35 40 use LearnPress\ExternalPlugin\YoastSeo\LPYoastSeo;
36 41 use LearnPress\Gutenberg\GutenbergHandleMain;
42 +use LearnPress\Ajax\Order\RefundOrderAjax;
37 43 use LearnPress\MCP\Abilities;
38 44 use LearnPress\MCP\Auth\ApiKeyAuthenticator;
39 45 use LearnPress\Models\CourseModel;
40 46 use LearnPress\Models\UserModel;
@@ -46,8 +52,11 @@
46 52 use LearnPress\Shortcodes\SingleInstructorShortcode;
47 53 use LearnPress\TemplateHooks\Admin\AdminEditQizTemplate;
48 54 use LearnPress\TemplateHooks\Admin\AdminEditQuestionTemplate;
49 55 use LearnPress\TemplateHooks\Admin\AdminListStudentsEnrolled;
56 +use LearnPress\TemplateHooks\Admin\AdminStatisticsReportTable;
57 +use LearnPress\TemplateHooks\Admin\Tools\AdminCourseTools;
58 +use LearnPress\Statistics\FilterOptionsProvider;
50 59 use LearnPress\TemplateHooks\Admin\AI\AdminCreateCourseAITemplate;
51 60 use LearnPress\TemplateHooks\Admin\AI\AdminEditCourseCurriculumWithAITemplate;
52 61 use LearnPress\TemplateHooks\Admin\AI\AdminEditWithAITemplate;
53 62 use LearnPress\TemplateHooks\Course\AdminEditCurriculumTemplate;
@@ -84,11 +93,13 @@
84 93 use LearnPress\TemplateHooks\Profile\ProfileOrderTemplate;
85 94 use LearnPress\TemplateHooks\Profile\ProfileQuizzesTemplate;
86 95 use LearnPress\TemplateHooks\Profile\ProfileStudentEnrolledTemplate;
87 96 use LearnPress\TemplateHooks\Profile\ProfileStudentStatisticsTemplate;
97 +use LearnPress\TemplateHooks\Course\CourseAIAssistantTemplate;
88 98 use LearnPress\Widgets\LPRegisterWidget;
89 99 use LearnPress\WPGDPR\ErasePersonalData;
90 100 use LearnPress\WPGDPR\ExportPersonalData;
101 +use LearnPress\Webhook\WebhookDispatcher;
91 102
92 103 defined( 'ABSPATH' ) || exit();
93 104
94 105 if ( ! class_exists( 'LearnPress' ) ) {
@@ -387,9 +398,11 @@
387 398 AdminEditCurriculumTemplate::instance();
388 399 AdminEditSettingTemplate::instance();
389 400 AdminEditQizTemplate::instance();
390 401 AdminEditQuestionTemplate::instance();
402 + AdminCourseTools::instance();
391 403 CourseMaterialTemplate::instance();
404 + CourseAIAssistantTemplate::instance();
392 405 AdminOrderItemsTemplate::instance();
393 406 AdminOrderListTemplate::instance();
394 407 AdminCreateCourseAITemplate::instance();
395 408 AdminEditWithAITemplate::instance();
@@ -394,8 +407,10 @@
394 407 AdminCreateCourseAITemplate::instance();
395 408 AdminEditWithAITemplate::instance();
396 409 AdminEditCourseCurriculumWithAITemplate::instance();
397 410 AdminListStudentsEnrolled::instance();
411 + AdminStatisticsReportTable::instance();
412 + FilterOptionsProvider::register_flush_hooks();
398 413 // WP GDPR
399 414 ErasePersonalData::instance();
400 415 ExportPersonalData::instance();
401 416
@@ -476,10 +491,8 @@
476 491
477 492 include_once 'inc/lp-webhooks.php'; // Addon learnpress-2checkout-payment v4.0.1 is using, when update v4.0.2 don't need load it.
478 493 include_once 'inc/class-lp-request-handler.php';
479 494
480 - include_once 'inc/admin/helpers/class-lp-plugins-helper.php';
481 -
482 495 // Todo: tungnx check those files.
483 496 include_once 'inc/abstracts/abstract-object-query.php';
484 497 include_once 'inc/class-lp-course-query.php';
485 498 include_once 'inc/abstracts/abstract-addon.php';
@@ -499,8 +512,9 @@
499 512 include_once 'inc/order/class-lp-order.php';
500 513
501 514 include_once 'inc/user/lp-user-functions.php';
502 515 include_once 'inc/user/class-lp-user-factory.php';
516 + WebhookDispatcher::instance();
503 517 include_once 'inc/user/abstract-lp-user.php';
504 518 include_once 'inc/user/class-lp-user.php';
505 519 include_once 'inc/user/class-lp-profile.php';
506 520 include_once 'inc/user-item/class-lp-user-item.php';
@@ -715,9 +729,9 @@
715 729 );
716 730
717 731 $lp_addon_version = $lp_addon_info['Version'];
718 732
719 - $addon = new Lp_Addon();
733 + $addon = new LP_Addon();
720 734 $addon->version = $lp_addon_version;
721 735 $addon->plugin_base = $lp_addon;
722 736 $addon->require_version = $lp_addon_info['Require_LP_Version'];
723 737 $addon_valid = $addon->check_require_version_addon();
@@ -746,17 +760,23 @@
746 760 'init',
747 761 function () {
748 762 LoadContentViaAjax::catch_lp_ajax();
749 763 LessonAjax::catch_lp_ajax();
764 + SampleDataAJAX::catch_lp_ajax();
765 + SetupWizardAjax::catch_lp_ajax();
750 766 EditCurriculumAjax::catch_lp_ajax();
751 767 EditQuizAjax::catch_lp_ajax();
752 768 EditQuestionAjax::catch_lp_ajax();
753 769 SendEmailAjax::catch_lp_ajax();
770 + RefundOrderAjax::catch_lp_ajax();
754 771 CourseBuilderAjax::catch_lp_ajax();
755 772 OpenAiAjax::catch_lp_ajax();
773 + AIAssistantAjax::catch_lp_ajax();
756 774 ExportOrderCSVAjax::catch_lp_ajax();
757 775 McpApiKeysAjax::catch_lp_ajax();
776 + WebhooksAjax::catch_lp_ajax();
758 777 CBEditCourseAjax::catch_lp_ajax();
778 + CourseToolsAjax::catch_lp_ajax();
759 779
760 780 do_action( 'learn-press/register-ajax-handlers' );
761 781 },
762 782 11
@@ -853,14 +873,26 @@
853 873 * @param array $links Array of action links
854 874 *
855 875 * @return array
856 876 * @since 4.3.11
857 - *
877 + * @version 1.0.1
858 878 */
859 879 public function plugin_links( array $links ): array {
860 - $links[] = sprintf( '<a href="%s">%s</a>', admin_url( 'admin.php?page=learn-press-settings' ), __( 'Settings', 'learnpress' ) );
861 - $links[] = sprintf( '<a href="%s" target="_blank">%s</a>', LearnPress::$doc_link, __( 'Documentation', 'learnpress' ) );
862 - $links[] = sprintf( '<a href="%s" target="_blank">%s</a>', get_admin_url() . '/admin.php?page=learn-press-addons', __( 'Add-ons', 'learnpress' ) );
880 + $links[] = sprintf(
881 + '<a href="%s">%s</a>',
882 + esc_url_raw( admin_url( 'admin.php?page=learn-press-settings' ) ),
883 + esc_html__( 'Settings', 'learnpress' )
884 + );
885 + $links[] = sprintf(
886 + '<a href="%s" target="_blank">%s</a>',
887 + esc_url_raw( LearnPress::$doc_link ),
888 + esc_html__( 'Documentation', 'learnpress' )
889 + );
890 + $links[] = sprintf(
891 + '<a href="%s" target="_blank">%s</a>',
892 + esc_url_raw( admin_url( 'admin.php?page=learn-press-addons' ) ),
893 + esc_html__( 'Add-ons', 'learnpress' )
894 + );
863 895
864 896 return $links;
865 897 }
866 898
@@ -969,34 +1001,8 @@
969 1001 $this->cart = LP_Cart::instance();
970 1002 }
971 1003
972 1004 return $this->cart;
973 - }
974 -
975 - /**
976 - * Check type of request.
977 - *
978 - * @param string $type ajax, frontend or admin.
979 - *
980 - * @return bool
981 - * @deprecated 4.2.9.4
982 - */
983 - public function is_request( $type ) {
984 - _deprecated_function( __METHOD__, '4.2.9.4' );
985 - return false;
986 -
987 - switch ( $type ) {
988 - case 'admin':
989 - return is_admin();
990 - case 'ajax':
991 - return defined( 'LP_DOING_AJAX' );
992 - case 'cron':
993 - return defined( 'DOING_CRON' );
994 - case 'frontend':
995 - return ( ! is_admin() || defined( 'LP_DOING_AJAX' ) ) && ! defined( 'DOING_CRON' );
996 - default:
997 - return strtolower( $_SERVER['REQUEST_METHOD'] ) == $type;
998 - }
999 1005 }
1000 1006
1001 1007 /**
1002 1008 * Get the plugin url.