-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlt.php
More file actions
60 lines (49 loc) · 1.74 KB
/
Copy pathlt.php
File metadata and controls
60 lines (49 loc) · 1.74 KB
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
<?php
/*
Plugin Name: LifeTutor
Author: "Dmitry Krasnikov" <dmitry.krasnikov@gmail.com>
License: GPLv2 or later
Text Domain: pharma
GitHub Plugin URI: https://github.com/mainpart/lt
Primary Branch: main
Domain Path: /languages
Version: 1.0.20
Description: Плагин для организации консультаций
*/
namespace Lt;
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
// Const for path root
if ( ! defined( 'LT_PATH' ) ) {
define( 'LT_PATH', __DIR__ );
}
// Const for URL root
if ( ! defined( 'LT_URL' ) ) {
define( 'LT_URL', plugin_dir_url( __FILE__ ) );
}
include_once __DIR__ . '/vendor/autoload.php';
\WP_Dependency_Installer::instance( __DIR__ )->run();
class Plugin {
public static $initiated = false;
public static function init() {
if ( ! self::$initiated ) {
// Const for path root
if ( ! defined( 'LT_LOCALE' ) ) {
define( 'LT_LOCALE', get_locale() );
}
load_plugin_textdomain( 'lt', false, plugin_basename( __DIR__ ) . '/languages/' );
add_action('plugins_loaded', array('Lt\Settings', 'init'));
add_action('plugins_loaded', array('Lt\PostType', 'init'));
add_action('plugins_loaded', array('Lt\Users', 'init'));
add_action('plugins_loaded', array('Lt\Amelia', 'init'));
add_action('plugins_loaded', ['Lt\CommentMailPro', 'init']);
add_action('plugins_loaded', ['Lt\ContactForm', 'init']);
add_action('plugins_loaded', ['Lt\Redirects', 'init']);
add_action('plugins_loaded', ['Lt\Payment', 'init']);
add_action('plugins_loaded', ['Lt\ShortCode', 'init']);
add_action('plugins_loaded', ['Lt\Schedule', 'init']);
self::$initiated = true;
}
}
}
/** Init the plugin */
Plugin::init();