Changeset 3232302
- Timestamp:
- 01/30/2025 09:07:47 PM (13 months ago)
- Location:
- wide-angle-analytics/trunk
- Files:
-
- 6 edited
-
readme.txt (modified) (2 diffs)
-
types/WideAngleAttributes.php (modified) (3 diffs)
-
types/WideAngleGenerator.php (modified) (3 diffs)
-
types/WideAngleHelpers.php (modified) (1 diff)
-
views/admin_settings.php (modified) (2 diffs)
-
wide-angle-analytics.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wide-angle-analytics/trunk/readme.txt
r3080050 r3232302 5 5 Tested up to: 6.5.2 6 6 Requires PHP: 7.2 7 Stable tag: 1.0. 87 Stable tag: 1.0.9 8 8 License: GPLv2 9 9 … … 62 62 63 63 == Changelog == 64 v1.0.9 65 - Correct the API type from "supress" to "suppress" 66 64 67 V1.0.8 65 68 - Expose DNT Flag override -
wide-angle-analytics/trunk/types/WideAngleAttributes.php
r3080050 r3232302 7 7 public $exclusionString; 8 8 public $includeParamsString; 9 public $sup ressDnt;9 public $suppressDnt; 10 10 private $helpers; 11 11 12 public function __construct($siteId, $trackerDomain, $ignoreHash, $exclusionString, $includeParamsString, $fingerprint, $sup ressDnt) {12 public function __construct($siteId, $trackerDomain, $ignoreHash, $exclusionString, $includeParamsString, $fingerprint, $suppressDnt) { 13 13 $this->siteId = $siteId; 14 14 $this->trackerDomain = $trackerDomain; … … 18 18 $this->fingerprint = $fingerprint; 19 19 $this->ePrivacyMode = $ePrivacyMode; 20 $this->sup ressDnt = $supressDnt;20 $this->suppressDnt = $suppressDnt; 21 21 $this->helpers = new WideAngleHelpers(); 22 22 } … … 28 28 'ignore_hash' => $this->ignoreHash, 29 29 'fingerprint' => $this->fingerprint, 30 'sup ress_dnt' => $this->supressDnt,30 'suppress_dnt' => $this->suppressDnt, 31 31 'exclusion_paths' => $this->generateExclusionsAttribute(), 32 32 'include_params' => $this->generateIncludeParamsAttribute() -
wide-angle-analytics/trunk/types/WideAngleGenerator.php
r3080050 r3232302 16 16 $this->includeParams = $attributes['include_params']; 17 17 $this->fingerprint = $attributes['fingerprint']; 18 $this->sup ressDnt = $attributes['supress_dnt'];18 $this->suppressDnt = $attributes['suppress_dnt']; 19 19 } 20 20 … … 34 34 $ignoreHashAttribute = $this->ignoreHash != '' ? "data-waa-ignore-hash=\"" . esc_attr($this->ignoreHash) . "\"": 'data-waa-ignore-hash="false"'; 35 35 $fingerprintAttribute = $this->fingerprint != '' ? "data-waa-fingerprint=\"" . esc_attr($this->fingerprint) . "\"": ''; 36 $sup ressDntAttribute = $this->supressDnt != '' ? "data-waa-dnt-supress=\"" . esc_attr($this->supressDnt) . "\"": 'data-waa-dnt-supress="false"';36 $suppressDntAttribute = $this->suppressDnt != '' ? "data-waa-dnt-suppress=\"" . esc_attr($this->suppressDnt) . "\"": 'data-waa-dnt-suppress="false"'; 37 37 $script = <<<EOD 38 38 <script async defer … … 40 40 $fingerprintAttribute 41 41 $ignoreHashAttribute 42 $sup ressDntAttribute42 $suppressDntAttribute 43 43 $includeParamsAttribute 44 44 $pathExlusionsAttribute></script> -
wide-angle-analytics/trunk/types/WideAngleHelpers.php
r3080050 r3232302 30 30 } 31 31 32 function validateSup ressDntFlag($name, $supressDnt) {33 if(filter_var($sup ressDnt, FILTER_VALIDATE_BOOLEAN)) {34 return WideAngleValidated::createValid($name, $sup ressDnt, "true");32 function validateSuppressDntFlag($name, $suppressDnt) { 33 if(filter_var($suppressDnt, FILTER_VALIDATE_BOOLEAN)) { 34 return WideAngleValidated::createValid($name, $suppressDnt, "true"); 35 35 } else { 36 return WideAngleValidated::createValid($name, $sup ressDnt, "false");36 return WideAngleValidated::createValid($name, $suppressDnt, "false"); 37 37 } 38 38 } -
wide-angle-analytics/trunk/views/admin_settings.php
r3080050 r3232302 3 3 $trackerDomain = wp_unslash($this->settings[self::WAA_CONF_TRACKER_DOMAIN]); 4 4 $ignoreHash = filter_var($this->settings[self::WAA_CONF_IGNORE_HASH], FILTER_VALIDATE_BOOLEAN); 5 $sup ressDnt = filter_var($this->settings[self::WAA_CONF_SUPRESS_DNT], FILTER_VALIDATE_BOOLEAN);5 $suppressDnt = filter_var($this->settings[self::WAA_CONF_SUPPRESS_DNT], FILTER_VALIDATE_BOOLEAN); 6 6 $fingerprint = filter_var($this->settings[self::WAA_CONF_FINGERPRINT], FILTER_VALIDATE_BOOLEAN); 7 7 $parsedExclusions = $this->plugin->helpers->parseExclusionSetting(wp_unslash($this->settings[self::WAA_CONF_EXC_PATHS])); … … 129 129 </tr> 130 130 <tr> 131 <th scope="row"><label>Sup ress Do-Not-Track</label></th>131 <th scope="row"><label>Suppress Do-Not-Track</label></th> 132 132 <td> 133 133 <fieldset> 134 <legend class="screen-reader-text"><span>Sup ress Do-Not-Track</span></legend>134 <legend class="screen-reader-text"><span>Suppress Do-Not-Track</span></legend> 135 135 <label> 136 <input id="waa_sup ress_dnt" type="checkbox" name="waa_supress_dnt" <?php if($supressDnt) { echo "checked"; } ?>/> Supress136 <input id="waa_suppress_dnt" type="checkbox" name="waa_suppress_dnt" <?php if($suppressDnt) { echo "checked"; } ?>/> Suppress 137 137 </label> 138 138 </fieldset> -
wide-angle-analytics/trunk/wide-angle-analytics.php
r3080050 r3232302 6 6 Author: Wide Angle Analytics by Input Objects GmbH 7 7 Author URI: https://wideangle.co 8 Version: 1.0. 88 Version: 1.0.9 9 9 Requires at least: 5.2 10 10 Requires PHP: 7.2 … … 22 22 const WAA_CONF_INC_PARAMS = "waa_inc_params"; 23 23 const WAA_CONF_IGNORE_HASH = "waa_ignore_hash"; 24 const WAA_CONF_SUP RESS_DNT = "waa_supress_dnt";24 const WAA_CONF_SUPPRESS_DNT = "waa_suppress_dnt"; 25 25 const WAA_CONF_ATTRIBUTES = "waa_attributes"; 26 26 … … 124 124 $waaIgnoreHash = $this->plugin->helpers->validateIgnoreHashFlag(self::WAA_CONF_IGNORE_HASH, sanitize_text_field($_REQUEST['waa_ignore_hash'])); 125 125 $waaFingerprint = $this->plugin->helpers->validateFingerprint(self::WAA_CONF_FINGERPRINT, sanitize_text_field($_REQUEST['waa_fingerprint'])); 126 $waaSup ressDnt = $this->plugin->helpers->validateSupressDntFlag(self::WAA_CONF_SUPRESS_DNT, sanitize_text_field($_REQUEST['waa_supress_dnt']));126 $waaSuppressDnt = $this->plugin->helpers->validateSuppressDntFlag(self::WAA_CONF_SUPPRESS_DNT, sanitize_text_field($_REQUEST['waa_suppress_dnt'])); 127 127 $waaIncParams = $this->plugin->helpers->validateIncludeParams(self::WAA_CONF_INC_PARAMS, $_REQUEST); 128 128 $waaExclusionPaths = $this->plugin->helpers->validateExclusionPathsRequest(self::WAA_CONF_EXC_PATHS, $_REQUEST); 129 129 130 130 include_once( $this->plugin->folder . '/types/WideAngleAttributes.php'); 131 $merged = array($waaSiteId, $waaTrackerDomain, $waaIgnoreHash, $waaIncParams, $waaExclusionPaths, $waaSup ressDnt);131 $merged = array($waaSiteId, $waaTrackerDomain, $waaIgnoreHash, $waaIncParams, $waaExclusionPaths, $waaSuppressDnt); 132 132 $errors = array(); 133 133 foreach($merged as $validated) { … … 145 145 $waaIncParams->get_value(), 146 146 $waaFingerprint->get_value(), 147 $waaSup ressDnt->get_value()147 $waaSuppressDnt->get_value() 148 148 ); 149 149 update_option(self::WAA_CONF_SITE_ID, $waaSiteId->get_value()); … … 153 153 update_option(self::WAA_CONF_INC_PARAMS, $waaIncParams->get_value()); 154 154 update_option(self::WAA_CONF_FINGERPRINT, $waaFingerprint->get_value()); 155 update_option(self::WAA_CONF_SUP RESS_DNT, $waaSupressDnt->get_value());155 update_option(self::WAA_CONF_SUPPRESS_DNT, $waaSuppressDnt->get_value()); 156 156 update_option(self::WAA_CONF_ATTRIBUTES, $attributes->generateAttributes()); 157 157 $this->message = __('Settings updated', $this->plugin->name); … … 168 168 self::WAA_CONF_IGNORE_HASH => get_option(self::WAA_CONF_IGNORE_HASH), 169 169 self::WAA_CONF_FINGERPRINT => get_option(self::WAA_CONF_FINGERPRINT), 170 self::WAA_CONF_SUP RESS_DNT => get_option(self::WAA_CONF_SUPRESS_DNT),170 self::WAA_CONF_SUPPRESS_DNT => get_option(self::WAA_CONF_SUPPRESS_DNT), 171 171 self::WAA_CONF_ATTRIBUTES => get_option(self::WAA_CONF_ATTRIBUTES) 172 172 ); … … 183 183 * - waa_inc_params 184 184 * - waa_ignore_hash 185 * - waa_sup ress_dnt185 * - waa_suppress_dnt 186 186 * - waa_header_script 187 187 * - waa_footer_script … … 194 194 register_setting($this->plugin->name, self::WAA_CONF_IGNORE_HASH, array('default' => 'false')); 195 195 register_setting($this->plugin->name, self::WAA_CONF_FINGERPRINT, array('default' => 'false')); 196 register_setting($this->plugin->name, self::WAA_CONF_SUP RESS_DNT, array('default' => 'false'));196 register_setting($this->plugin->name, self::WAA_CONF_SUPPRESS_DNT, array('default' => 'false')); 197 197 register_setting($this->plugin->name, self::WAA_CONF_ATTRIBUTES, array('type' => 'array')); 198 198 }
Note: See TracChangeset
for help on using the changeset viewer.