[wp-trac] [WordPress Trac] #55595: Consider only registering widgets on themes that supports widgets

WordPress Trac noreply at wordpress.org
Wed Apr 20 18:48:51 UTC 2022


#55595: Consider only registering widgets on themes that supports widgets
--------------------------+------------------------------
 Reporter:  spacedmonkey  |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Widgets       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  performance
--------------------------+------------------------------

Comment (by joyously):

 There could also be actions triggered, that would no longer be triggered.
 See https://wpdirectory.net/search/01G144AV0DYES8C17J92YSRS8Z
 The SEO plugins have `remove_all_actions( 'widgets_init' );` and all the
 plugins that register a widget do it on the `'widget_init'` action which
 is in the `wp_widgets_init()` function.

 I didn't look at all 18705 matches, but I do know there is a widget block,
 so you don't need the theme to declare support for widgets to be using all
 those legacy widgets, which won't work without the action at which the
 widget is registered.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55595#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list