X7ROOT File Manager
Current Path:
/home/hamdjcne/public_html/wp-content/plugins/otter-blocks/inc
home
/
hamdjcne
/
public_html
/
wp-content
/
plugins
/
otter-blocks
/
inc
/
ðŸ“
..
📄
Tracker.php
(1.36 KB)
📄
class-base-css.php
(15.97 KB)
📄
class-blocks-animation.php
(6.32 KB)
📄
class-blocks-css.php
(6.79 KB)
📄
class-blocks-export-import.php
(2.08 KB)
📄
class-main.php
(14.57 KB)
📄
class-patterns.php
(4.39 KB)
📄
class-pro.php
(16.95 KB)
📄
class-registration.php
(36.58 KB)
ðŸ“
css
ðŸ“
integrations
ðŸ“
patterns
ðŸ“
plugins
ðŸ“
render
ðŸ“
server
Editing: Tracker.php
<?php /** * Class for telemetry. * * @package ThemeIsle */ namespace ThemeIsle\GutenbergBlocks; /** * Class Tracker */ class Tracker { /** * Tracking URL. * * @var string */ public static $track_url = 'https://api.themeisle.com/tracking/events'; /** * Send data to the server if the user has opted in. * * @param array<array> $events Data to track. * @param array $options Options. * @return void */ public static function track( $events, $options = array() ) { if ( ! self::has_consent() && ( ! isset( $options['hasConsent'] ) || ! $options['hasConsent'] ) ) { return; } try { $payload = array(); $license = apply_filters( 'product_otter_license_key', 'free' ); if ( 'free' !== $license ) { $license = wp_hash( $license ); } foreach ( $events as $event ) { $payload[] = array( 'slug' => 'otter', 'site' => get_site_url(), 'license' => $license, 'data' => $event, ); } $args = array( 'headers' => array( 'Content-Type' => 'application/json', ), 'body' => wp_json_encode( $payload ), ); wp_remote_post( self::$track_url, $args ); } finally { return; } } /** * Check if the user has consented to tracking. * * @return bool */ public static function has_consent() { return (bool) get_option( 'otter_blocks_logger_flag', false ); } }
Upload File
Create Folder