PluginProbe
StreamCast – bring live radio to your site with a sleek player / 2.3.3
StreamCast – bring live radio to your site with a sleek player v2.3.3
2.4.5 2.4.4 trunk 1.0 1.1 2.0.0 2.1.10 2.1.2 2.1.4 2.1.5 2.1.8 2.2.1 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 All 29 releases
streamcast / freemius / includes / entities / class-fs-plugin-plan.php

class-fs-plugin-plan.php in StreamCast – bring live radio to your site with a sleek player 2.3.3, at freemius/includes/entities/class-fs-plugin-plan.php

152 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.0.5
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 /**
14 * Class FS_Plugin_Plan
15 *
16 */
17 class FS_Plugin_Plan extends FS_Entity {
18
19 #region Properties
20
21 /**
22 * @var number
23 */
24 public $plugin_id;
25 /**
26 * @var string
27 */
28 public $name;
29 /**
30 * @var string
31 */
32 public $title;
33 /**
34 * @var string
35 */
36 public $description;
37 /**
38 * @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
39 */
40 public $is_free_localhost;
41 /**
42 * @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
43 * support.
44 */
45 public $is_block_features;
46 /**
47 * @var int
48 */
49 public $license_type;
50 /**
51 * @var bool
52 */
53 public $is_https_support;
54 /**
55 * @var int Trial days.
56 */
57 public $trial_period;
58 /**
59 * @var string If true, require payment for trial.
60 */
61 public $is_require_subscription;
62 /**
63 * @var string Knowledge Base URL.
64 */
65 public $support_kb;
66 /**
67 * @var string Support Forum URL.
68 */
69 public $support_forum;
70 /**
71 * @var string Support email address.
72 */
73 public $support_email;
74 /**
75 * @var string Support phone.
76 */
77 public $support_phone;
78 public $support_skype;
79 /**
80 * @var bool Is personal success manager supported with the plan.
81 */
82 public $is_success_manager;
83 /**
84 * @var bool Is featured plan.
85 */
86 public $is_featured;
87 /**
88 * @var bool Is hidden plan.
89 */
90 public $is_hidden;
91 /**
92 * @var FS_Pricing[]
93 */
94 public $pricing;
95 /**
96 * @var object[]
97 */
98 public $features;
99
100 #endregion Properties
101
102 /**
103 * @param object|bool $plan
104 */
105 function __construct( $plan = false ) {
106 parent::__construct( $plan );
107
108 if ( is_object( $plan ) ) {
109 $this->name = strtolower( $plan->name );
110 }
111 }
112
113 static function get_type() {
114 return 'plan';
115 }
116
117 /**
118 * @author Vova Feldman (@svovaf)
119 * @since 1.0.9
120 *
121 * @return bool
122 */
123 function is_free() {
124 return ( 'free' === $this->name );
125 }
126
127 /**
128 * Checks if this plan supports "Technical Support".
129 *
130 * @author Leo Fajardo (leorw)
131 * @since 1.2.0
132 *
133 * @return bool
134 */
135 function has_technical_support() {
136 return ( ! empty( $this->support_email ) ||
137 ! empty( $this->support_phone ) ||
138 ! empty( $this->is_success_manager )
139 );
140 }
141
142 /**
143 * @author Vova Feldman (@svovaf)
144 * @since 1.0.9
145 *
146 * @return bool
147 */
148 function has_trial() {
149 return ! $this->is_free() &&
150 is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
151 }
152 }