PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.4.3
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.4.3
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
buttonizer-multifunctional-button / freemius / includes / entities / class-fs-plugin.php

class-fs-plugin.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.4.3, at freemius/includes/entities/class-fs-plugin.php

117 lines 2.1 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.3
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 class FS_Plugin extends FS_Scope_Entity {
14 /**
15 * @since 1.0.6
16 * @var null|number
17 */
18 public $parent_plugin_id;
19 /**
20 * @var string
21 */
22 public $title;
23 /**
24 * @var string
25 */
26 public $slug;
27 /**
28 * @since 1.2.2
29 *
30 * @var string 'plugin' or 'theme'
31 */
32 public $type;
33
34 #region Install Specific Properties
35
36 /**
37 * @var string
38 */
39 public $file;
40 /**
41 * @var string
42 */
43 public $version;
44 /**
45 * @var bool
46 */
47 public $auto_update;
48 /**
49 * @var FS_Plugin_Info
50 */
51 public $info;
52 /**
53 * @since 1.0.9
54 *
55 * @var bool
56 */
57 public $is_premium;
58 /**
59 * @since 1.0.9
60 *
61 * @var bool
62 */
63 public $is_live;
64 /**
65 * @author Leo Fajardo (@leorw)
66 *
67 * @since 1.2.3
68 *
69 * @var string|false false if the module doesn't have an affiliate program or one of the following:
70 * 'selected', 'customers', or 'all'.
71 */
72 public $affiliate_moderation;
73
74 const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
75
76 #endregion Install Specific Properties
77
78 /**
79 * @param stdClass|bool $plugin
80 */
81 function __construct( $plugin = false ) {
82 parent::__construct( $plugin );
83
84 $this->is_premium = false;
85 $this->is_live = true;
86
87 if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
88 $this->info = new FS_Plugin_Info( $plugin->info );
89 }
90 }
91
92 /**
93 * Check if plugin is an add-on (has parent).
94 *
95 * @author Vova Feldman (@svovaf)
96 * @since 1.0.6
97 *
98 * @return bool
99 */
100 function is_addon() {
101 return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
102 }
103
104 /**
105 * @author Leo Fajardo (@leorw)
106 * @since 1.2.3
107 *
108 * @return bool
109 */
110 function has_affiliate_program() {
111 return ( ! empty( $this->affiliate_moderation ) );
112 }
113
114 static function get_type() {
115 return 'plugin';
116 }
117 }