\DevOwl\MultilingualUtils

Util functionalities.

Summary

Methods
Properties
Constants
getPluginConstantPrefix()
setupConstants()
withoutFilters()
expandKeys()
isJson()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this package so we can utils package natively.

Returns

string

setupConstants()

setupConstants()

Make sure the DEVOWL_MULTILINGUAL constants are available.

withoutFilters()

withoutFilters(string  $hook,callable  $callback): mixed

Run $callback with the $handler disabled for the $hook action/filter

Parameters

string $hook

filter name

callable $callback

function execited while filter disabled

Returns

mixed —

value returned by $callback

expandKeys()

expandKeys(array  $arr,string  $skipKeys = array())

Expand keys to dot notation so `skipKeys` works as expected and can skip multidimensional arrays. This functionality also keeps the reference!

Parameters

array $arr
string $skipKeys

isJson()

isJson(string  $string): array|false

Check if passed string is JSON.

Parameters

string $string

Returns

array|false