Documentation

UtilsProvider uses trait:short, trait:short

To make the composer package in packages/utils work we need to make the constant variables be passed to the High-Order class.

Put this trait in all your classes! Note also not to use the below methods by your plugin, instead use direct access to the constant. It just is for composer packages which needs to access dynamically the plugin!

Table of Contents

Methods

debug()  : string
Simple-to-use error_log debug log. This debug is only printed out when you define _DEBUG constant in wp-config.php
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
getTableName()  : string
Get a plugin relevant table name depending on the _DB_PREFIX constant.
isPro()  : bool
Is the current using plugin Pro version?

Methods

debug()

Simple-to-use error_log debug log. This debug is only printed out when you define _DEBUG constant in wp-config.php

public debug(mixed $message[, string $methodOrFunction = null ]) : string
Parameters
$message : mixed

The message

$methodOrFunction : string = null

METHOD or FUNCTION

Return values
string

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

getTableName()

Get a plugin relevant table name depending on the _DB_PREFIX constant.

public getTableName([string $name = '' ]) : string
Parameters
$name : string = ''

Append this name to the plugins relevant table with _{$name}.

Return values
string

isPro()

Is the current using plugin Pro version?

public isPro() : bool
Return values
bool
On this page

Search results