Created
January 31, 2013 21:08
-
-
Save lswilson/4686455 to your computer and use it in GitHub Desktop.
change SB widget title markup
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
// swap out the widget-title markup | |
class Badgestack_Sidebar_Markup extends SB_Sidebars { | |
// 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">', | |
'after_title' => '<div class="alignright"><span class="collapse"></span><span class="expand"></span></div></h3>'."\n" | |
)); | |
} | |
} | |
} | |
new Badgestack_Sidebar_Markup; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment