Advertisement
Guest User

site-tagline.php

a guest
Sep 24th, 2018
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. function parallax_frame_site_branding() {
  2. $options = parallax_frame_get_theme_options();
  3.  
  4. $site_logo = '';
  5. //Checking Logo
  6. if ( has_custom_logo() ) {
  7. $site_logo = '<div id="site-logo">'. get_custom_logo() . '</div><!-- #site-logo -->';
  8. }
  9.  
  10. $tagline_class = '';
  11.  
  12. $hide_tagline = $options['hide_tagline'];
  13.  
  14. if ( $hide_tagline ) {
  15. $tagline_class = ' screen-reader-text';
  16. }
  17.  
  18. $header_text = '<div id="site-header">';
  19.  
  20. //Set screen-reader-text class if site-header is disabled
  21. if ( !display_header_text() ) {
  22. $header_text = '<div id="site-header" class="screen-reader-text">';
  23. }
  24.  
  25. //Add Site Title
  26. $header_text .= '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a></h1>';
  27.  
  28. //Add Tagline
  29. $header_text .= '<h2 class="site-description' . $tagline_class . '"> <a href="' . esc_url( 'https://wordpress.org' ) . '">' . get_bloginfo( 'description' ) . '</h2>';
  30.  
  31. //End Site Header
  32. $header_text .= '</div><!-- #site-header -->';
  33.  
  34. $site_branding = '<div id="site-branding">' . $header_text;
  35.  
  36. if ( has_custom_logo() ) {
  37. $move_title_tagline = $options['move_title_tagline'];
  38.  
  39. if ( $move_title_tagline ) {
  40. $site_branding = '<div id="site-branding" class="logo-right">' . $header_text . $site_logo;
  41. }
  42. else {
  43. $site_branding = '<div id="site-branding" class="logo-left">' . $site_logo . $header_text;
  44. }
  45. }
  46.  
  47. $site_branding .= '</div><!-- #site-branding-->';
  48.  
  49. echo $site_branding;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement