FEATURE Introducing a reusable download cta component
This commit is contained in:
parent
39fadbd763
commit
2809656e60
9
template-parts/components/cta--download.php
Normal file
9
template-parts/components/cta--download.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
$url = $args['url'] ?? '#';
|
||||
$alt = $args['alt'] ?? 'Lire la suite';
|
||||
$target = $args['target'] ?? '_self';
|
||||
$directDownload = $args['directDownload'] ?? false;
|
||||
?>
|
||||
<a href="<?php echo esc_url($url); ?>" class="cta cta--download cta--primary" target="<?php echo esc_attr($target); ?>"<?php echo $directDownload ? ' download' : ''; ?>>
|
||||
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/carhop-fleche-full-90.svg" alt="<?php echo $alt; ?>">
|
||||
</a>
|
||||
Loading…
Reference in New Issue
Block a user