-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoloni.php
55 lines (44 loc) · 1.27 KB
/
moloni.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
<?php
/**
*
* Plugin Name: Moloni
* Plugin URI: https://indigit.pt
* Description: A forma mais fácil de ligar a sua loja online com a sua faturação.
* Version: 3.0.24
* Author: Moloni.com
* Author URI: https://moloni.com
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
*/
namespace Moloni;
if (!defined('ABSPATH')) {
exit;
}
$composer_autoloader = __DIR__ . '/vendor/autoload.php';
if (is_readable($composer_autoloader)) {
/** @noinspection PhpIncludeInspection */
require $composer_autoloader;
}
if (!defined('MOLONI_PLUGIN_FILE')) {
define('MOLONI_PLUGIN_FILE', __FILE__);
}
if (!defined('MOLONI_DIR')) {
define('MOLONI_DIR', __DIR__);
}
if (!defined('MOLONI_TEMPLATE_DIR')) {
define('MOLONI_TEMPLATE_DIR', __DIR__ . '/src/Templates/');
}
if (!defined('MOLONI_PLUGIN_URL')) {
define('MOLONI_PLUGIN_URL', plugin_dir_url(__FILE__));
}
if (!defined('MOLONI_IMAGES_URL')) {
define('MOLONI_IMAGES_URL', plugin_dir_url(__FILE__) . 'images/');
}
register_activation_hook(__FILE__, '\Moloni\Activators\Install::run');
register_deactivation_hook(__FILE__, '\Moloni\Activators\Remove::run');
add_action('plugins_loaded', Start::class);
function Start()
{
return new Plugin();
}