-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoxygen-tutor-lms.php
62 lines (52 loc) · 1.53 KB
/
oxygen-tutor-lms.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/*
Plugin Name: Oxygen Tutor LMS
Plugin URI: https://www.themeum.com/product/tutor-lms/
Description: Oxygen Builder Integration - Tutor LMS plugin let's you to design your courses, lesson page by Oxygen Builder.
Author: Themeum
Version: 2.0.3
Author URI: http://themeum.com
Requires at least: 5.3
Tested up to: 6.1.1
License: GPLv2 or later
Text Domain: oxygen-tutor-lms
*/
if ( ! defined( 'ABSPATH' ) ){
exit;
}
define('OTLMS_VERSION', '2.0.3');
define('OTLMS_FILE', __FILE__);
define('OTLMS_PATH', plugin_dir_path(OTLMS_FILE));
define('OTLMS_URL', plugin_dir_url(OTLMS_FILE));
if ( ! class_exists('OxygenTutorLMS')){
include_once OTLMS_PATH.'OxygenTutorLMS.php';
}
/**
* Turn off template override from TutorLMS
*/
if ( ! function_exists( 'is_plugin_active' ) ){
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
}
if (is_plugin_active('oxygen/functions.php')){
add_filter('tutor_lms_should_template_override', '__return_false');
}
/**
* Load oxygen-tutor-lms text domain for translation
*
* @since version 1.0.3
*/
add_action( 'init', function() {
load_plugin_textdomain( 'oxygen-tutor-lms', false, basename( dirname( __FILE__ ) ) . '/languages' );
});
/**
* Now fire the plugin
* ekhon plugin-e agun lagiye den
*/
add_action('plugins_loaded', 'oxygen_tutor_lms_init');
function oxygen_tutor_lms_init(){
OxygenTutorLMS::instance();
}
add_action('wp_enqueue_scripts', 'tutor_oxygen_lms_assets');
function tutor_oxygen_lms_assets() {
wp_enqueue_style( 'public-style', plugins_url('assets/css/public.css', __FILE__));
}