Skip to content

Instantly share code, notes, and snippets.

@vovafeldman
Forked from alanef/detect_playground.php
Created November 23, 2023 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vovafeldman/2184da6f70ba87e01050b6a98e0a9c03 to your computer and use it in GitHub Desktop.
Save vovafeldman/2184da6f70ba87e01050b6a98e0a9c03 to your computer and use it in GitHub Desktop.
Detect WP Playground
<?php
if ( 'PHP.wasm' === $_SERVER['SERVER_SOFTWARE'] && 'playground.wordpress.net' === $_SERVER['HTTP_HOST'] ) {
// inside playground.wordpress.net
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment