Skip to content
Docs
Get RestroPress

Filter

rpress_log_types

Updated
On this page

Filters the list of valid log type slugs.

Returned by RPRESS_Logging::log_types(), which also backs valid_type(). The defaults are sale, file_fooditem, gateway_error and api_request. A log entry only receives a type term when its type is in this list, so register custom types here before inserting entries that use them.

Parameters#

ParameterTypeDescription
$termsarrayLog type slugs.

Return value#

array. The valid log type slugs.

Example#

function my_log_types( $terms ) {
	$terms[] = 'my_integration';
	return $terms;
}
add_filter( 'rpress_log_types', 'my_log_types' );

Source#

Applied in:

  • includes/class-rpress-logging.php (line 95), in RPRESS_Logging::log_types()

See also#

Was this page helpful?