Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap authored Oct 11, 2020
1 parent a23c074 commit 63d38d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ A single-class utility to check the current request context in WordPress sites.

This is a Composer package, not a plugin, so first it needs to be installed via Composer.

After that, assuming Composer autoload file is loaded, very early in the load process, it is possible
to instantiate `WPContext` like this:
After that, assuming Composer autoload file is loaded, very early in the load process it is possible
to instantiate the `WpContext` like this:

```php
$context = Inpsyde\WpContext::determine();
```

The library does not implement singleton pattern, nor cache the retrieval of the current context,
The library does not implement singleton pattern, nor caches the retrieval of the current context,
so it might be a good idea to save the created instance somewhere globally accessible in your
plugin/theme/package/application.

Having an instance of `WpContext` it is possible to check the current context via its `is` method,
Having an instance of `WpContext`, it is possible to check the current context via its `is` method,
or context-specific methods.

For example:
Expand Down

0 comments on commit 63d38d0

Please sign in to comment.