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

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 2 01:56:16 UTC 2009


#11059: Discourage plugin authors calling wp-config.php directly
-------------------------+--------------------------------------------------
 Reporter:  strider72    |       Owner:            
     Type:  enhancement  |      Status:  new       
 Priority:  normal       |   Milestone:  Unassigned
Component:  General      |     Version:  2.9       
 Severity:  normal       |    Keywords:  has-patch 
-------------------------+--------------------------------------------------
 A lot of plugins call wp-config.php directly.  In order to more actively
 discourage this practice, this patch adds a "deprecated" call within the
 {{{if( !defined('ABSPATH'))}}}.

 I define "wp-load.php" as the alternate, even though that's not the ideal
 solution.  It's still better than calling wp-config.php.  The $file string
 I pass is designed to fit within the message string from the
 _deprecated_file function.

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


More information about the wp-trac mailing list