Skip to content

Commit

Permalink
Merge pull request #1245 from equalizedigital/hotfix/link-refi-bank-l…
Browse files Browse the repository at this point in the history
…ogos

added - links to vendor block logos
  • Loading branch information
SteveJonesDev authored Jun 25, 2024
2 parents fb9c7fe + 7e2610d commit 0179a65
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions template-parts/blocks/vendor-repeater/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@
while ( have_rows( 'vendors', 'option' ) ) :
the_row();
$company_logo = get_sub_field( 'company_logo' );
$vendor_link = get_sub_field( 'link' );
?>
<td>
<?php if ( $company_logo ) { ?>
<h3>
<img src="<?php echo wp_kses_post( $company_logo['url'] ); ?>" alt="<?php echo wp_kses_post( $company_logo['alt'] ); ?>">
<a href="<?php echo wp_kses_post( $vendor_link['url'] ); ?>" class="btn" <?php echo ! empty( $vendor_link['target'] ) ? wp_kses_post( "target='" . $vendor_link['target'] . "'" ) : ''; ?>>
<img src="<?php echo wp_kses_post( $company_logo['url'] ); ?>" alt="<?php echo wp_kses_post( $company_logo['alt'] ); ?>">
</a>
</h3>
<?php } ?>
</td>
Expand Down Expand Up @@ -193,7 +196,7 @@
$company_logo = get_sub_field( 'company_logo' );
$cashback_amount = get_sub_field( 'cashback_amount' );
$variable = get_sub_field( 'variable' );

$vendor_link = get_sub_field( 'link' );
?>

<table class="vendor_repeater_block_container_items_table_mobile">
Expand All @@ -209,7 +212,11 @@
<!-- tr -->
<tr>
<td>
<h3><img src="<?php echo wp_kses_post( $company_logo['url'] ); ?>" alt="<?php echo wp_kses_post( $company_logo['alt'] ); ?>"></h3>
<h3>
<a href="<?php echo wp_kses_post( $vendor_link['url'] ); ?>" class="btn" <?php echo ! empty( $vendor_link['target'] ) ? wp_kses_post( "target='" . $vendor_link['target'] . "'" ) : ''; ?>>
<img src="<?php echo wp_kses_post( $company_logo['url'] ); ?>" alt="<?php echo wp_kses_post( $company_logo['alt'] ); ?>">
</a>
</h3>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 0179a65

Please sign in to comment.