2017 © Pedro PelĂĄez
 

library theme-lib-environment

Environment helper functions for WordPress themes

image

mindkomm/theme-lib-environment

Environment helper functions for WordPress themes

  • Tuesday, February 13, 2018
  • by gchtr
  • Repository
  • 3 Watchers
  • 0 Stars
  • 98 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 42 % Grown

The README.md

Environment

Environment helper functions for WordPress themes., (*1)

Installation

You can install the package via Composer:, (*2)

composer require mindkomm/theme-lib-environment

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., (*3)

When no environment constant is set, the environment is considered a live environment., (*4)

Returns: bool, (*5)


is_visitor

Checks whether user is a normal site visitor., (*6)

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., (*7)

Use this in combination with other environment functions, e.g. is_live()., (*8)

Returns: bool, (*9)


is_stage

Checks if we are in a stating environment., (*10)

Returns: bool, (*11)


is_dev

Checks if we are in a development environment., (*12)

Returns: bool, (*13)


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., (*14)

The Versions

13/02 2018

dev-master

9999999-dev

Environment helper functions for WordPress themes

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

13/02 2018

1.0.0

1.0.0.0

Environment helper functions for WordPress themes

  Sources   Download

MIT

The Requires

  • php >=7.0.0