PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
← All changes | src/Telemetry/telemetry-init.php +13 -4 3.16.2 → 3.24.2 View file →
@@ -1,7 +1,7 @@
1 1 <?php
2 2 /**
3 - * Telemetry: Telemetry activation and event registration for PHP events
3 + * Telemetry: Telemetry activation and event registration
4 4 *
5 5 * @package Parsely\Telemetry
6 6 * @since 3.12.0
7 7 */
@@ -12,10 +12,9 @@
12 12 use Parsely\Telemetry\Tracks;
13 13
14 14 require_once __DIR__ . '/class-telemetry-system.php';
15 15
16 -// If in a VIP environment, disable the existing Telemetry implementation.
17 -// This avoids duplicate events being sent to Tracks.
16 +// If in a VIP environment, prevent logging duplicate Tracks events.
18 17 if ( defined( 'VIP_GO_APP_ENVIRONMENT' ) ) {
19 18 add_filter( 'wp_parsely_enable_telemetry_backend', '__return_false' );
20 19 }
21 20
@@ -51,9 +50,9 @@
51 50 'accepted_args' => 4,
52 51 ),
53 52 // Setting events.
54 53 array(
55 - 'action_hook' => 'load-settings_page_parsely',
54 + 'action_hook' => 'load-parse-ly_page_parsely-settings',
56 55 'callable' => 'Parsely\Telemetry\record_settings_page_loaded',
57 56 ),
58 57 array(
59 58 'action_hook' => 'update_option_parsely',
@@ -64,4 +63,14 @@
64 63
65 64 $tracks->run();
66 65 }
67 66 );
67 +
68 +// Attempt to enable the Pendo JavaScript library. It's up to the Pendo class to
69 +// decide whether the library will be enabled.
70 +if ( class_exists( '\Automattic\VIP\Telemetry\Pendo' ) ) {
71 + add_action(
72 + 'admin_init',
73 + // @phpstan-ignore argument.type
74 + array( \Automattic\VIP\Telemetry\Pendo::class, 'enable_javascript_library' )
75 + );
76 +}