Add 10 px to the width of <figure> to avoid figure overflow
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user