Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#3057 closed enhancement (wontfix)

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

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

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 18 years ago.
No load wp-settings patch
3057.diff (341 bytes) - added by Nazgul 17 years ago.

Download all attachments as: .zip

Change History (10)

@forceagainstsomething
18 years ago

No load wp-settings patch

#1 @forceagainstsomething
18 years ago

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

@Nazgul
17 years ago

#2 @Nazgul
17 years ago

  • Keywords has-patch added
  • Milestone set to 2.1

Updated the attached patch according to forceagainstsomething's suggestions.

#3 @matt
17 years ago

  • Milestone changed from 2.1 to 2.2

#4 @foolswisdom
17 years ago

  • Milestone changed from 2.2 to 2.3

#5 @markjaquith
17 years ago

  • Milestone changed from 2.3 to 2.4 (next)
  • Priority changed from normal to low

Punting.

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

#6 @intoxination
17 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
17 years ago

  • Resolution set to wontfix
  • Status changed from new to 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
17 years ago

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