| @@ -800,9 +800,8 @@ | ||
| 800 | 800 | public function includes() { |
| 801 | 801 | // Common function used in admin |
| 802 | 802 | include_once 'lp-admin-functions.php'; |
| 803 | 803 | include_once 'lp-admin-actions.php'; |
| 804 | - require_once LP_PLUGIN_PATH . 'inc/background-process/class-lp-background-query-items.php'; | |
| 805 | 804 | include_once 'class-lp-admin-assets.php'; |
| 806 | 805 | LP_Admin_Assets::instance(); |
| 807 | 806 | // For MCP |
| 808 | 807 | if ( learn_press_is_mcp_available() ) { |
| @@ -809,8 +808,10 @@ | ||
| 809 | 808 | include_once 'class-lp-admin-mcp-api-keys.php'; |
| 810 | 809 | LP_Admin_MCP_API_Keys::instance(); |
| 811 | 810 | } |
| 812 | 811 | // End MCP |
| 812 | + include_once 'class-lp-admin-webhooks.php'; | |
| 813 | + LP_Admin_Webhooks::instance(); | |
| 813 | 814 | include_once 'class-lp-admin-dashboard.php'; |
| 814 | 815 | // include_once 'class-lp-admin-tools.php'; |
| 815 | 816 | include_once 'class-lp-admin-ajax.php'; |
| 816 | 817 | include_once 'editor/class-lp-admin-editor.php'; |
| @@ -815,15 +816,14 @@ | ||
| 815 | 816 | include_once 'class-lp-admin-ajax.php'; |
| 816 | 817 | include_once 'editor/class-lp-admin-editor.php'; |
| 817 | 818 | include_once 'class-lp-admin-menu.php'; |
| 818 | 819 | include_once 'helpers/class-lp-outdated-template-helper.php'; |
| 819 | - include_once 'helpers/class-lp-plugins-helper.php'; | |
| 820 | 820 | include_once 'class-lp-modal-search-items.php'; |
| 821 | 821 | //include_once 'class-lp-modal-search-users.php'; |
| 822 | 822 | include_once 'class-lp-setup-wizard.php'; |
| 823 | 823 | // include_once 'class-lp-updater.php'; |
| 824 | - include_once 'class-lp-install-sample-data.php'; | |
| 825 | - include_once 'class-lp-reset-data.php'; | |
| 824 | + // include_once 'class-lp-install-sample-data.php'; // Replaced by LearnPress\Ajax\SampleDataAJAX. | |
| 825 | + // include_once 'class-lp-reset-data.php'; // Deprecated: replaced by CourseToolsAjax::reset_progress_items_course. | |
| 826 | 826 | include_once LP_PLUGIN_PATH . 'inc/admin/views/meta-boxes/course/settings.php'; |
| 827 | 827 | include_once LP_PLUGIN_PATH . 'inc/admin/views/meta-boxes/course/class-lp-meta-box-course-offline.php'; |
| 828 | 828 | include_once LP_PLUGIN_PATH . 'inc/admin/views/meta-boxes/quiz/settings.php'; |
| 829 | 829 | include_once LP_PLUGIN_PATH . 'inc/admin/views/meta-boxes/lesson/settings.php'; |
| @@ -839,9 +839,9 @@ | ||
| 839 | 839 | if ( ! $query->is_main_query() ) { |
| 840 | 840 | return; |
| 841 | 841 | } |
| 842 | 842 | |
| 843 | - global $post_type, $pagenow; | |
| 843 | + /*global $post_type, $pagenow; | |
| 844 | 844 | |
| 845 | 845 | if ( current_user_can( ADMIN_ROLE ) ) { |
| 846 | 846 | return; |
| 847 | 847 | } |
| @@ -856,13 +856,14 @@ | ||
| 856 | 856 | ); |
| 857 | 857 | |
| 858 | 858 | if ( ! in_array( $post_type, $post_type_valid ) ) { |
| 859 | 859 | return; |
| 860 | - } | |
| 860 | + }*/ | |
| 861 | 861 | |
| 862 | 862 | // $query->set( 'author', get_current_user_id() ); |
| 863 | 863 | |
| 864 | - $query = apply_filters( 'learnpress/get-post-type-lp-on-backend', $query ); | |
| 864 | + // Hook only Co-instructor using. | |
| 865 | + return apply_filters( 'learnpress/get-post-type-lp-on-backend', $query ); | |
| 865 | 866 | |
| 866 | 867 | //add_filter( 'views_edit-' . $post_type . '', '_learn_press_restrict_view_items', 10 ); |
| 867 | 868 | //remove_filter( 'pre_get_posts', array( $this, 'get_course_items_of_user_backend' ), 10 ); |
| 868 | 869 | } |