Created
August 24, 2012 00:25
-
-
Save scottnix/3443950 to your computer and use it in GitHub Desktop.
Thematic HTML5 - suggestion
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
/** | |
* 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