Download the PHP package mindkomm/theme-lib-environment without Composer
On this page you can find all versions of the php package mindkomm/theme-lib-environment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mindkomm/theme-lib-environment
More information about mindkomm/theme-lib-environment
Files in mindkomm/theme-lib-environment
Package theme-lib-environment
Short Description Environment helper functions for WordPress themes
License MIT
Informations about the package theme-lib-environment
Environment
Environment helper functions for WordPress themes.
Installation
You can install the package via Composer:
Functions
Name | Summary | Type | Returns/Description |
---|---|---|---|
is_dev | Checks if we are in a development environment. | bool |
|
is_live | Checks if we are in a live environment. | bool |
|
is_stage | Checks if we are in a stating environment. | bool |
|
is_visitor | Checks whether user is a normal site visitor. | bool |
is_live
Checks if we are in a live environment.
When no environment constant is set, the environment is considered a live environment.
Returns: bool
is_visitor
Checks whether user is a normal site visitor.
This is mostly used to include scripts related to analytics and data tracking. For that, we normally do not want to have admin calls and frontend calls made by logged-in users.
Use this in combination with other environment functions, e.g. is_live().
Returns: bool
is_stage
Checks if we are in a stating environment.
Returns: bool
is_dev
Checks if we are in a development environment.
Returns: bool
Support
This is a library that we use at MIND to develop WordPress themes. You’re free to use it, but currently, we don’t provide any support.