Opened 16 years ago
Closed 16 years ago
#11729 closed enhancement (fixed)
Get rid of "default constants" in wp-settings
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Performance | Keywords: | has-patch |
| Focuses: | Cc: |
Description
We have this block of code in wp-settings.php:
$default_constants = array( 'WP_POST_REVISIONS' => true );
foreach ( $default_constants as $c => $v )
@define( $c, $v ); // will fail if the constant is already defined
unset($default_constants, $c, $v);
Since we haven't converted other constants in wp-settings.php over to this $default_constants convention, we should instead change this to the typical if !defined() define() we see throughout wp-settings.php.
At first, I was going to suggest we add a defined() check in that loop instead of suppressing errors, but removing it all together I think makes the most sense.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
Improving performance is always good