[wp-trac] [WordPress Trac] #11059: Discourage plugin authors calling wp-config.php directly

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 3 22:56:05 UTC 2009


#11059: Discourage plugin authors calling wp-config.php directly
-------------------------+--------------------------------------------------
 Reporter:  strider72    |        Owner:         
     Type:  enhancement  |       Status:  closed 
 Priority:  normal       |    Milestone:         
Component:  General      |      Version:  2.9    
 Severity:  normal       |   Resolution:  wontfix
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------
Changes (by josephscott):

 * cc: joseph@… (added)


Comment:

 Although I agree that this specific approach isn't good enough, I don't
 think trying to comb through tens of thousands of plugins and themes
 looking for this problem is a good approach either.

 The original concept of this ticket is still solid.  The wp-config.php,
 wp-load.php, etc. files should never be directly included by a theme or
 plugin.  If we can spit out a big ugly error when this is attempted then
 that's one of the best ways to educate a plugin/theme developer.  The
 icing on the cake would be to have that big ugly error point to resources
 in the codex that describe the correct way to accomplish the most commons
 things that plugins/themes pull in wp-config.php for.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11059#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list