mirror of
https://github.com/cupcakearmy/liquet.git
synced 2024-10-31 23:54:12 +01:00
30 lines
845 B
PHP
30 lines
845 B
PHP
<?php
|
|
|
|
$links = [ 'medium', 'github', 'twitter', 'website' ];
|
|
|
|
function render_links( $expanded = false ) {
|
|
global $links;
|
|
?>
|
|
<div id="logos">
|
|
<?php if ( $expanded ) { ?>
|
|
<div id="title" class="alt-font">
|
|
discuss & share
|
|
<br/>
|
|
<img src="<?= get_template_directory_uri() . '/vendor/icons/down.svg' ?>"
|
|
alt="arrow down"/>
|
|
</div>
|
|
<?php } ?>
|
|
<div class="flex container horizontal middle center" id="list">
|
|
<?php
|
|
foreach ( $links as $link ) {
|
|
$saved = get_option( $link . '_url' );
|
|
if ( $saved ) { ?>
|
|
<a href="<?= $saved ?>" target="_blank">
|
|
<img src="<?= get_template_directory_uri() . '/vendor/logos/' . $link . '.png' ?>"
|
|
alt="<?= $link; ?>"/>
|
|
</a>
|
|
<?php }
|
|
}
|
|
?></div>
|
|
</div><?php
|
|
}
|