\TGMPA_Utils

Generic utilities for TGMPA.

All methods are static, poor-dev name-spacing class wrapper.

Class was called TGM_Utils in 2.5.0 but renamed TGMPA_Utils in 2.5.1 as this was conflicting with Soliloquy.

Summary

Methods
Properties
Constants
wrap_in_em()
wrap_in_strong()
validate_bool()
$has_filters
No constants found
emulate_filter_bool()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$has_filters

$has_filters : bool

Whether the PHP filter extension is enabled.

Type

bool — True is the extension is enabled.

Methods

wrap_in_em()

wrap_in_em(string $string) : string

Wrap an arbitrary string in <em> tags. Meant to be used in combination with array_map().

Parameters

string $string

Text to be wrapped.

Returns

string

wrap_in_strong()

wrap_in_strong(string $string) : string

Wrap an arbitrary string in <strong> tags. Meant to be used in combination with array_map().

Parameters

string $string

Text to be wrapped.

Returns

string

validate_bool()

validate_bool(mixed $value) : bool

Helper function: Validate a value as boolean

Parameters

mixed $value

Arbitrary value.

Returns

bool

emulate_filter_bool()

emulate_filter_bool(mixed $value) : bool

Helper function: Cast a value to bool

Parameters

mixed $value

Value to cast.

Returns

bool