mh_logo

The MH Purity lite mh logo function.

Description

mh_logo(); 

Usage

  1. if ( !function_exists( 'mh_logo' ) ) { 
  2. require_once '/includes/mh-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = mh_logo(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/mh-functions.php  
  1. function mh_logo() { 
  2. $header_img = get_header_image(); 
  3. $title = get_bloginfo('name'); 
  4. $desc = get_bloginfo('description'); 
  5. echo '<a href="' . esc_url(home_url('/')) . '" title="' . esc_attr(get_bloginfo('name')) . '" rel="home">' . "\n"; 
  6. echo '<div class="logo-wrap" role="banner">' . "\n"; 
  7. if ($header_img) { 
  8. echo '<img class="header-image" src="' . esc_url($header_img) . '" height="' . get_custom_header()->height . '" width="' . get_custom_header()->width . '" alt="' . esc_attr(get_bloginfo('name')) . '" />' . "\n"; 
  9. if (display_header_text()) { 
  10. $header_img ? $logo_pos = 'logo-overlay' : $logo_pos = 'logo-text'; 
  11. $text_color = get_header_textcolor(); 
  12. if ($text_color != get_theme_support('custom-header', 'default-text-color')) { 
  13. echo '<style type="text/css" id="mh-header-css">'; 
  14. echo '.logo-name, .logo-desc { color: #' . esc_attr($text_color) . '; }'; 
  15. echo '</style>' . "\n"; 
  16. echo '<div class="logo ' . $logo_pos . '">' . "\n"; 
  17. if ($title) { 
  18. echo '<h1 class="logo-name">' . esc_attr($title) . '</h1>' . "\n"; 
  19. if ($desc) { 
  20. echo '<h2 class="logo-desc">' . esc_attr($desc) . '</h2>' . "\n"; 
  21. echo '</div>' . "\n"; 
  22. echo '</div>' . "\n"; 
  23. echo '</a>' . "\n";