SimplePie_Registry::register

Advertisement

Summery Summery

Register a class

Syntax Syntax

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

Parameters Parameters

$type

(string) (Required) See $default for names

$class

(string) (Required) Class name, must subclass the corresponding default

$legacy

(bool) (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

This site uses Akismet to reduce spam. Learn how your comment data is processed.