WordPress at Your Fingertips
function is not described

WP_Widget_Factory::get_widget_object() public WP 5.8.0

Returns the registered WP_Widget object for the given widget type.

{} It's a method of the class: WP_Widget_Factory{}

No Hooks.

Return

WP_Widget|null.

Usage

$WP_Widget_Factory = new WP_Widget_Factory();
$WP_Widget_Factory->get_widget_object( $id_base );
$id_base(string) (required)
Widget type ID.

Changelog

Since 5.8.0 Introduced.

Code of WP_Widget_Factory::get_widget_object() WP 5.8.2

public function get_widget_object( $id_base ) {
	$key = $this->get_widget_key( $id_base );
	if ( '' === $key ) {
		return null;
	}

	return $this->widgets[ $key ];
}