[wp-trac] [WordPress Trac] #26804: Support multiple $wpdb handlers

WordPress Trac noreply at wordpress.org
Fri Jan 10 13:11:52 UTC 2014


#26804: Support multiple $wpdb handlers
--------------------------------+------------------------------
 Reporter:  mgibbs189           |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Database            |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:  dev-feedback close  |
--------------------------------+------------------------------
Changes (by wonderboymusic):

 * keywords:  dev-feedback => dev-feedback close


Comment:

 since `wp-content/db.php` is a drop-in controlled by the user, why don't
 you just put your code in there? or why don't you add the logic to
 `advanced-cache.php`? Seems like your only need is to load early. If you
 are using multisite, add your logic to `sunrise.php` - even for single
 site, turn multisite on and add it to `sunrise.php` and `exit()` after
 conditionally. OR, access your PHP file directly from AJAX and do
 something like:

 {{{
 define( 'SHORTINIT', 1 );

 require( 'wherever/wp-load.php' );

 // load your special file thing
 // do whatever
 }}}

 OR just bail on `init`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26804#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list