| @@ -36,11 +36,14 @@ | ||
| 36 | 36 | * user is currently opted-in, use: |
| 37 | 37 | * `$fs->is_registered() && $fs->is_tracking_allowed()` |
| 38 | 38 | * |
| 39 | 39 | * @since 1.0.1 |
| 40 | + * | |
| 41 | + * @param bool $ignore_anonymous_state Since 2.5.1 | |
| 42 | + * | |
| 40 | 43 | * @return bool |
| 41 | 44 | */ |
| 42 | - abstract function is_registered(); | |
| 45 | + abstract function is_registered( $ignore_anonymous_state = false ); | |
| 43 | 46 | |
| 44 | 47 | /** |
| 45 | 48 | * Check if the user skipped connecting the account with Freemius. |
| 46 | 49 | * |
| @@ -57,70 +60,8 @@ | ||
| 57 | 60 | * |
| 58 | 61 | * @return bool |
| 59 | 62 | */ |
| 60 | 63 | abstract function is_activation_mode(); |
| 61 | - | |
| 62 | - #endregion | |
| 63 | - | |
| 64 | - #---------------------------------------------------------------------------------- | |
| 65 | - #region Usage Tracking | |
| 66 | - #---------------------------------------------------------------------------------- | |
| 67 | - | |
| 68 | - /** | |
| 69 | - * Returns TRUE if the user opted-in and didn't disconnect (opt-out). | |
| 70 | - * | |
| 71 | - * @author Leo Fajardo (@leorw) | |
| 72 | - * @since 1.2.1.5 | |
| 73 | - * | |
| 74 | - * @return bool | |
| 75 | - */ | |
| 76 | - abstract function is_tracking_allowed(); | |
| 77 | - | |
| 78 | - /** | |
| 79 | - * Returns TRUE if the user never opted-in or manually opted-out. | |
| 80 | - * | |
| 81 | - * @author Vova Feldman (@svovaf) | |
| 82 | - * @since 1.2.1.5 | |
| 83 | - * | |
| 84 | - * @return bool | |
| 85 | - */ | |
| 86 | - function is_tracking_prohibited() { | |
| 87 | - return ! $this->is_registered() || ! $this->is_tracking_allowed(); | |
| 88 | - } | |
| 89 | - | |
| 90 | - /** | |
| 91 | - * Opt-out from usage tracking. | |
| 92 | - * | |
| 93 | - * Note: This will not delete the account information but will stop all tracking. | |
| 94 | - * | |
| 95 | - * Returns: | |
| 96 | - * 1. FALSE - If the user never opted-in. | |
| 97 | - * 2. TRUE - If successfully opted-out. | |
| 98 | - * 3. object - API Result on failure. | |
| 99 | - * | |
| 100 | - * @author Leo Fajardo (@leorw) | |
| 101 | - * @since 1.2.1.5 | |
| 102 | - * | |
| 103 | - * @return bool|object | |
| 104 | - */ | |
| 105 | - abstract function stop_tracking(); | |
| 106 | - | |
| 107 | - /** | |
| 108 | - * Opt-in back into usage tracking. | |
| 109 | - * | |
| 110 | - * Note: This will only work if the user opted-in previously. | |
| 111 | - * | |
| 112 | - * Returns: | |
| 113 | - * 1. FALSE - If the user never opted-in. | |
| 114 | - * 2. TRUE - If successfully opted-in back to usage tracking. | |
| 115 | - * 3. object - API result on failure. | |
| 116 | - * | |
| 117 | - * @author Leo Fajardo (@leorw) | |
| 118 | - * @since 1.2.1.5 | |
| 119 | - * | |
| 120 | - * @return bool|object | |
| 121 | - */ | |
| 122 | - abstract function allow_tracking(); | |
| 123 | 64 | |
| 124 | 65 | #endregion |
| 125 | 66 | |
| 126 | 67 | #---------------------------------------------------------------------------------- |