Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#11834 closed enhancement (fixed)

Use require() in wp-settings.php

Reported by: 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 6 years ago.
Replaced 7 instances of require_once() with require() in wp-settings.php.

Download all attachments as: .zip

Change History (6)

comment:1 @secondv6 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.

comment:2 @McGurk6 years ago

  • Cc jonathan.wilsson@… added

@scottbasgaard6 years ago

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

comment:3 @scottbasgaard6 years ago

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

comment:4 @nacin6 years ago

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

comment:5 @nacin6 years ago

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

Note: See TracTickets for help on using tickets.