• The register sidebar wordpress function has one parameter called “before_widget – HTML to place before every widget(default:'<li id=”%1$s” class=”widget %2$s”>’) ” At the end it adds “Note: uses sprintf for variable substitution”(in wp codex). I test it on a site, and depending on the widget that I supply/activate it takes the name of the widget: an id plus a class e.g. for a search box widget it will became id=”search-2″ class=”widget widget_search” Where is this sprintf and where are these variables? Where is this function that manipulates this parameter and does the sprintf variable substitution? I checked the register_sidebar() function in wp-includes/widgets.php file but I could not find it.

  • The topic ‘register_sidebar wordpress function before_widget’ is closed to new replies.