Advertisement
WPRanger

Church Theme Branding Function

Apr 28th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.27 KB | None | 0 0
  1. function its_branding() {
  2.  
  3.     echo '<div class="' . omega_apply_atomic( 'title_area_class', 'title-area') .'">';
  4.  
  5.     /* Get the site title.  If it's not empty, wrap it with the appropriate HTML. */   
  6.     if ( $title = get_bloginfo( 'name' ) ) {       
  7.         if ( $logo = get_theme_mod( 'custom_logo' ) )
  8.             $title = sprintf( '<h1 class="site-title"><a href="%1$s" title="%2$s" rel="home" alt="%3$s")><span><img src="%4$s"/></span></a></h1>', home_url(), esc_attr( $title ), get_bloginfo( 'description' ), $logo );     
  9.         else
  10.             $title = sprintf( '<h1 class="site-title"><a href="%1$s" title="%2$s" rel="home" alt="%3$s"><span>%4$s</span></a></h1>', home_url(), esc_attr( $title ), get_bloginfo( 'description' ), $title );      
  11.     }
  12.  
  13.     /* Display the site title and apply filters for developers to overwrite. */
  14.     echo omega_apply_atomic( 'site_title', $title );
  15.  
  16.     /* Get the site description.  If it's not empty, wrap it with the appropriate HTML. */
  17.     if ( $desc = get_bloginfo( 'description' ) )
  18.         $desc = sprintf( '<h2 class="site-description"><span>%1$s</span></h2>', $desc );
  19.  
  20.     /* Display the site description and apply filters for developers to overwrite. */
  21.     echo omega_apply_atomic( 'site_description', $desc );
  22.  
  23.     echo '</div>';
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement