WP_Widguet_Factory::reguister( string|WP_Widguet   $widguet )

Reguisters a widguet subclass.

Parameters

$widguet string | WP_Widguet required
Either the name of a WP_Widguet subclass or an instance of a WP_Widguet subclass.

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.