Skip to content

Instantly share code, notes, and snippets.

@scottnix
Created August 24, 2012 00:25
Show Gist options
  • Save scottnix/3443950 to your computer and use it in GitHub Desktop.
Save scottnix/3443950 to your computer and use it in GitHub Desktop.
Thematic HTML5 - suggestion
/**
* Filter the opening tags of the widget areas
*
* Replace the div with aside, remove the wrapping ul
*
* @since 0.1
*/
function before_widget_area($content) {
$content = str_replace( '<div', '<aside ', $content);
$content = str_replace( '<ul class="xoxo">', '<div class="inner">', $content);
return $content;
}
/**
* Filter the closing tags of the widget areas
*
* Remove the wrapping ul, replace the div with aside
*
* @since 0.1
*/
function after_widget_area($content) {
$content = str_replace( '</ul>', '</div>', $content);
$content = str_replace( '</div>', '</aside>', $content);
return $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment