-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmag-products-integration.php
74 lines (61 loc) · 1.91 KB
/
mag-products-integration.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
69
70
71
72
73
74
<?php
/**
* MagePress functions and definitions.
*
* @package Mag_Products_Integration
*/
defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
/*
Plugin Name: Mag Products Integration for WordPress
Plugin URI: https://wordpress.org/plugins/mag-products-integration/
Description: This plugin let you display products of your Magento store, directly in your WordPress. It connects to Magento through the REST API.
Version: 1.2.13
Requires at least: 4.0
Author: Francis Santerre
Author URI: http://santerref.com/
Domain Path: /languages
Text Domain: mag-products-integration
*/
define( 'MAG_PRODUCTS_INTEGRATION_PLUGIN_VERSION', '1.2.13' );
define( 'MAG_PRODUCTS_INTEGRATION_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'MAG_PRODUCTS_INTEGRATION_MODULE_VERIFY_INSTALLATION_PATH', '/wordpress/plugin/verify' );
define( 'MAG_PRODUCTS_INTEGRATION_MODULE_STORES_PATH', '/wordpress/plugin/stores' );
require_once 'autoload.php';
if ( ! function_exists( 'magepress' ) ) {
/**
* Create global instance of the plugin. Allows developer to remove/add plugin actions/filters.
*
* @since 1.2.2
*
* @return MagePress\Mag
*/
function magepress() {
static $magepress;
if ( ! isset( $magepress ) ) {
$magepress = MagePress\Mag::get_instance();
$magepress->init();
}
return $magepress;
}
magepress();
register_activation_hook( __FILE__, array( magepress(), 'activate' ) );
register_deactivation_hook( __FILE__, array( magepress(), 'deactivate' ) );
}
if ( ! function_exists( 'magepress_admin' ) ) {
/**
* Create global instance of the plugin admin. Allows developer to remove/add plugin actions/filters.
*
* @since 1.2.2
*
* @return MagePress\Mag_Admin
*/
function magepress_admin() {
static $magepress_admin;
if ( ! isset( $magepress_admin ) ) {
$magepress_admin = MagePress\Mag::get_instance()->get_admin();
$magepress_admin->init();
}
return $magepress_admin;
}
magepress_admin();
}