mindkomm/theme-lib-environment

Environment helper functions for WordPress themes

1.0.0 2018-02-13 09:39 UTC

This package is auto-updated.

Last update: 2024-12-05 06:35:48 UTC


README

Environment helper functions for WordPress themes.

Installation

You can install the package via Composer:

composer require mindkomm/theme-lib-environment

Functions

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.