Skip to content

Instantly share code, notes, and snippets.

@laxmariappan
Created December 12, 2023 17:29
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 laxmariappan/12fba7f207b85b8857bd62a0f50bb61f to your computer and use it in GitHub Desktop.
Save laxmariappan/12fba7f207b85b8857bd62a0f50bb61f to your computer and use it in GitHub Desktop.
wp-context package example
<?php
use Inpsyde\WpContext;
// Instantiate the class
$context = WpContext::determine();
// Use the WpContext::is() method to check context
if (!$context->is(WpContext::FRONTOFFICE, WpContext::BACKOFFICE)) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment