Summery Summery
Register a class
Syntax Syntax
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; }