Skip to content

Instantly share code, notes, and snippets.

@Kwpolska
Last active February 3, 2016 14:57
Show Gist options
  • Save Kwpolska/87c660824411d6c5ddf4 to your computer and use it in GitHub Desktop.
Save Kwpolska/87c660824411d6c5ddf4 to your computer and use it in GitHub Desktop.
<?php
array(
'before_widget' => '<div class="panel panel-default panel-sidebar %1$s %2$s">',
'after_widget' => '</div></div>',
'before_title' => '<div class="panel-heading"><h3 class="panel-title">',
'after_title' => '</h3></div><div class="panel-body">'
)
?>
<!-- If there is a title, it results in: -->
<div class="panel panel-default panel-sidebar">
<div class="panel-heading"><h3 class="panel-title">
Title!
</h3></div><div class="panel-body">
Contents!
</div></div>
<!-- …which is okay, but if there is no title, the layout falls into pieces: -->
<div class="panel panel-default panel-sidebar">
Contents!
</div></div>
<!-- because it should be this: -->
<div class="panel panel-default panel-sidebar">
<div class="panel-body">
Contents!
</div></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment