Created
January 29, 2013 02:43
-
-
Save lswilson/4661279 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Activate all sidebars, override this to customize sidebar markup | |
function widgets_init() { | |
// If there aren't any sidebars, skip the rest | |
if ( !$this->sidebars || empty($this->sidebars) ) return; | |
// Otherwise, lets register all of them | |
foreach ( $this->sidebars as $id => $info ) { | |
register_sidebar(array( | |
'name' => esc_html( $info['name'] ), | |
'id' => $id, | |
'description' => esc_html( $info['description'] ), | |
'editable' => intval( $info['editable'] ), | |
'before_widget' => "\n\t\t\t" . '<li id="%1$s" class="widget %2$s">', | |
'after_widget' => "\n\t\t\t</li>\n", | |
'before_title' => "\n\t\t\t\t". '<h3 class="widget-title"><span class="widget-title-left"><span class="widget-title-right">', | |
'after_title' => '</span></span></h3>'."\n" | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment