Last active
November 13, 2025 17:26
-
-
Save yuriinalivaiko/2c48b84dcdca4b93adc7c300510088e5 to your computer and use it in GitHub Desktop.
Code snippet for the ticket #107666
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Outputs Social Media Icons. | |
| */ | |
| if ( ! function_exists( 'um_theme_social_menu' ) ) { | |
| function um_theme_social_menu() { | |
| global $defaults; | |
| $social_links = array( | |
| esc_url( $defaults['um_theme_social_account_link_one'] ), | |
| esc_url( $defaults['um_theme_social_account_link_two'] ), | |
| esc_url( $defaults['um_theme_social_account_link_three'] ), | |
| esc_url( $defaults['um_theme_social_account_link_four'] ), | |
| esc_url( $defaults['um_theme_social_account_link_five'] ), | |
| esc_url( $defaults['um_theme_social_account_link_six'] ), | |
| ); | |
| $social_icons = array( | |
| esc_attr( $defaults['um_theme_social_account_icon_one'] ), | |
| esc_attr( $defaults['um_theme_social_account_icon_two'] ), | |
| esc_attr( $defaults['um_theme_social_account_icon_three'] ), | |
| esc_attr( $defaults['um_theme_social_account_icon_four'] ), | |
| esc_attr( $defaults['um_theme_social_account_icon_five'] ), | |
| esc_attr( $defaults['um_theme_social_account_icon_six'] ), | |
| ); | |
| ?> | |
| <nav class="um-theme-social-link" itemscope itemtype="http://schema.org/Organization" aria-label="<?php esc_attr_e( 'Social Links', 'um-theme' ); ?>"> | |
| <link href="<?php echo esc_url( home_url( '/' ) ); ?>" itemprop="url"> | |
| <?php for ( $i = 0; $i < count( $social_links ); $i++ ) : ?> | |
| <?php if ( ! empty( $social_links[ $i ] ) ) : ?> | |
| <a href="<?php echo esc_url( $social_links[ $i ] ); ?>" target="_blank"> | |
| <span class="<?php echo esc_attr( $social_icons[ $i ] ); ?>"></span> | |
| </a> | |
| <?php endif; ?> | |
| <?php endfor; ?> | |
| </nav> | |
| <?php | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment