Completed
Push — add/implement_wizard_banner ( e29254...7db7c7 )
by
unknown
17:35 queued 10:35
created

Jetpack_Wizard::is_finished()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Displays the first page of the Wizard in a banner form
4
 *
5
 * @package none
6
 */
7
8
/**
9
 * Jetpack_Wizard class
10
 */
11
class Jetpack_Wizard {
12
13
	/**
14
	 * Has the user started the Wizard?
15
	 *
16
	 * @return bool
17
	 */
18
	public static function is_started() {
19
		// TODO: check saved Jetpack_Option (to be implemented).
20
		return false;
21
	}
22
23
	/**
24
	 * Has the user finished the Wizard?
25
	 *
26
	 * @return bool
27
	 */
28
	public static function is_finished() {
29
		// TODO: check saved Jetpack_Option (to be implemented).
30
		return false;
31
	}
32
33
	/**
34
	 * Can the Wizard be displayed?
35
	 *
36
	 * @return bool
37
	 */
38
	public static function can_be_displayed() {
39
		return apply_filters( 'jetpack_connection_prompt_helpers', false ) &&
40
			Jetpack::is_active() &&
41
			! self::is_finished();
42
	}
43
44
	// TODO: move save and get from the endpoint (update_setup_questionnaire() and get_setup_questionnaire()) to this class.
45
}
46