[wp-trac] [WordPress Trac] #41239: Add filter in dynamic_sidebar() to allow changing the index before rendering

WordPress Trac noreply at wordpress.org
Tue Jul 4 23:10:54 UTC 2017


#41239: Add filter in dynamic_sidebar() to allow changing the index before
rendering
-------------------------------+------------------------------
 Reporter:  jantank            |       Owner:
     Type:  feature request    |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Widgets            |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by jantank):

 @westonruter it is true, that there is that 'sidebars_filter'. But it is
 not about registering widgets, it is about replacing widget 'footer' with
 'microsite_footer' at render time. So that instead of the normal widget
 the microsite widget is rendered.
 As Twenty Seventeen is using 'dynamic_sidebar' to render the widgets, I do
 not see another way. Maybe I'm wrong, as the Microsite Plugin is my first
 work with WordPress Hooks and Filters, but so far I haven't found a
 different way.

 Also I wrote a Plugin and not a Theme, so that option does not exist. The
 Plugin is aimed at working with every template, that uses the WordPress
 Customizer in a normal way. That is a bit rough right now, but I just
 started developing it as a prove of concept and stumbled about this
 blocker. Everything else has already filters to replace Theme Options,
 Menus, Blog Info and what not. Just Widgets currently do not work. At
 least, with what I tried.

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


More information about the wp-trac mailing list