diff --git src/wp-admin/includes/class-wp-community-events.php src/wp-admin/includes/class-wp-community-events.php
index 2eda6a0834..83dcb0731b 100644
|
|
|
class WP_Community_Events { |
| 51 | 51 | * } |
| 52 | 52 | */ |
| 53 | 53 | public function __construct( $user_id, $user_location = false ) { |
| | 54 | /** |
| | 55 | * Disable logging for API requests and responses by default. |
| | 56 | * |
| | 57 | * The logs are useful when troubleshooting unexpected results from the API, but they're |
| | 58 | * not needed under normal circumstances. |
| | 59 | * |
| | 60 | * @since 4.9.0 |
| | 61 | * @var bool WP_COMMUNITY_EVENTS_LOG Enable or disable logging of requests to the |
| | 62 | * WordPress.org Events API. Default false. |
| | 63 | */ |
| | 64 | if ( ! defined( 'WP_COMMUNITY_EVENTS_LOG' ) ) { |
| | 65 | define( 'WP_COMMUNITY_EVENTS_LOG', false ); |
| | 66 | } |
| | 67 | |
| 54 | 68 | $this->user_id = absint( $user_id ); |
| 55 | 69 | $this->user_location = $user_location; |
| 56 | 70 | } |
| … |
… |
class WP_Community_Events { |
| 434 | 448 | * log entry. |
| 435 | 449 | */ |
| 436 | 450 | protected function maybe_log_events_response( $message, $details ) { |
| 437 | | if ( ! WP_DEBUG_LOG ) { |
| | 451 | if ( ! WP_COMMUNITY_EVENTS_LOG ) { |
| 438 | 452 | return; |
| 439 | 453 | } |
| 440 | 454 | |