Guest User

Untitled

a guest
Dec 15th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. /*-----------------------------------------------------------------------------------*/
  5. /* You can add custom functions below */
  6. /*-----------------------------------------------------------------------------------*/
  7.  
  8. add_filter( 'woo_header_inside', 'woo_custom_social_links', 10 );
  9.  
  10. function woo_custom_social_links () {
  11. global $woo_options;
  12.  
  13. $html = '';
  14.  
  15. // Open DIV tag.
  16. $html .= '
  17. <div id="social-links" class="social-links fr">' . "\n";
  18.  
  19. // Add "heading" text.
  20. $html .= '<span class="heading-text">' . __( 'Follow', 'woothemes' ) . '→ </span>';
  21.  
  22. $template_directory = get_template_directory_uri();
  23.  
  24. $profiles = array(
  25. 'twitter' => __( 'Follow us on Twitter' , 'woothemes' ),
  26. 'facebook' => __( 'Connect on Facebook' , 'woothemes' ),
  27. 'youtube' => __( 'Watch on YouTube' , 'woothemes' ),
  28. 'flickr' => __( 'See photos on Flickr' , 'woothemes' ),
  29. 'linkedin' => __( 'Connect on LinkedIn' , 'woothemes' ),
  30. 'delicious' => __( 'Discover on Delicious' , 'woothemes' ),
  31. 'googleplus' => __( 'View Google+ profile' , 'woothemes' )
  32. );
  33.  
  34. foreach ( $profiles as $key => $text ) {
  35. if ( isset( $woo_options['woo_connect_' . $key] ) && $woo_options['woo_connect_' . $key] != '' ) {
  36. $html .= '<span id="social-icon-' . $key . '" class="social-icon social-icon-' . $key . '"><a href="' . $woo_options['woo_connect_' . $key] . '" title="' . esc_attr( $text ) . '">' . '<img src="' . $template_directory . '/images/ico-social-' . $key . '.png" title="' . esc_attr( $text ) . '" alt="">' . '</a></span>' . "\n";
  37. }
  38. }
  39.  
  40. $html .= '</div><!--/#social-links-->' . "\n";
  41.  
  42. echo $html;
  43. } // End woo_custom_social_links()
  44. </div>
  45.  
  46. // Add header container
  47. add_action( 'woo_header_before', 'header_container_start' );
  48. function header_container_start() { ?>
  49. <!--#header-container-->
  50. <div id="header-container">
  51. <?php
  52. }
  53. add_action( 'woo_header_after', 'header_container_end', 8 );
  54. function header_container_end() { ?>
  55. </div><!--/#header-container-->
  56. <?php
  57. }
  58.  
  59. // Add navigation container
  60. add_action( 'woo_nav_before', 'nav_container_start' );
  61. function nav_container_start() { ?>
  62. <!--#nav-container-->
  63. <div id="nav-container">
  64. <?php
  65. }
  66. add_action( 'woo_nav_after', 'nav_container_end' );
  67. function nav_container_end() { ?>
  68. </div><!--/#nav-container-->
  69. <?php
  70. }
  71.  
  72. // Add footer widget container
  73. add_action( 'woo_footer_top', 'footer_widgets_container_start', 8 );
  74. function footer_widgets_container_start() { ?>
  75. <!--#footer-widgets-container-->
  76. <div id="footer-widgets-container">
  77. <?php
  78. }
  79. add_action( 'woo_footer_before', 'footer_widgets_container_end' );
  80. function footer_widgets_container_end() { ?>
  81. </div><!--/#footer_widgets_container_end-->
  82. <?php
  83. }
  84.  
  85. // Add footer container
  86. add_action( 'woo_footer_before', 'footer_container_start' );
  87. function footer_container_start() { ?>
  88. <!--#footer_container_start-->
  89. <div id="footer-container">
  90. <?php
  91. }
  92. add_action( 'woo_footer_after', 'footer_container_end' );
  93. function footer_container_end() { ?>
  94. </div><!--/#footer_container_end-->
  95. <?php
  96. }
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. /*-----------------------------------------------------------------------------------*/
  107. /* Don't add any code below here or the sky will fall down */
  108. /*-----------------------------------------------------------------------------------*/
  109. ?>
Add Comment
Please, Sign In to add comment