PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.7
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.7
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/Modules/Logger.php +17 -14 3.1.33.7.7 View file →
@@ -26,9 +26,9 @@
26 26 class Logger extends Abstract_Module {
27 27 /**
28 28 * Endpoint where to collect logs.
29 29 */
30 - const TRACKING_ENDPOINT = 'http://log.themeisle.com/wp-json/v1/logs/';
30 + const TRACKING_ENDPOINT = 'https://api.themeisle.com/tracking/log';
31 31
32 32
33 33 /**
34 34 * Check if we should load the module for this product.
@@ -77,9 +77,9 @@
77 77 return;
78 78 }
79 79 $action_key = $this->product->get_key() . '_log_activity';
80 80 if ( ! wp_next_scheduled( $action_key ) ) {
81 - wp_schedule_single_event( time() + ( rand( 1, 24 ) * 3600 ), $action_key );
81 + wp_schedule_single_event( time() + ( wp_rand( 1, 24 ) * 3600 ), $action_key );
82 82 }
83 83 add_action( $action_key, array( $this, 'send_log' ) );
84 84
85 85 }
@@ -89,21 +89,24 @@
89 89 *
90 90 * @return bool Is logger active?
91 91 */
92 92 private function is_logger_active() {
93 + $default = 'no';
94 +
93 95 if ( ! $this->product->is_wordpress_available() ) {
94 - return true;
95 - }
96 - $pro_slug = $this->product->get_pro_slug();
96 + $default = 'yes';
97 + } else {
98 + $pro_slug = $this->product->get_pro_slug();
97 99
98 - if ( ! empty( $pro_slug ) ) {
99 - $all_products = Loader::get_products();
100 - if ( isset( $all_products[ $pro_slug ] ) ) {
101 - return true;
100 + if ( ! empty( $pro_slug ) ) {
101 + $all_products = Loader::get_products();
102 + if ( isset( $all_products[ $pro_slug ] ) ) {
103 + $default = 'yes';
104 + }
102 105 }
103 106 }
104 107
105 - return ( get_option( $this->product->get_key() . '_logger_flag', 'no' ) === 'yes' );
108 + return ( get_option( $this->product->get_key() . '_logger_flag', $default ) === 'yes' );
106 109 }
107 110
108 111 /**
109 112 * Add notification to queue.
@@ -150,10 +153,11 @@
150 153 $theme = wp_get_theme();
151 154 $environment['theme'] = array();
152 155 $environment['theme']['name'] = $theme->get( 'Name' );
153 156 $environment['theme']['author'] = $theme->get( 'Author' );
157 + $environment['theme']['parent'] = $theme->parent() !== false ? $theme->parent()->get( 'Name' ) : $theme->get( 'Name' );
154 158 $environment['plugins'] = get_option( 'active_plugins' );
155 -
159 + global $wp_version;
156 160 wp_remote_post(
157 161 self::TRACKING_ENDPOINT,
158 162 array(
159 163 'method' => 'POST',
@@ -158,15 +162,14 @@
158 162 array(
159 163 'method' => 'POST',
160 164 'timeout' => 3,
161 165 'redirection' => 5,
162 - 'headers' => array(
163 - 'X-ThemeIsle-Event' => 'log_site',
164 - ),
165 166 'body' => array(
166 167 'site' => get_site_url(),
167 168 'slug' => $this->product->get_slug(),
168 169 'version' => $this->product->get_version(),
170 + 'wp_version' => $wp_version,
171 + 'locale' => get_locale(),
169 172 'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
170 173 'environment' => $environment,
171 174 'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
172 175 ),