Files
2026-04-23 04:33:43 +03:30

199 lines
7.0 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
defined( 'ABSPATH' ) || exit;
function upstudy_ocdi_register_plugins( $plugins ) {
$lms_plugins = [];
$specific_path = upstudy_ocdi_plugin_repo_value();
$repo_path = 'envato/file/';
$author_site_link = esc_url( UPSTUDY_AUTHOR_SITE_URL );
if ( isset( $_GET['step'] ) && $_GET['step'] === 'import' && isset( $_GET['import'] ) ) :
if ( $_GET['import'] === '0') :
$lms_plugins = [
[
'name' => esc_html__('Tutor LMS', 'upstudy'),
'slug' => 'tutor',
'required' => true
],
[
'name' => esc_html__('WooCommerce', 'upstudy'),
'slug' => 'woocommerce',
'required' => true
],
[
'name' => esc_html__('WP Events Manager', 'upstudy'),
'slug' => 'wp-events-manager',
'required' => true
],
[
'name' => esc_html__('Contact Form 7','upstudy'),
'slug' => 'contact-form-7',
'required' => true,
],
[
'name' => esc_html__('Video Conferencing with Zoom','upstudy'),
'slug' => 'video-conferencing-with-zoom-api',
'required' => true,
],
[
'name' => esc_html__('MC4WP: Mailchimp for WordPress','upstudy'),
'slug' => 'mailchimp-for-wp',
'required' => true,
]
];
endif;
if ( $_GET['import'] === '1' ) :
$lms_plugins = [
[
'name' => 'LearnPress LMS',
'slug' => 'learnpress',
'required' => true
],
[
'name' => 'LearnPress - Course Review',
'slug' => 'learnpress-course-review',
'required' => true
],
[
'name' => 'LearnPress Course Wishlist',
'slug' => 'learnpress-wishlist',
'required' => true
],
[
'name' => esc_html__('WooCommerce', 'upstudy'),
'slug' => 'woocommerce',
'required' => true
],
[
'name' => esc_html__('WP Events Manager', 'upstudy'),
'slug' => 'wp-events-manager',
'required' => true
],
[
'name' => esc_html__('Contact Form 7','upstudy'),
'slug' => 'contact-form-7',
'required' => true,
],
[
'name' => esc_html__('Video Conferencing with Zoom','upstudy'),
'slug' => 'video-conferencing-with-zoom-api',
'required' => true,
],
[
'name' => esc_html__('MC4WP: Mailchimp for WordPress','upstudy'),
'slug' => 'mailchimp-for-wp',
'required' => true,
]
];
endif;
if ( $_GET['import'] === '2' ) :
$lms_plugins = [
[
'name' => 'LaernDash LMS',
'slug' => 'sfwd-lms',
'required' => true
],
[
'name' => esc_html__('WooCommerce', 'upstudy'),
'slug' => 'woocommerce',
'required' => true
],
[
'name' => esc_html__('WP Events Manager', 'upstudy'),
'slug' => 'wp-events-manager',
'required' => true
],
[
'name' => esc_html__('Contact Form 7','upstudy'),
'slug' => 'contact-form-7',
'required' => true,
],
[
'name' => esc_html__('Video Conferencing with Zoom','upstudy'),
'slug' => 'video-conferencing-with-zoom-api',
'required' => true,
],
[
'name' => esc_html__('MC4WP: Mailchimp for WordPress','upstudy'),
'slug' => 'mailchimp-for-wp',
'required' => true,
]
];
endif;
if ( $_GET['import'] === '3' ) :
$lms_plugins = [
[
'name' => esc_html__('Tutor LMS', 'upstudy'),
'slug' => 'tutor',
'required' => true
],
[
'name' => esc_html__('WooCommerce', 'upstudy'),
'slug' => 'woocommerce',
'required' => true
],
[
'name' => esc_html__('WP Events Manager', 'upstudy'),
'slug' => 'wp-events-manager',
'required' => true
],
[
'name' => esc_html__('Contact Form 7','upstudy'),
'slug' => 'contact-form-7',
'required' => true,
],
[
'name' => esc_html__('Video Conferencing with Zoom','upstudy'),
'slug' => 'video-conferencing-with-zoom-api',
'required' => true,
],
[
'name' => esc_html__('MC4WP: Mailchimp for WordPress','upstudy'),
'slug' => 'mailchimp-for-wp',
'required' => true,
]
];
endif;
// if ( $_GET['import'] === '3' ) :
// $lms_plugins = [
// [
// 'name' => 'Sensei LMS',
// 'slug' => 'sensei-lms',
// 'required' => true
// ],
// ];
// endif;
if ( $_GET['import'] === '4' ) :
$lms_plugins = [
[
'name' => 'MasterStudy LMS',
'slug' => 'masterstudy-lms-learning-management-system',
'required' => true
],
];
endif;
if ( $_GET['import'] === '5' ) :
$lms_plugins = [
[
'name' => 'LifterLMS',
'slug' => 'lifterlms',
'required' => true
],
];
endif;
endif;
return array_merge( $plugins, $lms_plugins );
}
add_filter( 'ocdi/register_plugins', 'upstudy_ocdi_register_plugins' );