Created
December 12, 2023 17:29
-
-
Save laxmariappan/12fba7f207b85b8857bd62a0f50bb61f to your computer and use it in GitHub Desktop.
wp-context package example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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