Completed
Push — try/seperate-publicize-handlin... ( 849cf0 )
by
unknown
31:45 queued 22:53
created

Jetpack_Keyring::__construct()   A

Complexity

Conditions 6
Paths 16

Size

Total Lines 15

Duplication

Lines 4
Ratio 26.67 %

Importance

Changes 0
Metric Value
cc 6
dl 4
loc 15
rs 9.2222
c 0
b 0
f 0
nc 16
nop 0
1
<?php
2
/**
3
 * Module Name: Keyring
4
 * Module Description: Connections to WPCOM (TODO)
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
5
 * Sort Order: 10
6
 * Recommendation Order: 7
7
 * First Introduced: 6.5.0
8
 * Requires Connection: Yes
9
 * Auto Activate: Yes
10
 * Module Tags: Recommended
11
 * Feature: General
12
 * Additional Search Queries: connections
13
 */
14
15
class Jetpack_Keyring {
16
17
	public $in_jetpack = true;
18
19
	function __construct() {
20
21
		$this->in_jetpack = ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'enable_module_configurable' ) ) ? true : false;
22
23
		// investigate what this for
24 View Code Duplication
		if ( $this->in_jetpack && method_exists( 'Jetpack', 'module_configuration_load' ) ) {
25
			Jetpack::enable_module_configurable( __FILE__ );
26
			Jetpack::module_configuration_load( __FILE__, array( $this, 'jetpack_configuration_load' ) );
27
		}
28
29
		if ( $this->in_jetpack ) {
30
			require_once dirname( __FILE__ ) . '/keyring/keyring-jetpack.php';
31
		}
32
33
	}
34
}
35
36
37
new Jetpack_Keyring;
38