Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
75.00% |
3 / 4 |
|
100.00% |
1 / 1 |
CRAP | n/a |
0 / 0 |
|
| wpcom_launchpad_is_no_guidance | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
3 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * No-guidance launchpad state. |
| 4 | * |
| 5 | * @package automattic/jetpack-mu-wpcom |
| 6 | */ |
| 7 | |
| 8 | if ( ! function_exists( 'wpcom_launchpad_is_no_guidance' ) ) { |
| 9 | /** |
| 10 | * Whether the site gets no setup guidance: no My Home, Site Setup, or launchpad widget, either because |
| 11 | * `wpcom_ai_launchpad_no_guidance` is set or because the AI Launchpad was enabled and then skipped. |
| 12 | * |
| 13 | * @return bool |
| 14 | */ |
| 15 | function wpcom_launchpad_is_no_guidance() { |
| 16 | if ( get_option( 'wpcom_ai_launchpad_no_guidance' ) ) { |
| 17 | return true; |
| 18 | } |
| 19 | |
| 20 | return (bool) get_option( 'wpcom_ai_launchpad_enabled' ) && (bool) get_option( 'wpcom_ai_launchpad_dismissed' ); |
| 21 | } |
| 22 | } |