Skip to content

Instantly share code, notes, and snippets.

@alanef
Last active March 20, 2024 14:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save alanef/9569f77c285c7b30ba103c4ac5399883 to your computer and use it in GitHub Desktop.
Save alanef/9569f77c285c7b30ba103c4ac5399883 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