Skip to content

Instantly share code, notes, and snippets.

@lkoudal
Forked from alanef/detect_playground.php
Created March 20, 2024 14:34
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 lkoudal/0f999d2d2d4ab0c1ca72add25d23a015 to your computer and use it in GitHub Desktop.
Save lkoudal/0f999d2d2d4ab0c1ca72add25d23a015 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