-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwp-optigration.php
68 lines (62 loc) · 1.64 KB
/
wp-optigration.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
63
64
65
66
67
68
<?php
/**
* Plugin Name: Optigration - Optimized Integration
* Plugin URI: https://www.lubus.in
* Description: 3rd party script integration.
* Author: lubus
* Author URI: https://www.lubus.in
* Version: 0.1.0
* Text Domain: optigration
* Domain Path: /languages
* Tags: invoice, invoicing,
* Requires at least: 3.0.1
* Tested up to: 5.0.3
* Stable tag: 0.1.0
* License: GPL2
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*
* @package optigration
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Setup Constants
*/
// Plugin version.
if ( ! defined( 'OPTIGRATION_VERSION' ) ) {
define( 'OPTIGRATION_VERSION', '0.1.0' );
}
// Plugin Root File.
if ( ! defined( 'OPTIGRATION_PLUGIN_FILE' ) ) {
define( 'OPTIGRATION_PLUGIN_FILE', __FILE__ );
}
// Plugin Folder Path.
if ( ! defined( 'OPTIGRATION_PLUGIN_DIR' ) ) {
define( 'OPTIGRATION_PLUGIN_DIR', plugin_dir_path( OPTIGRATION_PLUGIN_FILE ) );
}
// Plugin Folder URL.
if ( ! defined( 'OPTIGRATION_PLUGIN_URL' ) ) {
define( 'OPTIGRATION_PLUGIN_URL', plugin_dir_url( OPTIGRATION_PLUGIN_FILE ) );
}
// Plugin Basename aka: "optigration/optigration.php".
if ( ! defined( 'OPTIGRATION_PLUGIN_BASENAME' ) ) {
define( 'OPTIGRATION_PLUGIN_BASENAME', plugin_basename( OPTIGRATION_PLUGIN_FILE ) );
}
// Autoloader.
require_once 'vendor/autoload.php';
// Bootstrap Optigration.
use LubusIN\Optigration\Optigration;
/**
* Main instance of Optigration.
*
* Returns the main instance of Optigration to prevent the need to use globals.
*
* @since 0.1.0
* @return Optigration
*/
function optigration() {
return Optigration::get_instance();
}
optigration();