This repository has been archived on 2022-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
divi/includes/social_icons.php

38 lines
1.5 KiB
PHP
Raw Normal View History

2021-12-07 11:08:05 +00:00
<ul class="et-social-icons">
<?php if ( 'on' === et_get_option( 'divi_show_facebook_icon', 'on' ) ) : ?>
<li class="et-social-icon et-social-facebook">
2022-06-23 12:17:18 +00:00
<a href="<?php echo esc_url( strval( et_get_option( 'divi_facebook_url', '#' ) ) ); ?>" class="icon">
2021-12-07 11:08:05 +00:00
<span><?php esc_html_e( 'Facebook', 'Divi' ); ?></span>
</a>
</li>
<?php endif; ?>
<?php if ( 'on' === et_get_option( 'divi_show_twitter_icon', 'on' ) ) : ?>
<li class="et-social-icon et-social-twitter">
2022-06-23 12:17:18 +00:00
<a href="<?php echo esc_url( strval( et_get_option( 'divi_twitter_url', '#' ) ) ); ?>" class="icon">
2021-12-07 11:08:05 +00:00
<span><?php esc_html_e( 'Twitter', 'Divi' ); ?></span>
</a>
</li>
<?php endif; ?>
<?php $et_instagram_default = ( true === et_divi_is_fresh_install() ) ? 'on' : 'false'; ?>
<?php if ( 'on' === et_get_option( 'divi_show_instagram_icon', $et_instagram_default ) ) : ?>
<li class="et-social-icon et-social-instagram">
2022-06-23 12:17:18 +00:00
<a href="<?php echo esc_url( strval( et_get_option( 'divi_instagram_url', '#' ) ) ); ?>" class="icon">
2021-12-07 11:08:05 +00:00
<span><?php esc_html_e( 'Instagram', 'Divi' ); ?></span>
</a>
</li>
<?php endif; ?>
<?php if ( 'on' === et_get_option( 'divi_show_rss_icon', 'on' ) ) : ?>
<?php
2022-06-23 12:17:18 +00:00
$et_rss_url = ! empty( et_get_option( 'divi_rss_url' ) )
2021-12-07 11:08:05 +00:00
? et_get_option( 'divi_rss_url' )
: get_bloginfo( 'rss2_url' );
?>
<li class="et-social-icon et-social-rss">
<a href="<?php echo esc_url( $et_rss_url ); ?>" class="icon">
<span><?php esc_html_e( 'RSS', 'Divi' ); ?></span>
</a>
</li>
<?php endif; ?>
</ul>