PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.5
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.5
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.5, at freemius/includes/entities/class-fs-plugin.php

120 lines 2.8 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 * @author Leo Fajardo (@leorw)
35 *
36 * @since 1.2.3
37 *
38 * @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
39 */
40 public $affiliate_moderation;
41 /**
42 * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
43 */
44 public $is_wp_org_compliant = true;
45
46 #region Install Specific Properties
47
48 /**
49 * @var string
50 */
51 public $file;
52 /**
53 * @var string
54 */
55 public $version;
56 /**
57 * @var bool
58 */
59 public $auto_update;
60 /**
61 * @var FS_Plugin_Info
62 */
63 public $info;
64 /**
65 * @since 1.0.9
66 *
67 * @var bool
68 */
69 public $is_premium;
70 /**
71 * @since 1.0.9
72 *
73 * @var bool
74 */
75 public $is_live;
76
77 const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
78
79 #endregion Install Specific Properties
80
81 /**
82 * @param stdClass|bool $plugin
83 */
84 function __construct( $plugin = false ) {
85 parent::__construct( $plugin );
86
87 $this->is_premium = false;
88 $this->is_live = true;
89
90 if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
91 $this->info = new FS_Plugin_Info( $plugin->info );
92 }
93 }
94
95 /**
96 * Check if plugin is an add-on (has parent).
97 *
98 * @author Vova Feldman (@svovaf)
99 * @since 1.0.6
100 *
101 * @return bool
102 */
103 function is_addon() {
104 return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
105 }
106
107 /**
108 * @author Leo Fajardo (@leorw)
109 * @since 1.2.3
110 *
111 * @return bool
112 */
113 function has_affiliate_program() {
114 return ( ! empty( $this->affiliate_moderation ) );
115 }
116
117 static function get_type() {
118 return 'plugin';
119 }
120 }