-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlemonsqueezy.php
61 lines (53 loc) · 1.82 KB
/
lemonsqueezy.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
<?php
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Plugin Name: Lemon Squeezy
* Plugin URI: https://www.lemonsqueezy.com
* Description: Sell digital products the easy-peasy way directly from WordPress.
* Version: 1.3.0
* Requires at least: 5.3
* Requires PHP: 7.0
* Author: Lemon Squeezy
* Author URI: https://www.lemonsqueezy.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: lemonsqueezy
* Domain Path: /languages
*/
define( 'LSQ_PATH', plugin_dir_path( __FILE__ ) );
define( 'LSQ_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
if ( ! defined( 'LSQ_API_URL' ) ) {
define( 'LSQ_API_URL', 'https://api.lemonsqueezy.com' );
}
if ( ! defined( 'LSQ_APP_URL' ) ) {
define( 'LSQ_APP_URL', 'https://app.lemonsqueezy.com' );
}
if ( ! defined( 'LSQ_OAUTH_CLIENT_ID' ) ) {
define( 'LSQ_OAUTH_CLIENT_ID', '94d59e1b-7459-4371-a131-7ad050c8ca0d' );
}
// Bootmanager for Lemon Squeety plugin.
if ( ! function_exists( 'lsq_run_plugin' ) ) {
add_action( 'plugins_loaded', 'lsq_run_plugin' );
/**
* Run plugin
*
* @return void
*/
function lsq_run_plugin() {
// localize.
$textdomain_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages';
load_plugin_textdomain( 'lemonsqueezy', false, $textdomain_dir );
// Initialize classes.
include_once LSQ_PATH . 'src/class-lsq-oauth.php';
include_once LSQ_PATH . 'src/class-lsq-updater.php';
include_once LSQ_PATH . 'src/class-lsq-admin.php';
include_once LSQ_PATH . 'src/class-lsq-rest-controller.php';
include_once LSQ_PATH . 'src/class-lsq-register-block.php';
lemonsqueezy\LSQ_Admin::get_instance();
lemonsqueezy\LSQ_Rest_Controller::get_instance();
lemonsqueezy\LSQ_Register_Block::get_instance();
}
}