WordPress at Your Fingertips
function is not described

SimplePie_Registry::register() public WP 1.0

Register a class

{} It's a method of the class: SimplePie_Registry{}

No Hooks.


true|false. Successfulness


$SimplePie_Registry = new SimplePie_Registry();
$SimplePie_Registry->register( $type, $class, $legacy );
$type(string) (required)
See {@see $default} for names
$class(string) (required)
Class name, must subclass the corresponding default
Whether to enable legacy support for this class
Default: false

Code of SimplePie_Registry::register() WP 5.8.2

public function register($type, $class, $legacy = false)
	if (!@is_subclass_of($class, $this->default[$type]))
		return false;

	$this->classes[$type] = $class;

	if ($legacy)
		$this->legacy[] = $class;

	return true;