Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //if social media link place then display the social icon else not display
- <div class="ic-follow">
- <ul>
- <li>Follow us:</li>
- <?php
- $social_medias= ['facebook','twitter','linkedin','instagram'];
- foreach ($social_medias as $social_media) {
- if (array_key_exists($social_media, $instance) && ($instance[$social_media] != null) ) {
- ?>
- <li>
- <a href="<?php echo $instance[$social_media]; ?>"><?php echo $social_media; ?></a>
- </li>
- <?php
- }
- }
- ?>
- </ul>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement