[wp-trac] [WordPress Trac] #41217: WP_Community_Events Disable Event Logs
WordPress Trac
noreply at wordpress.org
Thu Jul 27 15:28:33 UTC 2017
#41217: WP_Community_Events Disable Event Logs
-------------------------+-----------------------------
Reporter: Howdy_McGee | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.9
Component: Widgets | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
-------------------------+-----------------------------
Comment (by iandunn):
Replying to [comment:6 charlestonsw]:
> You're proposing adding another filter which is a lot of extra overhead.
You're adding data to the memory stack and forcing WP Core to pull through
the filter list and run callbacks.
I think that's a good point. Even a tiny thing like this adds up when
combined with all the other filters.
> if ( ! WP_COMMUNITY_EVENTS_LOG ) {
I think it'd need to be `if ( ! defined( 'WP_COMMUNITY_EVENTS_LOG' ) || !
WP_COMMUNITY_EVENTS_LOG )`, since PHP evaluates undefined constants as a
string with the name as the value (i.e., `'WP_COMMUNITY_EVENTS_LOG'`),
which then evaluates to `true`.
A name like`WP_DEBUG_LOG_EVENTS` might be a bit better, since it'd be
consistent with the related constants.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41217#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list