Files
Testing/tbs/wp-content/themes/dt-nimble/set-cookie.php
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

13 lines
238 B
PHP

<?php
if ( isset( $_GET['devicePixelRatio'] ) ) {
$dpr = $_GET['devicePixelRatio'];
// Validate value before setting cookie
if (''.intval($dpr) !== $dpr) {
$dpr = '1';
}
setcookie('devicePixelRatio', $dpr, 0, '/');
exit();
}
?>