wp-includes class-IXR.php

The Incutio XML-RPC Library file (not Inutio !) contains 5 occurrences of is_a

class IXR_Value {
.....
	function calculateType() {
.....
//		if (is_object($this->data) && is_a($this->data, 'IXR_Date')) {
		$class_name = 'IXR_Date';
		if ( is_object($this->data)
		 && ( ( get_class($this->data) == $class_name )
		 || is_subclass_of($this->data, $class_name) ) ) {
.....
//		if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
		$class_name = 'IXR_Base64';
		if ( is_object($this->data)
		 && ( ( get_class($this->data) == $class_name )
		 || is_subclass_of($this->data, $class_name) ) ) {
.....
class IXR_Server {
.....
	function serve($data = false) {
	function multiCall($methodcalls) {
.....
//		if (is_a($result, 'IXR_Error')) {
		$class_name = 'IXR_Error';
		if ( ( get_class($result) == $class_name )
		 || is_subclass_of($result, $class_name) ) {
.....
class IXR_IntrospectionServer extends IXR_Server {
.....
	function call($methodname, $args) {
.....
//		if (!is_a($arg, 'IXR_Date')) {
		$class_name = 'IXR_Date';
		if ( ( get_class($arg) != $class_name )
		 && !is_subclass_of($arg, $class_name) ) {
Technorati Tags: ,

wp-includes class-feed.php

Originally the Clean Options plugin was developed to allow for the removal of options left behind from deleted plugins. It was soon discovered that the wp_options table also contained (in some cases very many) rows of cached feeds left over by WordPress itself. One of the changes in WordPress version 2.8 is the use of SimplePie. The cached feeds are now prepended with "transient" and it appears that WordPress now removes old cached feed rows from the wp_options table. This, if true, is very good news, and if all plugin authors include clean up of options upon deletion of their plugins, the Clean Options plugin will become obsolete. Unfortunately, as shall be seen, the switch to SimplePie is not good news for the Error Reporting plugin.

class WP_Feed_Cache_Transient {
.....
	function save($data) {
//		if ( is_a($data, 'SimplePie') )
		$class_name = 'SimplePie';
		if ( ( get_class($data) == $class_name )
		 || is_subclass_of($data, $class_name) )
Technorati Tags: ,

wp-includes classes.php

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;
}
Technorati Tags: ,

wp-includes category-template.php

The category-template.php file has 2 occurrences of is_a to test for objects of the Walker class. There are at least 6 subclasses of the Walker class within the WordPress Core.

function walk_category_tree() {
	$args = func_get_args();
	// the user's options are the third parameter
//	if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
	$class_name = 'Walker';
	if ( empty($args[2]['walker'])
	 || ( ( get_class($args[2]['walker']) != $class_name )
	 && !is_subclass_of($args[2]['walker'], $class_name) ) )
		$walker = new Walker_Category;
.....
function walk_category_dropdown_tree() {
	$args = func_get_args();
	// the user's options are the third parameter
//	if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
	$class_name = 'Walker';
	if ( empty($args[2]['walker'])
	 || ( ( get_class($args[2]['walker']) != $class_name )
	 && !is_subclass_of($args[2]['walker'], $class_name) ) )
		$walker = new Walker_CategoryDropdown;
.....
Technorati Tags: ,

bbPress Reference Lists

The lists of bbPress 1.0 Constants, Classes and Functions, 1.0 Actions and Filters and 1.0 Actions and Filters (refined list) were made using a plugin that relies upon regex matching a somewhat consistent coding style. As such, some may be missing from the lists. If you know of any bbPress Core constants, classes, functions, actions, or filters that are not included in the lists, please leave a comment here so that the lists can be updated. Many thanks.