WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 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:

Description

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

Download all attachments as: .zip

Change History (6)

comment:1 secondv4 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 McGurk4 years ago

  • Cc jonathan.wilsson@… added

scottbasgaard4 years ago

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

comment:3 scottbasgaard4 years ago

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

comment:4 nacin4 years ago

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

comment:5 nacin4 years ago

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

Note: See TracTickets for help on using tickets.