mainwp/modules/logs/includesfunctions.php

Defines common functionality used throughout the plugin.

Functions

mainwp_module_log_filter_var()

mainwp_module_log_filter_var(string  $var_value, integer  $filter = null, mixed  $options = array()) : \Returns

Filters a variable with a specified filter.

This is a polyfill function intended to be used in place of PHP's filter_var() function, which can occasionally be unreliable.

Parameters

string $var_value

Value to filter.

integer $filter

The ID of the filter to apply.

mixed $options

Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array. For the "callback" filter, callable type should be passed. The callback must accept one argument, the value to be filtered, and return the value after filtering/sanitizing it.

Returns

\Returns —

the filtered data, or FALSE if the filter fails.

mainwp_module_log_get_iso_8601_extended_date()

mainwp_module_log_get_iso_8601_extended_date(integer|boolean  $time = false, integer  $offset) : string

Converts a time into an ISO 8601 extended formatted string.

Parameters

integer|boolean $time

Seconds since unix epoch.

integer $offset

Timezone offset.

Returns

string —

an ISO 8601 extended formatted time