Make WordPress Core

Ticket #41217: 41217.3.diff

File 41217.3.diff, 1.2 KB (added by iandunn, 8 years ago)

Minor style tweaks, switch to a constant

  • src/wp-admin/includes/class-wp-community-events.php

    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 { 
    5151         * }
    5252         */
    5353        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
    5468                $this->user_id       = absint( $user_id );
    5569                $this->user_location = $user_location;
    5670        }
    class WP_Community_Events { 
    434448         *                        log entry.
    435449         */
    436450        protected function maybe_log_events_response( $message, $details ) {
    437                 if ( ! WP_DEBUG_LOG ) {
     451                if ( ! WP_COMMUNITY_EVENTS_LOG ) {
    438452                        return;
    439453                }
    440454