PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 4.0.9
Visualizer – Tables & Charts Manager with Built-in AI Generator v4.0.9
4.0.9 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 All 150 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php +18 -4 4.0.6 → 4.0.9 View file →
@@ -101,19 +101,33 @@
101 101 *
102 102 * @return bool Is logger active?
103 103 */
104 104 private function is_logger_active() {
105 + return self::is_logging_active( $this->product );
106 + }
107 +
108 + /**
109 + * Check if the logging consent is granted for a product.
110 + *
111 + * Shared with the other telemetry modules (e.g. the crash reporter) so the
112 + * consent semantics live in a single place.
113 + *
114 + * @param \ThemeisleSDK\Product $product Product to check.
115 + *
116 + * @return bool Is logging active for the product?
117 + */
118 + public static function is_logging_active( $product ) {
105 119 if ( apply_filters( 'themeisle_sdk_disable_telemetry', false ) ) {
106 120 return false;
107 121 }
108 122 $default = 'no';
109 123
110 - if ( ! $this->product->is_wordpress_available() ) {
124 + if ( ! $product->is_wordpress_available() ) {
111 125 $default = 'yes';
112 126 } else {
113 127 $all_products = Loader::get_products();
114 - foreach ( $all_products as $product ) {
115 - if ( $product->requires_license() ) {
128 + foreach ( $all_products as $registered_product ) {
129 + if ( $registered_product->requires_license() ) {
116 130 $default = 'yes';
117 131 break;
118 132 }
119 133 }
@@ -119,9 +133,9 @@
119 133 }
120 134 }
121 135
122 136
123 - return ( get_option( $this->product->get_key() . '_logger_flag', $default ) === 'yes' );
137 + return ( get_option( $product->get_key() . '_logger_flag', $default ) === 'yes' );
124 138 }
125 139 /**
126 140 * Add notification to queue.
127 141 *