Skip to content

Instantly share code, notes, and snippets.

@leoken
Forked from retlehs/gist:2703644
Created April 4, 2013 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leoken/5309168 to your computer and use it in GitHub Desktop.
Save leoken/5309168 to your computer and use it in GitHub Desktop.
<?php
/**
* Add 'class="span4"' to all widgets in the Content Bottom sidebar
*/
function bb_content_bottom_widget_class($params) {
if ($params[0]['id'] == 'roots-content-bottom') {
$class = 'class="span4 ';
$params[0]['before_widget'] = preg_replace('/class=\"/', "$class", $params[0]['before_widget'], 1);
}
return $params;
}
add_filter('dynamic_sidebar_params', 'bb_content_bottom_widget_class');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment