Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#11834 closed enhancement (fixed)

Use require() in wp-settings.php

Reported by: scribu's profile scribu Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:


Currently, require() and require_once() are used seemingly at random throughout wp-settings.php

We should default to require(), for uniformity, and also because it's faster.

Attachments (1)

wp-settings.patch (1.5 KB) - added by scottbasgaard 14 years ago.
Replaced 7 instances of require_once() with require() in wp-settings.php.

Download all attachments as: .zip

Change History (6)

#1 @secondv
15 years ago

The time difference between require_once() and require() is very small, you'd only see a significant difference if there were hundreds of require_once calls.

However, I'd agree that it does seem to be used at random throughout wp-settings. It looks like everything uses require() except the new multisite code & locale stuff.

#2 @McGurk
14 years ago

  • Cc jonathan.wilsson@… added

14 years ago

Replaced 7 instances of require_once() with require() in wp-settings.php.

#3 @scottbasgaard
14 years ago

  • Cc mail@… added
  • Keywords has-patch added; needs-patch removed

#4 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#5 @nacin
14 years ago

Sorry Scott, forgot the props. Thanks for the patch.

Note: See TracTickets for help on using tickets.