[wp-trac] [WordPress Trac] #20523: Disable autoloader when using class_exists()
WordPress Trac
wp-trac at lists.automattic.com
Tue May 15 21:49:26 UTC 2012
#20523: Disable autoloader when using class_exists()
-------------------------------+------------------------------
Reporter: michael.heuberger | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.3.1
Severity: normal | Resolution:
Keywords: |
-------------------------------+------------------------------
Changes (by kurtpayne):
* cc: kpayne@… (added)
* type: defect (bug) => feature request
Comment:
Can you add your own autoloader to the stack before you add !WordPress to
your existing codebase?
{{{
spl_autoload_register( function( $className ) {
// If you're the last on the stack, the other autoloader should
// take care of its own classes, but if it fails to find $className
// you'll end up here, just don't throw an exception
} );
}}}
This ''might'' prevent the errors you're seeing.
You could also look at loading only the pieces of !WordPress you need with
`SHORTINIT`
http://wordpress.org/support/topic/load-wp-core-in-another-framework-
shortinit-wp_query?replies=3
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20523#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list