WP_Widget_Factory::get_widget_object( string $id_base ): WP_Widget|null

Returns the registered WP_Widget object for the given widget type.


Parameters

$id_base string Required
Widget type ID.

Top ↑

Return

WP_Widget|null


Top ↑

Source

File: wp-includes/class-wp-widget-factory.php. View all references

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

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


Top ↑

Changelog

Changelog
Version Description
5.8.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.