[wp-trac] [WordPress Trac] #21612: wp-settings loads plugins before pluggable.php is included

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 16 19:33:44 UTC 2012


#21612: wp-settings loads plugins before pluggable.php is included
--------------------------+----------------------
 Reporter:  kingjeffrey   |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.4.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------
Changes (by nacin):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 1. Pluggable functions are meant to be "pluggable," meaning, a plugin can
 define them before core does. We cannot change the order without breaking
 plugins, possibly causing fatal errors, and killing the concept of
 pluggable functions all together (as much as that last bit is appetizing).

  2. Don't do Ajax requests through a separate page like that. Use admin-
 ajax.php or a query variable. http://codex.wordpress.org/AJAX_in_Plugins.
 Any time you include wp-config, wp-load, or wp-blog-header, you're
 probably doing it wrong.

  3. Don't do anything in the main body of the plugin, beyond add_action().
 Wait until the plugins_loaded hook, or init. Then you wouldn't have this
 problem.

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


More information about the wp-trac mailing list