tutor
Last commit date
assets
7 years ago
classes
7 years ago
includes
7 years ago
languages
7 years ago
templates
7 years ago
views
7 years ago
readme.txt
7 years ago
tutor.php
7 years ago
tutor.php
69 lines
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: Tutor LMS |
| 4 | Plugin URI: http://https://themeum.com/tutor |
| 5 | Description: Tutor is a complete solution for creating a Learning Management System in WordPress way. It can help you to create |
| 6 | courses, lessons and quizzes. |
| 7 | Author: Themeum |
| 8 | Version: 1.0.5 |
| 9 | Author URI: http://themeum.com |
| 10 | Requires at least: 4.5 |
| 11 | Tested up to: 5.1 |
| 12 | Text Domain: tutor |
| 13 | Domain Path: /languages/ |
| 14 | */ |
| 15 | if ( ! defined( 'ABSPATH' ) ) |
| 16 | exit; |
| 17 | |
| 18 | /** |
| 19 | * Defined the tutor main file |
| 20 | */ |
| 21 | define('TUTOR_VERSION', '1.0.5'); |
| 22 | define('TUTOR_FILE', __FILE__); |
| 23 | |
| 24 | |
| 25 | /** |
| 26 | * Load tutor text domain for translation |
| 27 | */ |
| 28 | add_action( 'init', 'tutor_language_load' ); |
| 29 | function tutor_language_load(){ |
| 30 | load_plugin_textdomain( 'tutor', false, basename( dirname( __FILE__ ) ) . '/languages' ); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Tutor Helper function |
| 35 | * |
| 36 | * @since v.1.0.0 |
| 37 | */ |
| 38 | |
| 39 | if ( ! function_exists('tutor')) { |
| 40 | function tutor() { |
| 41 | $path = plugin_dir_path( TUTOR_FILE ); |
| 42 | $hasPro = defined('TUTOR_PRO_VERSION'); |
| 43 | |
| 44 | $info = array( |
| 45 | 'path' => $path, |
| 46 | 'url' => plugin_dir_url( TUTOR_FILE ), |
| 47 | 'basename' => plugin_basename( TUTOR_FILE ), |
| 48 | 'version' => TUTOR_VERSION, |
| 49 | 'nonce_action' => 'tutor_nonce_action', |
| 50 | 'nonce' => '_wpnonce', |
| 51 | 'course_post_type' => apply_filters( 'tutor_course_post_type', 'course' ), |
| 52 | 'lesson_post_type' => apply_filters( 'tutor_lesson_post_type', 'lesson' ), |
| 53 | 'instructor_role' => apply_filters( 'tutor_instructor_role', 'tutor_instructor' ), |
| 54 | 'instructor_role_name' => apply_filters( 'tutor_instructor_role_name', __( 'Tutor Instructor', 'tutor' ) ), |
| 55 | 'template_path' => apply_filters( 'tutor_template_path', 'tutor/' ), |
| 56 | 'has_pro' => $hasPro, |
| 57 | ); |
| 58 | |
| 59 | return (object) $info; |
| 60 | } |
| 61 | } |
| 62 | include 'classes/init.php'; |
| 63 | |
| 64 | function tutor_utils(){ |
| 65 | return new \TUTOR\Utils(); |
| 66 | } |
| 67 | |
| 68 | $tutor = new \TUTOR\init(); |
| 69 | $tutor->run(); //Boom |