Warning: This method has been deprecated. Use a plugin instead. See #41217 for an example.

WP_Community_Events::maybe_log_events_response() WordPress Method

WP_Community_Events::maybe_log_events_response() is a Wordpress method that checks if a given community events request was successful. If the request was successful, it logs the response data. This is useful for debugging purposes.

WP_Community_Events::maybe_log_events_response( string $message, array $details ) #

Logs responses to Events API requests.


Parameters

$message

(string)(Required)A description of what occurred.

$details

(array)(Required)Details that provide more context for the log entry.


Top ↑

Source

File: wp-admin/includes/class-wp-community-events.php

	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 )
			)
		);
	}


Top ↑

Changelog

Changelog
VersionDescription
4.9.0Use a plugin instead. See #41217 for an example.
4.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.