Completed
Push — update/deactivation-modal-stat... ( 03d6ae...763765 )
by
unknown
07:34
created

Jetpack_Wizard::is_started()   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 Jetpack
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
		/** This filter is documented in _inc/lib/admin-pages/class.jetpack-react-page.php */
40
		return apply_filters( 'jetpack_show_setup_wizard', false )
41
				&& Jetpack::is_active()
42
				&& ! self::is_finished()
43
				&& current_user_can( 'jetpack_manage_modules' );
44
	}
45
}
46