Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#51546 new enhancement

the_widget template tag does not support all widgets

Reported by: manfcarlo's profile manfcarlo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Widgets Keywords:
Focuses: Cc:


Any widgets that are registered by instance rather than class name (see #28216) can not be accessed through the_widget because it requires a class name.

For widgets registered by instance, the spl_object_hash is stored in place of the class name in $GLOBALS['wp_widget_factory']->widgets.

Technically, it would work if the correct hash were provided, but since the hash changes on every session, this is practically impossible.

Since all widgets have a unique id base, would it be viable for the_widget to accept an id base instead of a class name?

Change History (1)

#1 @manfcarlo
3 years ago

  • Type changed from defect (bug) to enhancement
Note: See TracTickets for help on using tickets.