PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.9.5
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.9.5
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Loader.php +35 -4 3.1.33.9.5 View file →
@@ -49,14 +49,15 @@
49 49 'dashboard_widget',
50 50 'rollback',
51 51 'uninstall_feedback',
52 52 'licenser',
53 - 'endpoint',
54 - 'notification',
55 53 'logger',
56 54 'translate',
57 55 'review',
58 -
56 + 'recommendation',
57 + 'notification',
58 + 'promotions',
59 + 'compatibilities',
59 60 ];
60 61
61 62 /**
62 63 * Initialize the sdk logic.
@@ -74,8 +75,30 @@
74 75 }
75 76 }
76 77
77 78 /**
79 + * Get cache token used in API requests.
80 + *
81 + * @return string Cache token.
82 + */
83 + public static function get_cache_token() {
84 + $cache_token = get_transient( 'themeisle_sdk_cache_token' );
85 + if ( false === $cache_token ) {
86 + $cache_token = wp_generate_password( 6, false );
87 + set_transient( $cache_token, WEEK_IN_SECONDS );
88 + }
89 +
90 + return $cache_token;
91 + }
92 +
93 + /**
94 + * Clear cache token.
95 + */
96 + public static function clear_cache_token() {
97 + delete_transient( 'themeisle_sdk_cache_token' );
98 + }
99 +
100 + /**
78 101 * Register product into SDK.
79 102 *
80 103 * @param string $base_file The product base file.
81 104 *
@@ -82,9 +105,9 @@
82 105 * @return Loader The singleton object.
83 106 */
84 107 public static function add_product( $base_file ) {
85 108
86 - if ( ! is_readable( $base_file ) ) {
109 + if ( ! is_file( $base_file ) ) {
87 110 return self::$instance;
88 111 }
89 112 $product = new Product( $base_file );
90 113
@@ -112,6 +135,14 @@
112 135 public static function get_products() {
113 136 return self::$products;
114 137 }
115 138
139 + /**
140 + * Get the version of the SDK.
141 + *
142 + * @return string The version.
143 + */
144 + public static function get_version() {
145 + return self::$version;
146 + }
116 147
117 148 }