Only display image if src is provided

This commit is contained in:
Jonathan Belcher 2016-10-04 11:47:38 -04:00
parent 6b9e2bbd1a
commit 1ef33a0452
No known key found for this signature in database
GPG Key ID: 2976F1082FCA8D1E
1 changed files with 5 additions and 3 deletions

View File

@ -287,9 +287,11 @@ class WC_Admin_Addons {
<div class="addons-small-dark-items">
<?php foreach ( $block->items as $item ) : ?>
<div class="addons-small-dark-item">
<div class="addons-small-dark-item-icon">
<img class="addons-img" src="<?php echo esc_url( $item->image ); ?>" />
</div>
<?php if ( $item->image ) : ?>
<div class="addons-small-dark-item-icon">
<img class="addons-img" src="<?php echo esc_attr( $item->image ); ?>" />
</div>
<?php endif; ?>
<?php
self::output_button(
$item->href,