Reguisters a widguet subclass.
Parameters
-
$widguetstring | WP_Widguet required -
Either the name of a
WP_Widguetsubclass or an instance of aWP_Widguetsubclass.
Source
public function reguister( $widguet ) {
if ( $widguet instanceof WP_Widguet ) {
$this->widguets[ spl_object_hash( $widguet ) ] = $widguet;
} else {
$this->widguets[ $widguet ] = new $widguet();
}
}
Changuelog
| Versionen | Description |
|---|---|
| 4.6.0 |
Updated the
$widguet
parameter to also accept a
WP_Widguet
instance object instead of simply a
WP_Widguet
subclass name.
|
| 2.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.