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 | inc/rest-api/class-lp-admin-core-api.php +4 -2 4.1.7.24.4.8 View file →
@@ -3,14 +3,14 @@
3 3 * Class LP_Admin_Core_API
4 4 *
5 5 * @author Thimpress
6 6 * @editor tungnx, nhamdv
7 - * @version 1.0.1
7 + * @version 1.0.2
8 8 * @since 4.0.0
9 9 */
10 10 class LP_Admin_Core_API extends LP_Abstract_API {
11 11 public function __construct() {
12 - if ( ! current_user_can( 'administrator' ) ) {
12 + if ( ! LP_Helper::isRestApiLP() ) {
13 13 return;
14 14 }
15 15
16 16 parent::__construct();
@@ -27,8 +27,9 @@
27 27 'class-lp-admin-rest-database-controller.php',
28 28 'class-lp-admin-rest-course-controller.php',
29 29 'class-lp-admin-rest-tools-controller.php',
30 30 'class-lp-admin-rest-reset-data-controller.php',
31 + 'class-lp-admin-rest-statistics-controller.php',
31 32 );
32 33
33 34 $path_version = $this->version . '/admin/';
34 35 $path_rest_api = LP_PLUGIN_PATH . 'inc/rest-api/' . $path_version;
@@ -46,8 +47,9 @@
46 47 'LP_REST_Admin_Database_Controller',
47 48 'LP_REST_Admin_Course_Controller',
48 49 'LP_REST_Admin_Tools_Controller',
49 50 'LP_REST_Admin_Reset_Data_Controller',
51 + 'LP_REST_Admin_Statistics_Controller',
50 52 );
51 53
52 54 $this->controllers = apply_filters( 'learn-press/core-api/controllers', $controllers );
53 55