SHARE
TWEET

Untitled

a guest Aug 19th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_action( 'init', 'tm_child_footer_social_links', 20 );
  2.  
  3. function tm_child_footer_social_links() {
  4.     remove_action( 'techmarket_before_footer_block',    'techmarket_social_icons',                      30 );
  5.     add_action( 'techmarket_before_footer_block',       'tm_child_social_icons',                        30 );
  6. }
  7.  
  8.  
  9. if ( ! function_exists( 'tm_child_social_icons' ) ) {
  10.     function tm_child_social_icons() {
  11.         $social_networks        = apply_filters( 'techmarket_set_social_networks', techmarket_get_social_networks() );
  12.         $social_links_output    = '';
  13.         $social_link_html       = apply_filters( 'techmarket_footer_social_link_html', '<a class="sm-icon-label-link nav-link" rel="nofollow" href="%2$s"><i class="%1$s"></i> %3$s</a>' );
  14.  
  15.         foreach ( $social_networks as $social_network ) {
  16.             if ( isset( $social_network[ 'link' ] ) && !empty( $social_network[ 'link' ] ) ) {
  17.                 $social_links_output .= sprintf( '<li class="nav-item">' . $social_link_html . '</li>', $social_network[ 'icon' ], $social_network[ 'link' ], $social_network[ 'label' ] );
  18.             }
  19.         }
  20.  
  21.         if ( apply_filters( 'techmarket_show_footer_social_icons', true ) && ! empty( $social_links_output ) ) {
  22.  
  23.             ob_start();
  24.             ?>
  25.             <div class="footer-social-icons">
  26.                 <ul class="social-icons nav">
  27.                     <?php echo wp_kses_post( $social_links_output ); ?>
  28.                 </ul>
  29.             </div>
  30.             <?php
  31.             echo apply_filters( 'techmarket_footer_social_links_html', ob_get_clean() );
  32.         }
  33.     }
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top