Add 10 px to the width of <figure> to avoid figure overflow

This commit is contained in:
bjornerik
2013-10-28 21:01:24 +01:00
parent 29d5709606
commit 92dee5ad5e

View File

@@ -163,7 +163,7 @@ function roots_caption($output, $attr, $content) {
// Set up the attributes for the caption <figure>
$attributes = (!empty($attr['id']) ? ' id="' . esc_attr($attr['id']) . '"' : '' );
$attributes .= ' class="thumbnail wp-caption ' . esc_attr($attr['align']) . '"';
$attributes .= ' style="width: ' . esc_attr($attr['width']) . 'px"';
$attributes .= ' style="width: ' . (esc_attr($attr['width']) + 10) . 'px"';
$output = '<figure' . $attributes .'>';
$output .= do_shortcode($content);