Passed
Push — 196-autoloading ( a3379e )
by Jonathan
07:18
created

Object_Sync_Salesforce::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Plugin Name: Object Sync for Salesforce
4
 * Description: Object Sync for Salesforce maps and syncs data between Salesforce objects and WordPress objects.
5
 * Version: 2.0.0
6
 * Author: MinnPost
7
 * Author URI: https://code.minnpost.com
8
 * License: GPL2+
9
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 * Text Domain: object-sync-for-salesforce
11
 *
12
 * @package Object_Sync_Salesforce
13
 */
14
15
/* Exit if accessed directly */
16
if ( ! defined( 'ABSPATH' ) ) {
17
	return;
18
}
19
20
/**
21
 * The full path to the main file of this plugin
22
 *
23
 * This can later be passed to functions such as
24
 * plugin_dir_path(), plugins_url() and plugin_basename()
25
 * to retrieve information about plugin paths
26
 *
27
 * @since 2.0.0
28
 * @var string
29
 */
30
define( 'OBJECT_SYNC_SALESFORCE_FILE', __FILE__ );
31
32
/**
33
 * The plugin's current version
34
 *
35
 * @since 2.0.0
36
 * @var string
37
 */
38
define( 'OBJECT_SYNC_SALESFORCE_VERSION', '2.0.0' );
39
40
// Load the autoloader.
41
require_once 'lib/autoloader.php';
42
43
/**
44
 * Retrieve the instance of the main plugin class
45
 *
46
 * @since 0.2.0
47
 * @return Object_Sync_Salesforce
48
 */
49
function object_sync_for_salesforce() {
50
	static $plugin;
51
52
	if ( is_null( $plugin ) ) {
53
		$plugin = new Object_Sync_Salesforce( OBJECT_SYNC_SALESFORCE_VERSION, __FILE__ );
54
	}
55
56
	return $plugin;
57
}
58
59
object_sync_for_salesforce()->init();
60