| 1 |
<?php |
| 2 |
/** |
| 3 |
* A class that checks for the existence of email subscriptions for a user. |
| 4 |
* |
| 5 |
* @package automattic/jetpack |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* WPCOM_Email_Subscription_Checker |
| 10 |
*/ |
| 11 |
class WPCOM_Email_Subscription_Checker { |
| 12 |
|
| 13 |
/** |
| 14 |
* Checks if a user's site has an email subscription |
| 15 |
* |
| 16 |
* @return bool |
| 17 |
*/ |
| 18 |
public function has_email() { |
| 19 |
if ( ! function_exists( 'wpcom_site_has_feature' ) ) { |
| 20 |
return false; |
| 21 |
} |
| 22 |
|
| 23 |
return wpcom_site_has_feature( \WPCOM_Features::EMAIL_SUBSCRIPTION ); |
| 24 |
} |
| 25 |
} |
| 26 |
|