| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package Freemius |
| 4 | 4 | * @copyright Copyright (c) 2015, Freemius, Inc. |
| 5 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
| 5 | + * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 | |
| 6 | 6 | * @since 1.0.7 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -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 | * |
| @@ -61,70 +64,8 @@ | ||
| 61 | 64 | |
| 62 | 65 | #endregion |
| 63 | 66 | |
| 64 | 67 | #---------------------------------------------------------------------------------- |
| 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 | - | |
| 124 | - #endregion | |
| 125 | - | |
| 126 | - #---------------------------------------------------------------------------------- | |
| 127 | 68 | #region Module Type |
| 128 | 69 | #---------------------------------------------------------------------------------- |
| 129 | 70 | |
| 130 | 71 | /** |
| @@ -358,9 +299,9 @@ | ||
| 358 | 299 | #region Plans |
| 359 | 300 | #---------------------------------------------------------------------------------- |
| 360 | 301 | |
| 361 | 302 | /** |
| 362 | - * Check if plugin using the free plan. | |
| 303 | + * Check if the user is on the free plan of the product. | |
| 363 | 304 | * |
| 364 | 305 | * @since 1.0.4 |
| 365 | 306 | * |
| 366 | 307 | * @return bool |
| @@ -593,5 +534,5 @@ | ||
| 593 | 534 | */ |
| 594 | 535 | abstract function is_business(); |
| 595 | 536 | |
| 596 | 537 | #endregion |
| 597 | - } | |
| 538 | + } | |