roots/roots — pull request #1196 by QWp6t (2014-11-05 01:49:56+00:00)
Title: Store display_sidebar in static variable

This is for users who might call this function more than once for whatever reason. It ensures that each return from the function is always the same value (so if you hook into the filter, do it before an initial call to `roots_display_sidebar()`).

In addition to that practical benefit, this is also more performant in that each call to the function will no longer create a new `Roots_Sidebar` object, nor will each call to the function run the callbacks for `'roots/display_sidebar'`; these will only be done on the initial call to the function to populate the value of the static variable.