The classes.php file has only one is_a in it. And the class it tests for, WP_Error, has no subclasses in the WordPress Core. But the function it's in, is_wp_error, gets called literally hundreds of times per page load. If you replace is_a with get_class or is_subclass_of in only one file, IMHO, this should be the one file.
function is_wp_error($thing) {
// if ( is_object($thing) && is_a($thing, 'WP_Error') )
$class_name = 'WP_Error';
if ( is_object($thing)
&& ( ( get_class($thing) == $class_name )
|| is_subclass_of($thing, $class_name) ) )
return true;
return false;
}
![[PDA - Heathcare NOT Warfare - Sign the Petition.]](http://pdamerica.org/images/front/HealthNotWar_final.jpg)






One Trackback
[...] wp-includes/classes.php [...]