PluginProbe
Moloni / 5.0.06
Moloni v5.0.06
5.0.10 5.0.09 5.0.08 5.0.07 5.0.06 trunk 0.4.0.00 0.4.8.1 3.0.10 3.0.11 3.0.35 3.0.36 3.0.37 3.0.38 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.0.46 3.0.47 3.0.48 3.0.49 3.0.50 All 98 releases
moloni / moloni.php

moloni.php in Moloni 5.0.06, at moloni.php

63 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 * Plugin Name: Moloni
5 * Plugin URI: https://plugins.moloni.com/woocommerce/
6 * Requires Plugins: woocommerce
7 * Description: A forma mais fácil de ligar a sua loja online com a sua faturação.
8 * Version: 5.0.06
9 * Tested up to: 7.0
10 * WC tested up to: 10.9.4
11 *
12 * Author: moloni.pt
13 * Author URI: https://moloni.pt
14 * License: GPL2
15 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
16 *
17 */
18
19 namespace Moloni;
20
21 if (!defined('ABSPATH')) {
22 exit;
23 }
24
25 $composer_autoloader = __DIR__ . '/vendor/autoload.php';
26 if (is_readable($composer_autoloader)) {
27 /** @noinspection PhpIncludeInspection */
28 require $composer_autoloader;
29 }
30
31 if (!defined('MOLONI_PLUGIN_FILE')) {
32 define('MOLONI_PLUGIN_FILE', __FILE__);
33 }
34
35 if (!defined('MOLONI_DIR')) {
36 define('MOLONI_DIR', __DIR__);
37 }
38
39 if (!defined('MOLONI_TEMPLATE_DIR')) {
40 define('MOLONI_TEMPLATE_DIR', __DIR__ . '/src/Templates/');
41 }
42
43 if (!defined('MOLONI_PLUGIN_URL')) {
44 define('MOLONI_PLUGIN_URL', plugin_dir_url(__FILE__));
45 }
46
47 if (!defined('MOLONI_IMAGES_URL')) {
48 define('MOLONI_IMAGES_URL', plugin_dir_url(__FILE__) . 'images/');
49 }
50
51 register_activation_hook(__FILE__, '\Moloni\Activators\Install::run');
52 register_deactivation_hook(__FILE__, '\Moloni\Activators\Remove::run');
53
54 add_action('wp_initialize_site', '\Moloni\Activators\Install::initializeSite', 200, 1);
55 add_action('wp_uninitialize_site', '\Moloni\Activators\Remove::uninitializeSite', 10, 1);
56 add_action('plugins_loaded', Start::class);
57 add_action('admin_enqueue_scripts', '\Moloni\Scripts\Enqueue::defines');
58
59 function Start()
60 {
61 return new \Moloni\Plugin();
62 }
63