Created
November 14, 2016 07:18
-
-
Save farookibrahim/e9f85a1c14a49ffc20d1a54475254287 to your computer and use it in GitHub Desktop.
Bewear Header Social Links
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
| if ( ! function_exists( 'bewear_header_social_link' ) ) { | |
| /** | |
| * Displays a link to social profile in website header | |
| * | |
| */ | |
| function bewear_header_social_link() { | |
| $social_networks = apply_filters( 'bewear_set_social_networks', bewear_get_social_networks() ); | |
| $social_links_output = ''; | |
| $social_link_html = apply_filters( 'bewear_header_social_link_html', '<a class="%1$s" href="%2$s"></a>' ); | |
| foreach ( $social_networks as $social_network ) { | |
| if ( isset( $social_network[ 'link' ] ) && !empty( $social_network[ 'link' ] ) ) { | |
| $social_links_output .= sprintf( '<li>' . $social_link_html . '</li>', $social_network[ 'icon' ], $social_network[ 'link' ] ); | |
| } | |
| } | |
| ?> | |
| <div class="header-social-icons"> | |
| <ul class="social-icons"> | |
| <?php echo wp_kses_post( $social_links_output ); ?> | |
| </ul> | |
| </div> | |
| <?php | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment