PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.39
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.39
51.1.86 51.1.84 51.1.85 51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 All 40 releases
king-addons / freemius / includes / managers / class-fs-license-manager.php

class-fs-license-manager.php in King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder 51.1.39, 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 https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
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 }