/**
     * Display the logo or site title
     */
    function siteorigin_north_display_logo()
    {
        $logo = siteorigin_setting('branding_logo');
        if (!empty($logo)) {
            $attrs = apply_filters('siteorigin_north_logo_attributes', array());
            ?>
<a href="<?php 
            echo esc_url(home_url('/'));
            ?>
" rel="home">
			<span class="screen-reader-text"><?php 
            esc_html_e('Home', 'siteorigin-north');
            ?>
</span><?php 
            echo wp_get_attachment_image($logo, 'full', false, $attrs);
            ?>
</a><?php 
        } elseif (function_exists('has_custom_logo') && has_custom_logo()) {
            the_custom_logo();
        } else {
            if (is_front_page()) {
                ?>
			<h1 class="site-title"><a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" rel="home"><?php 
                bloginfo('name');
                ?>
</a></h1>
		<?php 
            } else {
                ?>
			<p class="site-title"><a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" rel="home"><?php 
                bloginfo('name');
                ?>
</a></p>
		<?php 
            }
        }
    }
Exemple #2
0
 /**
  * Displays the site identity section.
  *
  * This may include the logo, site title and/or site tagline.
  *
  * @param 	boolean $echo
  * @return 	string
  * @since 	1.0.0
  */
 function reach_site_identity($echo = true)
 {
     $output = '';
     $home_url = home_url();
     $site_title = get_bloginfo('name');
     $hide_title = (bool) get_theme_mod('hide_site_title');
     $hide_tagline = (bool) get_theme_mod('hide_site_tagline');
     if (function_exists('has_custom_logo') && has_custom_logo()) {
         $output .= get_custom_logo();
     }
     $tag = is_front_page() ? 'h1' : 'div';
     $output .= apply_filters('reach_site_title', sprintf('<%s class="site-title %s"><a href="%s" title="%s">%s</a></%s>', $tag, $hide_title ? 'hidden' : '', $home_url, __('Go to homepage', 'reach'), $site_title, $tag));
     $output .= apply_filters('reach_site_tagline', sprintf('<div class="site-tagline %s">%s</div>', $hide_tagline ? 'hidden' : '', get_bloginfo('description')));
     if (!$echo) {
         return $output;
     }
     echo $output;
 }
    function skin_logo_upload_area()
    {
        ?>
			<div class="logo">
				<?php 
        if (has_custom_logo()) {
            the_custom_logo();
        } else {
            if (is_home()) {
                ?>
							<h1 class='site-title'>
									<a href='<?php 
                echo esc_url(home_url('/'));
                ?>
' title='<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
' rel='home'> <?php 
                bloginfo('name');
                ?>
</a>
							</h1>
							<p><a href='<?php 
                echo esc_url(home_url('/'));
                ?>
' title='<?php 
                echo esc_attr(get_bloginfo('description', 'display'));
                ?>
' rel='home'> <?php 
                bloginfo('description');
                ?>
</a></p>
					<?php 
            } else {
                ?>
						<h2 class='site-title'>
						<a href='<?php 
                echo esc_url(home_url('/'));
                ?>
' title='<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
' rel='home'> <?php 
                bloginfo('name');
                ?>
</a></h2>
						<p><a href='<?php 
                echo esc_url(home_url('/'));
                ?>
' title='<?php 
                echo esc_attr(get_bloginfo('description', 'display'));
                ?>
' rel='home'> <?php 
                bloginfo('description');
                ?>
</a></p>
					<?php 
            }
        }
        ?>
			</div>
	<?php 
    }
Exemple #4
0
    function natural_lite_custom_logo()
    {
        if (function_exists('the_custom_logo') && has_custom_logo()) {
            if (is_front_page() && is_home()) {
                ?>
					<h1 class="site-logo"><?php 
                the_custom_logo();
                ?>
</h1>
				<?php 
            } else {
                ?>
					<p class="site-logo"><?php 
                the_custom_logo();
                ?>
</p>
				<?php 
            }
        } else {
            if (is_front_page() && is_home()) {
                ?>
					<h1 class="site-title">
						<a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" rel="home"><?php 
                echo wp_kses_post(get_bloginfo('name'));
                ?>
</a>
					</h1>
				<?php 
            } else {
                ?>
					<p class="site-title">
						<a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" rel="home"><?php 
                echo wp_kses_post(get_bloginfo('name'));
                ?>
</a>
					</p>
				<?php 
            }
        }
    }
Exemple #5
0
        $split_nav = jkl_split_main_nav('primary', false);
        echo $split_nav->left_menu;
        echo $split_nav->right_menu;
    } else {
        echo '<em class="menu-warning">' . __('Please select a menu for your primary navigation.', 'jkl') . '</em>';
    }
    ?>
                                            </div>

                                    <?php 
}
// The next menu is the FULL navigation menu, original from Underscores, using TwentyFifteen toggles - shown on tablets and mobile devices
?>

                                    <div class="full-navigation-menu <?php 
echo has_custom_logo() ? 'hide-for-large' : 'split-navigation-menu';
?>
">
                                        <?php 
wp_nav_menu(array('theme_location' => 'primary', 'menu_id' => 'primary-menu', 'menu_class' => 'nav-menu'));
?>
                                    </div>


                            </nav><!-- #site-navigation -->
                    </div><!-- .top-bar-center NON-Foundation -->      
                </div><!-- #primary-nav-bar -->
                
                <?php 
if (has_nav_menu('social')) {
    ?>
Exemple #6
0
language_attributes();
?>
>
<head>
    <title><?php 
wp_title('');
?>
</title>
    <meta http-equiv="Content-Type" content="<?php 
bloginfo('html_type');
?>
; charset=<?php 
bloginfo('charset');
?>
" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <?php 
wp_head();
?>
</head>
<body <?php 
body_class($smooth_scroll_class);
?>
>
    <?php 
if (has_custom_logo() || has_nav_menu('primary')) {
    get_template_part('theme/partials/nav');
}
?>
    <main>

                            <div class="navbar-header col-md-3">

                                <!-- .navbar-toggle is used as the toggle for collapsed navbar content -->

                                  <button class="navbar-toggle hidden-sm-up" type="button" data-toggle="collapse" data-target=".exCollapsingNavbar">
                                    <span class="sr-only">Toggle navigation</span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                </button>

                                <!-- Your site title as branding in the menu -->
	                                <?php 
if (!has_custom_logo()) {
    ?>
		                                <a class="navbar-brand" href="<?php 
    echo esc_url(home_url('/'));
    ?>
" title="<?php 
    echo esc_attr(get_bloginfo('name', 'display'));
    ?>
" rel="home">
		                                	<?php 
    bloginfo('name');
    ?>
		                                </a>
	                                <?php 
} else {
    the_custom_logo();
Exemple #8
0
    echo get_site_url();
    ?>
">
                <?php 
    the_custom_logo();
    ?>
            </a>
        </div>
        <?php 
}
?>
        
        <?php 
if (has_nav_menu('primary')) {
    ?>
        <div class="column <?php 
    echo has_custom_logo() ? 'xs-span4 sm-span6 md-span8 lg-span9' : 'xs-span12';
    ?>
">
            <?php 
    $args = array('theme_location' => 'primary', 'menu' => '', 'container' => 'div', 'container_id' => 'nav-menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s">%3$s</ul>', 'depth' => 0, 'walker' => '');
    wp_nav_menu($args);
    $args = array('theme_location' => 'primary', 'menu' => '', 'container' => 'div', 'container_id' => 'dl-menu', 'container_class' => 'dl-menuwrapper', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<button class="dl-trigger">Open Menu</button><ul class="dl-menu">%3$s</ul>', 'depth' => 0, 'walker' => '');
    wp_nav_menu($args);
    ?>
        </div>
        <?php 
}
?>
    </div>
</nav>
/**
 * Filters the WordPress body class with a better set of classes that are more consistently handled and
 * are backwards compatible with the original body class functionality that existed prior to WordPress
 * core adopting this feature.
 *
 * @since  2.0.0
 * @access public
 * @param  array        $classes
 * @param  string|array $class
 * @return array
 */
function hybrid_body_class_filter($classes, $class)
{
    // WordPress class for uses when WordPress isn't always the only system on the site.
    $classes = array('wordpress');
    // Text direction.
    $classes[] = is_rtl() ? 'rtl' : 'ltr';
    // Locale and language.
    $locale = get_locale();
    $lang = hybrid_get_language($locale);
    if ($locale !== $lang) {
        $classes[] = $lang;
    }
    $classes[] = strtolower(str_replace('_', '-', $locale));
    // Check if the current theme is a parent or child theme.
    $classes[] = is_child_theme() ? 'child-theme' : 'parent-theme';
    // Multisite check adds the 'multisite' class and the blog ID.
    if (is_multisite()) {
        $classes[] = 'multisite';
        $classes[] = 'blog-' . get_current_blog_id();
    }
    // Date classes.
    $time = time() + get_option('gmt_offset') * 3600;
    $classes[] = strtolower(gmdate('\\yY \\mm \\dd \\hH l', $time));
    // Is the current user logged in.
    $classes[] = is_user_logged_in() ? 'logged-in' : 'logged-out';
    // WP admin bar.
    if (is_admin_bar_showing()) {
        $classes[] = 'admin-bar';
    }
    // Use the '.custom-background' class to integrate with the WP background feature.
    if (get_background_image() || get_background_color()) {
        $classes[] = 'custom-background';
    }
    // Add the '.custom-header' class if the user is using a custom header.
    if (get_header_image() || display_header_text() && get_header_textcolor()) {
        $classes[] = 'custom-header';
    }
    // Add the `.custom-logo` class if user is using a custom logo.
    if (function_exists('has_custom_logo') && has_custom_logo()) {
        $classes[] = 'wp-custom-logo';
    }
    // Add the '.display-header-text' class if the user chose to display it.
    if (display_header_text()) {
        $classes[] = 'display-header-text';
    }
    // Plural/multiple-post view (opposite of singular).
    if (hybrid_is_plural()) {
        $classes[] = 'plural';
    }
    // Merge base contextual classes with $classes.
    $classes = array_merge($classes, hybrid_get_context());
    // Singular post (post_type) classes.
    if (is_singular()) {
        // Get the queried post object.
        $post = get_queried_object();
        // Checks for custom template.
        $template = str_replace(array("{$post->post_type}-template-", "{$post->post_type}-"), '', basename(hybrid_get_post_template($post->ID), '.php'));
        if ($template) {
            $classes[] = "{$post->post_type}-template-{$template}";
        }
        // Post format.
        if (current_theme_supports('post-formats') && post_type_supports($post->post_type, 'post-formats')) {
            $post_format = get_post_format(get_queried_object_id());
            $classes[] = $post_format && !is_wp_error($post_format) ? "{$post->post_type}-format-{$post_format}" : "{$post->post_type}-format-standard";
        }
        // Attachment mime types.
        if (is_attachment()) {
            foreach (explode('/', get_post_mime_type()) as $type) {
                $classes[] = "attachment-{$type}";
            }
        }
    }
    // Paged views.
    if (is_paged()) {
        $classes[] = 'paged';
        $classes[] = 'paged-' . intval(get_query_var('paged'));
    } elseif (is_singular() && 1 < get_query_var('page')) {
        $classes[] = 'paged';
        $classes[] = 'paged-' . intval(get_query_var('page'));
    }
    // Theme layouts.
    if (current_theme_supports('theme-layouts')) {
        $classes[] = sanitize_html_class('layout-' . hybrid_get_theme_layout());
    }
    // Input class.
    if ($class) {
        $class = is_array($class) ? $class : preg_split('#\\s+#', $class);
        $classes = array_merge($classes, $class);
    }
    return array_map('esc_attr', $classes);
}
 /**
  * @ticket 38253
  */
 function test_has_custom_logo_preserves_switched_state()
 {
     if (!is_multisite()) {
         $this->markTestSkipped('This test requires multisite.');
     }
     $blog_id = $this->factory->blog->create();
     switch_to_blog($blog_id);
     $expected = $GLOBALS['_wp_switched_stack'];
     has_custom_logo($blog_id);
     $result = $GLOBALS['_wp_switched_stack'];
     restore_current_blog();
     $this->assertSame($expected, $result);
 }
Exemple #11
0
            
	<header id="masthead" class="group site-header title-bar top-bar" role="banner" data-sticky data-options="marginTop:0;" style="width:100%" data-top-anchor="masthead" data-btm-anchor="colophon:bottom">
            
            <div class="row"> <!-- Start Foundation row -->
                
                <div class="top-bar-title">
<!--                    <div class="title-bar" data-responsive-toggle="example-menu" data-hide-for="large">
                    <button class="menu-icon" type="button" data-toggle></button>
                    <div class="title-bar-title">Menu</div>
                    </div>-->
                    <div class="site-branding">
                    <?php 
if (has_custom_logo() || jetpack_has_site_logo()) {
    jinn_the_site_logo();
}
if (!has_custom_logo() && !jetpack_has_site_logo() || has_custom_logo() && get_theme_mod('show_logo_sitename') === true) {
    ?>
                    
                                <?php 
    if (is_front_page() || is_home() || is_page_template('page-templates/frontpage-portfolio.php')) {
        ?>
                                    <h1 class="site-title"><a href="<?php 
        echo esc_url(home_url('/'));
        ?>
" rel="home"><?php 
        bloginfo('name');
        ?>
</a></h1>
                                <?php 
    } else {
        ?>
Exemple #12
0
/**
 * Check if the site has a custom logo.
 *
 * @since 1.0.0
 *
 * @return bool
 */
function rock_has_custom_logo()
{
    /**
     * For backwards compatibility prior to WordPress 4.5.
     *
     * @link  https://developer.wordpress.org/reference/functions/has_custom_logo/
     * @since 1.0.0
     */
    $enabled = function_exists('has_custom_logo') ? has_custom_logo() : (bool) get_theme_mod('custom_logo');
    /**
     * Filter if the site has a custom logo.
     *
     * @since 1.0.0
     *
     * @var bool
     */
    return (bool) apply_filters('rock_has_custom_logo', $enabled);
}
Exemple #13
0
/**
 * Render the theme logo.
 */
function focus_display_logo()
{
    $logo = siteorigin_setting('general_logo');
    $retina_logo = siteorigin_setting('general_retina_logo');
    if (empty($logo)) {
        if (function_exists('has_custom_logo') && has_custom_logo()) {
            the_custom_logo();
            return;
        } else {
            // Just display the site title
            bloginfo('name');
            return;
        }
    }
    $image = wp_get_attachment_image_src($logo, 'full');
    if (siteorigin_setting('general_logo_scale')) {
        $height = min($image[2], 26);
        $width = $height / $image[1] * $image[2];
    } else {
        $height = $image[2];
        $width = $image[1];
    }
    if ($retina_logo) {
        $image_2x = wp_get_attachment_image_src($retina_logo, 'full');
        $srcset = 'srcset="' . $image[0] . ' 1x, ' . $image_2x[0] . ' 2x"';
    }
    // echo $image;
    ?>
<img src="<?php 
    echo $image[0];
    ?>
" <?php 
    echo $srcset;
    ?>
 width="<?php 
    echo round($width);
    ?>
" height="<?php 
    echo round($height);
    ?>
" /><?php 
}
Exemple #14
0
 /**
  * Display the logo
  */
 function vantage_display_logo()
 {
     $logo = siteorigin_setting('logo_image');
     $logo = apply_filters('vantage_logo_image_id', $logo);
     if (empty($logo)) {
         if (function_exists('has_custom_logo') && has_custom_logo()) {
             the_custom_logo();
             return;
         }
         // Just display the site title
         $logo_html = '<h1 class="site-title">' . get_bloginfo('name') . '</h1>';
         $logo_html = apply_filters('vantage_logo_text', $logo_html);
     } else {
         // load the logo image
         if (is_array($logo)) {
             list($src, $height, $width) = $logo;
         } else {
             $image = wp_get_attachment_image_src($logo, 'full');
             $src = $image[0];
             $height = $image[2];
             $width = $image[1];
         }
         // Add all the logo attributes
         $logo_attributes = apply_filters('vantage_logo_image_attributes', array('src' => $src, 'class' => siteorigin_setting('logo_in_menu_constrain') ? 'logo-height-constrain' : 'logo-no-height-constrain', 'width' => round($width), 'height' => round($height), 'alt' => sprintf(__('%s Logo', 'vantage'), get_bloginfo('name'))));
         // Try adding the retina logo
         $retina_logo = siteorigin_setting('logo_image_retina');
         if (!empty($retina_logo)) {
             $retina_logo = apply_filters('vantage_logo_retina_image_id', $retina_logo);
             $retina_logo_image = wp_get_attachment_image_src($retina_logo, 'full');
             if (!empty($retina_logo_image[0])) {
                 $logo_attributes['srcset'] = $retina_logo_image[0] . ' 2x';
             }
         }
         if ($logo_attributes['width'] > vantage_get_site_width()) {
             // Don't let the width be more than the site width.
             $width = vantage_get_site_width();
             $logo_attributes['height'] = round($logo_attributes['height'] / ($logo_attributes['width'] / $width));
             $logo_attributes['width'] = $width;
         }
         $logo_attributes_str = array();
         if (!empty($logo_attributes)) {
             foreach ($logo_attributes as $name => $val) {
                 if (empty($val)) {
                     continue;
                 }
                 $logo_attributes_str[] = $name . '="' . esc_attr($val) . '" ';
             }
         }
         $logo_html = apply_filters('vantage_logo_image', '<img ' . implode(' ', $logo_attributes_str) . ' />');
     }
     // Echo the image
     echo apply_filters('vantage_logo_html', $logo_html);
 }
Exemple #15
0
 function origami_header_image()
 {
     if (function_exists('has_custom_logo') && has_custom_logo()) {
         $logo = get_custom_logo();
         if (!empty($logo)) {
             echo $logo;
             return true;
         }
     }
     if (function_exists('has_header_image') && has_header_image()) {
         $header = get_custom_header();
         echo '<img src="' . esc_url($header->url) . '"';
         if (!empty($header->height)) {
             echo ' height="' . $header->height . '"';
         }
         if (!empty($header->width)) {
             echo ' width="' . $header->width . '"';
         }
         echo ' alt="' . esc_attr(get_bloginfo('name')) . '" />';
         return true;
     }
     return false;
 }
Exemple #16
0
?>
		<?php 
$class = get_header_image() ? ' has-image' : ' no-image';
?>
		<div id="header" class='header<?php 
echo $class;
?>
'>
			<header role="banner">
				<?php 
echo apply_filters('milky_way_top_of_header', '');
?>
				<?php 
$logo_img = '';
$has_logo = '';
$logo = has_custom_logo();
if ($logo) {
    // if alt is bank, use theme alt.
    $logo_img = "<div class='logo'>" . get_custom_logo() . "</div>";
    $has_logo = 'has-logo';
    $class .= ' ' . $has_logo;
}
?>
				<div class="text-header<?php 
echo $class;
?>
">
					<div class='contents'>
						<div class="outer">
							<div class='inner-contents'>
							<?php 
Exemple #17
0
<div id="sidebar-left">
    <div id="logo">

		<?php 
if (function_exists('has_custom_logo') && has_custom_logo()) {
    ?>
			<?php 
    the_custom_logo();
    ?>
		<?php 
} else {
    ?>
			<h1 class="site-title">
				<a href="<?php 
    echo esc_url(home_url('/'));
    ?>
" rel="home"><?php 
    bloginfo('name');
    ?>
</a>
			</h1>
		<?php 
}
?>

    </div>
	
	<?php 
if (is_user_logged_in()) {
    ?>
	    <div  class="padder" id="user-info-login">
Exemple #18
0
 /**
  * @group custom_logo
  * @group multisite
  */
 function test_has_custom_logo_returns_false_when_called_for_other_site_without_custom_logo_set()
 {
     if (!is_multisite()) {
         $this->markTestSkipped('This test requires multisite.');
     }
     $blog_id = $this->factory->blog->create();
     $this->assertFalse(has_custom_logo($blog_id));
 }
Exemple #19
0
<?php

/**
 * Template part for displaying the site branding.
 */
?>

<div <?php 
hybrid_attr('branding');
?>
>
	<?php 
if (has_custom_logo()) {
    // If the site logo is set.
    ?>
		<?php 
    if (is_front_page() || is_home()) {
        ?>
			<h1 <?php 
        hybrid_attr('site-title');
        ?>
><?php 
        the_custom_logo();
        ?>
</h1>
		<?php 
    } else {
        ?>
			<p <?php 
        hybrid_attr('site-title');
        ?>
/**
 * Morfeu Custom Logo
 */
function morfeu_the_custom_logo()
{
    if (function_exists('the_custom_logo') && has_custom_logo()) {
        the_custom_logo();
    } else {
        ?>
		<a class="navbar-brand clearfix" href="<?php 
        echo esc_url(home_url('/'));
        ?>
" title="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
" rel="home">
			<h1 class='site-title'><?php 
        bloginfo('name');
        ?>
</h1>
		</a>
	<?php 
    }
}
/**
 * Retrieve the classes for the body element as an array.
 *
 * @since 2.8.0
 *
 * @global WP_Query $wp_query
 *
 * @param string|array $class One or more classes to add to the class list.
 * @return array Array of classes.
 */
function get_body_class($class = '')
{
    global $wp_query;
    $classes = array();
    if (is_rtl()) {
        $classes[] = 'rtl';
    }
    if (is_front_page()) {
        $classes[] = 'home';
    }
    if (is_home()) {
        $classes[] = 'blog';
    }
    if (is_archive()) {
        $classes[] = 'archive';
    }
    if (is_date()) {
        $classes[] = 'date';
    }
    if (is_search()) {
        $classes[] = 'search';
        $classes[] = $wp_query->posts ? 'search-results' : 'search-no-results';
    }
    if (is_paged()) {
        $classes[] = 'paged';
    }
    if (is_attachment()) {
        $classes[] = 'attachment';
    }
    if (is_404()) {
        $classes[] = 'error404';
    }
    if (is_single()) {
        $post_id = $wp_query->get_queried_object_id();
        $post = $wp_query->get_queried_object();
        $classes[] = 'single';
        if (isset($post->post_type)) {
            $classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id);
            $classes[] = 'postid-' . $post_id;
            // Post Format
            if (post_type_supports($post->post_type, 'post-formats')) {
                $post_format = get_post_format($post->ID);
                if ($post_format && !is_wp_error($post_format)) {
                    $classes[] = 'single-format-' . sanitize_html_class($post_format);
                } else {
                    $classes[] = 'single-format-standard';
                }
            }
        }
        if (is_attachment()) {
            $mime_type = get_post_mime_type($post_id);
            $mime_prefix = array('application/', 'image/', 'text/', 'audio/', 'video/', 'music/');
            $classes[] = 'attachmentid-' . $post_id;
            $classes[] = 'attachment-' . str_replace($mime_prefix, '', $mime_type);
        }
    } elseif (is_archive()) {
        if (is_post_type_archive()) {
            $classes[] = 'post-type-archive';
            $post_type = get_query_var('post_type');
            if (is_array($post_type)) {
                $post_type = reset($post_type);
            }
            $classes[] = 'post-type-archive-' . sanitize_html_class($post_type);
        } elseif (is_author()) {
            $author = $wp_query->get_queried_object();
            $classes[] = 'author';
            if (isset($author->user_nicename)) {
                $classes[] = 'author-' . sanitize_html_class($author->user_nicename, $author->ID);
                $classes[] = 'author-' . $author->ID;
            }
        } elseif (is_category()) {
            $cat = $wp_query->get_queried_object();
            $classes[] = 'category';
            if (isset($cat->term_id)) {
                $cat_class = sanitize_html_class($cat->slug, $cat->term_id);
                if (is_numeric($cat_class) || !trim($cat_class, '-')) {
                    $cat_class = $cat->term_id;
                }
                $classes[] = 'category-' . $cat_class;
                $classes[] = 'category-' . $cat->term_id;
            }
        } elseif (is_tag()) {
            $tag = $wp_query->get_queried_object();
            $classes[] = 'tag';
            if (isset($tag->term_id)) {
                $tag_class = sanitize_html_class($tag->slug, $tag->term_id);
                if (is_numeric($tag_class) || !trim($tag_class, '-')) {
                    $tag_class = $tag->term_id;
                }
                $classes[] = 'tag-' . $tag_class;
                $classes[] = 'tag-' . $tag->term_id;
            }
        } elseif (is_tax()) {
            $term = $wp_query->get_queried_object();
            if (isset($term->term_id)) {
                $term_class = sanitize_html_class($term->slug, $term->term_id);
                if (is_numeric($term_class) || !trim($term_class, '-')) {
                    $term_class = $term->term_id;
                }
                $classes[] = 'tax-' . sanitize_html_class($term->taxonomy);
                $classes[] = 'term-' . $term_class;
                $classes[] = 'term-' . $term->term_id;
            }
        }
    } elseif (is_page()) {
        $classes[] = 'page';
        $page_id = $wp_query->get_queried_object_id();
        $post = get_post($page_id);
        $classes[] = 'page-id-' . $page_id;
        if (get_pages(array('parent' => $page_id, 'number' => 1))) {
            $classes[] = 'page-parent';
        }
        if ($post->post_parent) {
            $classes[] = 'page-child';
            $classes[] = 'parent-pageid-' . $post->post_parent;
        }
        if (is_page_template()) {
            $classes[] = 'page-template';
            $template_slug = get_page_template_slug($page_id);
            $template_parts = explode('/', $template_slug);
            foreach ($template_parts as $part) {
                $classes[] = 'page-template-' . sanitize_html_class(str_replace(array('.', '/'), '-', basename($part, '.php')));
            }
            $classes[] = 'page-template-' . sanitize_html_class(str_replace('.', '-', $template_slug));
        } else {
            $classes[] = 'page-template-default';
        }
    }
    if (is_user_logged_in()) {
        $classes[] = 'logged-in';
    }
    if (is_admin_bar_showing()) {
        $classes[] = 'admin-bar';
        $classes[] = 'no-customize-support';
    }
    if (get_background_color() !== get_theme_support('custom-background', 'default-color') || get_background_image()) {
        $classes[] = 'custom-background';
    }
    if (has_custom_logo()) {
        $classes[] = 'wp-custom-logo';
    }
    $page = $wp_query->get('page');
    if (!$page || $page < 2) {
        $page = $wp_query->get('paged');
    }
    if ($page && $page > 1 && !is_404()) {
        $classes[] = 'paged-' . $page;
        if (is_single()) {
            $classes[] = 'single-paged-' . $page;
        } elseif (is_page()) {
            $classes[] = 'page-paged-' . $page;
        } elseif (is_category()) {
            $classes[] = 'category-paged-' . $page;
        } elseif (is_tag()) {
            $classes[] = 'tag-paged-' . $page;
        } elseif (is_date()) {
            $classes[] = 'date-paged-' . $page;
        } elseif (is_author()) {
            $classes[] = 'author-paged-' . $page;
        } elseif (is_search()) {
            $classes[] = 'search-paged-' . $page;
        } elseif (is_post_type_archive()) {
            $classes[] = 'post-type-paged-' . $page;
        }
    }
    if (!empty($class)) {
        if (!is_array($class)) {
            $class = preg_split('#\\s+#', $class);
        }
        $classes = array_merge($classes, $class);
    } else {
        // Ensure that we always coerce class to being an array.
        $class = array();
    }
    $classes = array_map('esc_attr', $classes);
    /**
     * Filters the list of CSS body classes for the current post or page.
     *
     * @since 2.8.0
     *
     * @param array $classes An array of body classes.
     * @param array $class   An array of additional classes added to the body.
     */
    $classes = apply_filters('body_class', $classes, $class);
    return array_unique($classes);
}
    /**
     * Display the site title or logo
     *
     * @since  2.1.0
     * @return void
     */
    function storefront_site_title_or_logo()
    {
        if (function_exists('the_custom_logo') && has_custom_logo()) {
            $logo = get_custom_logo();
            echo $logo = is_home() ? '<h1 class="logo">' . $logo . '</h1>' : $logo;
        } elseif (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
            jetpack_the_site_logo();
        } else {
            $tag = is_home() ? 'h1' : 'div';
            echo '<' . esc_attr($tag) . ' class="beta site-title"><a href="' . esc_url(home_url('/')) . '" rel="home">' . esc_attr(get_bloginfo('name')) . '</a></' . esc_attr($tag) . '>';
            if ('' != get_bloginfo('description')) {
                ?>
				<p class="site-description"><?php 
                echo bloginfo('description');
                ?>
</p>
				<?php 
            }
        }
    }