PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.2
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.2
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 / managers / class-fs-license-manager.php

class-fs-license-manager.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.2, at freemius/includes/managers/class-fs-license-manager.php

104 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 http://opensource.org/licenses/gpl-2.0.php GNU Public License
6 * @since 1.0.6
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 class FS_License_Manager /*extends FS_Abstract_Manager*/
14 {
15 //
16 //
17 // /**
18 // * @var FS_License_Manager[]
19 // */
20 // private static $_instances = array();
21 //
22 // static function instance( Freemius $fs ) {
23 // $slug = strtolower( $fs->get_slug() );
24 //
25 // if ( ! isset( self::$_instances[ $slug ] ) ) {
26 // self::$_instances[ $slug ] = new FS_License_Manager( $slug, $fs );
27 // }
28 //
29 // return self::$_instances[ $slug ];
30 // }
31 //
32 //// private function __construct($slug) {
33 //// parent::__construct($slug);
34 //// }
35 //
36 // function entry_id() {
37 // return 'licenses';
38 // }
39 //
40 // function sync( $id ) {
41 //
42 // }
43 //
44 // /**
45 // * @author Vova Feldman (@svovaf)
46 // * @since 1.0.5
47 // * @uses FS_Api
48 // *
49 // * @param number|bool $plugin_id
50 // *
51 // * @return FS_Plugin_License[]|stdClass Licenses or API error.
52 // */
53 // function api_get_user_plugin_licenses( $plugin_id = false ) {
54 // $api = $this->_fs->get_api_user_scope();
55 //
56 // if ( ! is_numeric( $plugin_id ) ) {
57 // $plugin_id = $this->_fs->get_id();
58 // }
59 //
60 // $result = $api->call( "/plugins/{$plugin_id}/licenses.json" );
61 //
62 // if ( ! isset( $result->error ) ) {
63 // for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
64 // $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
65 // }
66 //
67 // $result = $result->licenses;
68 // }
69 //
70 // return $result;
71 // }
72 //
73 // function api_get_many() {
74 //
75 // }
76 //
77 // function api_activate( $id ) {
78 //
79 // }
80 //
81 // function api_deactivate( $id ) {
82 //
83 // }
84
85 /**
86 * @param FS_Plugin_License[] $licenses
87 *
88 * @return bool
89 */
90 static function has_premium_license( $licenses ) {
91 if ( is_array( $licenses ) ) {
92 foreach ( $licenses as $license ) {
93 /**
94 * @var FS_Plugin_License $license
95 */
96 if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
97 return true;
98 }
99 }
100 }
101
102 return false;
103 }
104 }