WP_Widget_Factory::get_widget_key( string $id_base ): string

Returns the registered key for the given widget type.


Parameters

$id_base string Required
Widget type ID.

Top ↑

Return

string


Top ↑

Source

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

public function get_widget_key( $id_base ) {
	foreach ( $this->widgets as $key => $widget_object ) {
		if ( $widget_object->id_base === $id_base ) {
			return $key;
		}
	}

	return '';
}


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.