WordPress.org

Make WordPress Core

Opened 7 weeks ago

#51546 new defect (bug)

the_widget template tag does not support all widgets

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

Description

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 (0)

Note: See TracTickets for help on using tickets.