Make WordPress Core

Opened 20 years ago

Closed 19 years ago

Last modified 19 years ago

#3057 closed enhancement (wontfix)

No load wp-settings.php from wp-config.php

Reported by: forceagainstsomething Owned by:
Priority: low Milestone:
Component: Administration Version: 2.1
Severity: normal Keywords: settings, config has-patch
Cc: Focuses:

Description

Plugin developers may want to include the wp-config.php without loading wp-settings.php. Included is a patch to correct. Usage:

define('NOLOAD_WPSETTINGS', true);
include('wp-config.php');

Defining NOLOAD_WPSETTINGS tells WP to skip loading wp-settings.php.

Attachments (2)

noload.diff​ (352 bytes ) - added by forceagainstsomething 20 years ago.
No load wp-settings patch
3057.diff​ (341 bytes ) - added by Nazgul 20 years ago.

Download all attachments as: .zip

Change History (10)

@forceagainstsomething
20 years ago

No load wp-settings patch

#1 @forceagainstsomething
20 years ago

Just realized in the patch I put the code below the Turn register globals off comment. Suppose that should be above it.

#2 @Nazgul
20 years ago

  • Keywords has-patch added
  • Milestone → 2.1

Updated the attached patch according to forceagainstsomething's suggestions.

#3 @matt
20 years ago

  • Milestone 2.1 → 2.2

#4 @foolswisdom
20 years ago

  • Milestone 2.2 → 2.3

#5 @markjaquith
19 years ago

  • Milestone 2.3 → 2.4 (next)
  • Priority normal → low

Punting.

Can you provide an example of why a plugin author would want to do this?

#6 @intoxination
19 years ago

I actually do the same basic thing on a couple of sites I manage. It's just to keep the database config information in one file and so other pages non WP dependent can access just the database connection information. It's a good idea, but I don't think it's a must, as the use will be very limited.

#7 @markjaquith
19 years ago

  • Resolution → wontfix
  • Status new → closed

Limited use -- plus it would only work on new installs, since wp-config.php is never touched after install. So doesn't sound like a good candidate for core.

#8 @markjaquith
19 years ago

  • Milestone 2.4 (next)
Note: See TracTickets for help on using tickets.