WordPress at Your Fingertips
function is not described

WP_Community_Events::maybe_log_events_response() protected WP 4.8.0

Deprecated from version 4.9.0. It is no longer supported and can be removed in future releases. See a plugin. See #41217 for an example.

Logs responses to Events API requests.

{} It's a method of the class: WP_Community_Events{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->maybe_log_events_response( $message, $details );
$message(string) (required)
A description of what occurred.
$details(array) (required)
Details that provide more context for the log entry.

Changelog

Since 4.8.0 Introduced.
Deprecated Since 4.9.0 Use a plugin instead. See #41217 for an example.

Code of WP_Community_Events::maybe_log_events_response() WP 5.8.2

protected function maybe_log_events_response( $message, $details ) {
	_deprecated_function( __METHOD__, '4.9.0' );

	if ( ! WP_DEBUG_LOG ) {
		return;
	}

	error_log(
		sprintf(
			'%s: %s. Details: %s',
			__METHOD__,
			trim( $message, '.' ),
			wp_json_encode( $details )
		)
	);
}