[buddypress-trac] [BuddyPress Trac] #5847: ABSPATH checks could be simpler
buddypress-trac
noreply at wordpress.org
Fri Aug 29 22:44:44 UTC 2014
#5847: ABSPATH checks could be simpler
-----------------------------+-----------------
Reporter: johnjamesjacoby | Owner:
Type: task | Status: new
Priority: normal | Milestone: 2.2
Component: All Components | Version:
Severity: normal | Keywords:
-----------------------------+-----------------
We currently do:
`if ( !defined( 'ABSPATH' ) ) exit;`
But could get away with:
`defined( 'ABSPATH' ) || exit;`
Two wins here:
* Simpler code and a bit easier on the eyes
* Passes code styling linters looking for brackets on comparisons
129 instances would need changing. The task is trivial, but the changes
are sprawling. I figure we can do this in 2.2 to avoid changing basically
every file in the project while in beta, but if no one is vehemently
opposed, we can do this pretty much anytime.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5847>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list