| 1 |
<?php |
| 2 |
/** |
| 3 |
* Version of THIS bundled copy of the POSIMYTH Analytics SDK. |
| 4 |
* |
| 5 |
* Read by posimyth-sdk-loader.php to decide which plugin's copy of the shared classes wins when |
| 6 |
* several POSIMYTH plugins are active. Bump it on ANY change to the shared SDK files, or an |
| 7 |
* updated plugin's fixes can silently lose to a sibling's older copy. |
| 8 |
* |
| 9 |
* 2.22.0 — the transport no longer blocks the browser on hosts that cannot flush the response. |
| 10 |
* do_request() set 'blocking' => false where fastcgi_finish_request() is unavailable (Apache mod_php, |
| 11 |
* LiteSpeed's PHP handler, php-cgi) on the belief that WordPress would write the request and not wait |
| 12 |
* for the reply. It does wait: WP_Http_Curl::request() still calls curl_exec() synchronously when |
| 13 |
* blocking is false and merely skips the write callbacks, so the worker AND the browser paid the full |
| 14 |
* hub round trip — ~4s, capped by the 5s timeout — on activate, deactivate and every catch-up |
| 15 |
* heartbeat. Measured: a dashboard load 0.13s → 5.96s, a deactivate ~1s → 5.27s. Now |
| 16 |
* litespeed_finish_request() is used where it exists, cron and WP-CLI requests block properly because |
| 17 |
* nothing is waiting on them, and on a user-facing request that cannot flush the event is handed to a |
| 18 |
* one-off cron event instead — which also moves the heartbeat's content scan off the admin request. |
| 19 |
* `deactivate` and the survey's own submission cannot be queued (the plugin is about to be inactive, |
| 20 |
* so nothing would be listening) and send inline under a hard 2s ceiling. The WP_DEBUG diagnostic |
| 21 |
* added in 2.21.0 follows the same condition, so it now works on mod_php instead of being disabled on |
| 22 |
* exactly the hosts that needed it. Also: enabled_widgets, widget_usage and plugin_meta are cast to |
| 23 |
* objects, so an empty map no longer serialises as `[]` while a populated one serialises as `{}` — |
| 24 |
* the hub joins the first two against each other and was receiving two JSON types for one key. |
| 25 |
* |
| 26 |
* 2.21.0 — a failed ping is no longer silent. do_request() discarded the hub's response entirely, so |
| 27 |
* a hub that accepted the request and then failed to store it was invisible to every product at once: |
| 28 |
* pings kept going out, rows stopped arriving, and nothing anywhere said so. It was found by probing |
| 29 |
* the endpoint by hand, which is not a monitoring strategy. Under WP_DEBUG, and only for the blocking |
| 30 |
* path where a status actually exists, a non-2xx reply now writes one line to the debug log. Nothing |
| 31 |
* changes for a site with debugging off. |
| 32 |
* |
| 33 |
* 2.20.0 — the reconciliation the previous revisions kept asking for. All four plugins now ship the |
| 34 |
* SAME three shared files, byte for byte apart from their text domain, and the SAME version number. |
| 35 |
* That restores the loader's own stated assumption ("the copies are byte-identical apart from their |
| 36 |
* text domain, so a tie has no wrong answer") and, with it, the point of this file: it now records |
| 37 |
* which BUILD a copy is, and no longer decides whose design or whose feature set every sibling gets. |
| 38 |
* |
| 39 |
* What was reconciled, and what each divergence had been costing: |
| 40 |
* |
| 41 |
* - Consent notice: the 2.19.0 treatment is now everyone's. The accent arrives as an inline |
| 42 |
* `--posi-accent` custom property on each instance's own markup and the stylesheet keys only on |
| 43 |
* the stable `posi-*` classes, so one stylesheet serves N brand colours. Before this, three copies |
| 44 |
* baked a literal colour and a product-specific class prefix into a stylesheet that is printed |
| 45 |
* ONCE for the whole page — which is how The Plus Addons' purple painted Sticky Header Effects' |
| 46 |
* notice, and Sticky Header Effects' raspberry painted The Plus Addons'. Never reintroduce a |
| 47 |
* prefix-keyed selector or a literal colour here: the stylesheet's instance and the markup's |
| 48 |
* instance are latched separately, so they are not guaranteed to be the same product. |
| 49 |
* |
| 50 |
* - Deactivation survey: the 2.16.0 design (accent top border, backdrop blur, 575px dialog) plus |
| 51 |
* callable `reasons`. The callable support existed only in the Nexter copies while a copy without |
| 52 |
* it held the highest version, and a copy that only accepts arrays does not error on a closure — |
| 53 |
* is_array() is simply false, so the config collapsed to the built-in seven. Nexter Extension and |
| 54 |
* Nexter Blocks both pass a closure, so both silently shipped the generic reason list instead of |
| 55 |
* their own branded cards. Callables are the supported way to defer __() out of `plugins_loaded`, |
| 56 |
* so dropping that block also re-breaks WP 6.7+ translation timing. |
| 57 |
* |
| 58 |
* Every product passes its own `accent` (and the legacy `css_prefix`) explicitly, even where the |
| 59 |
* value equals this SDK's neutral default. Branding is never inherited: a product that passes nothing |
| 60 |
* is painted by whichever copy won the loader, and that is precisely the coupling this revision |
| 61 |
* removes. The defaults here stay product-neutral for the same reason. |
| 62 |
* |
| 63 |
* Keeping it this way: change the shared files in ONE place, re-sync all five, bump this number in |
| 64 |
* all five together. A copy that diverges again re-creates the exact failure mode above, and it fails |
| 65 |
* silently — nothing errors, a sibling's design or defaults simply take over. |
| 66 |
* |
| 67 |
* @package POSIMYTH\Analytics\SDK |
| 68 |
*/ |
| 69 |
|
| 70 |
return '2.22.0'; |
| 71 |
|