-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathemfluence.php
More file actions
executable file
·47 lines (42 loc) · 1.49 KB
/
Copy pathemfluence.php
File metadata and controls
executable file
·47 lines (42 loc) · 1.49 KB
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
<?php
/*
Plugin Name: emfluence Marketing Platform
Plugin URI: https://github.com/emfluencekc/wp-emfluence
Description: Easily add forms to your website for contacts to add or update their details in your emfluence Marketing Platform account.
Author: emfluence Digital Marketing
Version: 2.13
Author URI: https://www.emfluence.com
Text Domain: emfl_form
*/
define('EMFLUENCE_EMAILER_PATH', dirname(__FILE__) . '/');
/**
* Get the singleton instance of the emfluence marketing platform api object
* @param string $access_token
* @param boolean $reset = FALSE
* @return Emfl_Platform_API
*/
function emfluence_get_api($access_token, $reset = FALSE){
static $api = NULL;
if( $reset || !$api ){
require_once( EMFLUENCE_EMAILER_PATH . '/libraries/emfl_platform_api/api.class.inc' );
$api = new Emfl_Platform_API($access_token);
}
return $api;
}
function emfluence_load_widgets(){
require_once EMFLUENCE_EMAILER_PATH . 'inc/recaptcha.php';
require_once EMFLUENCE_EMAILER_PATH . 'inc/discount_code.php';
require_once EMFLUENCE_EMAILER_PATH . 'inc/store_locator.php';
require_once EMFLUENCE_EMAILER_PATH . 'widget.php';
register_widget( 'emfluence_email_signup' );
}
add_action( 'widgets_init', 'emfluence_load_widgets' );
function emfluence_load_plugin_integrations() {
if(class_exists( 'WooCommerce' )) {
require_once 'inc/woocommerce.php';
}
}
add_action('plugins_loaded', 'emfluence_load_plugin_integrations');
if(is_admin()) {
require_once EMFLUENCE_EMAILER_PATH . 'admin.php';
}