PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / trunk
Search Atlas SEO – OTTO AI SEO Automation for WordPress vtrunk
2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 2.6.4 2.6.3 2.5.23 All 138 releases
metasync / telemetry / privacy.php

privacy.php in Search Atlas SEO – OTTO AI SEO Automation for WordPress trunk, at telemetry/privacy.php

43 lines 968 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('WPINC')) {
4 die;
5 }
6
7 /**
8 * Determine whether telemetry is disabled before initializing handlers or sending.
9 */
10 function metasync_telemetry_is_disabled()
11 {
12 if (defined('METASYNC_DISABLE_TELEMETRY') && constant('METASYNC_DISABLE_TELEMETRY')) {
13 return true;
14 }
15
16 if (function_exists('get_option')) {
17 $options = get_option('metasync_options', array());
18 if (is_array($options) && !empty($options['disable_telemetry'])) {
19 return true;
20 }
21 }
22
23 return false;
24 }
25
26 /**
27 * Return only the path component of a request URI or URL.
28 */
29 function metasync_telemetry_request_path($request_uri = null)
30 {
31 if ($request_uri === null) {
32 $request_uri = $_SERVER['REQUEST_URI'] ?? '';
33 }
34
35 if (!is_string($request_uri) || $request_uri === '') {
36 return 'unknown';
37 }
38
39 $path = parse_url($request_uri, PHP_URL_PATH);
40
41 return is_string($path) && $path !== '' ? $path : '/';
42 }
43