SimplePie_Registry::register

Advertisement

Summery Summery

Register a class

Syntax Syntax

SimplePie_Registry::register( string $type, string $class, bool $legacy = false )

Parameters Parameters

$type

(Required) See $default for names

$class

(Required) Class name, must subclass the corresponding default

$legacy

(Optional) Whether to enable legacy support for this class

Default value: false

Return Return

(bool) Successfulness

Source Source

File: wp-includes/SimplePie/Registry.php

	{
		if (!@is_subclass_of($class, $this->default[$type]))
		{
			return false;
		}

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

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

		return true;
	}

Advertisement

Advertisement

Leave a Reply