Formatting

This commit is contained in:
Scott Walkinshaw
2012-09-19 14:46:06 -04:00
parent c707448a72
commit a54850cd44
2 changed files with 18 additions and 14 deletions

View File

@@ -237,16 +237,16 @@ function roots_caption($output, $attr, $content) {
}
$defaults = array(
'id' => '',
'align' => 'alignnone',
'width' => '',
'id' => '',
'align' => 'alignnone',
'width' => '',
'caption' => ''
);
$attr = shortcode_atts($defaults, $attr);
// If the width is less than 1 or there is no caption, return the content wrapped between the [caption] tags
if (1 > $attr['width'] || empty($attr['caption'])) {
if ($attr['width'] < 1 || empty($attr['caption'])) {
return $content;
}