Adds support for WordPress 4.5's site logo feature. closes #340

This commit is contained in:
James Koster 2016-03-18 14:34:16 +00:00
parent b914179964
commit d2fb9475b5
6 changed files with 22 additions and 19 deletions

View file

@ -27,7 +27,8 @@ body {
z-index: 999;
.site-logo-anchor,
.site-logo-link {
.site-logo-link,
.custom-logo-link {
display: block;
img {
@ -38,7 +39,8 @@ body {
.site-branding,
.site-logo-anchor,
.site-logo-link {
.site-logo-link,
.custom-logo-link {
margin-bottom: 1.618em;
}
@ -74,7 +76,7 @@ body {
.site-branding {
h1 {
font-size: 1.618em;
font-size: 2em;
letter-spacing: -1px;
margin: 0;

View file

@ -19,7 +19,8 @@
.site-branding,
.site-logo-anchor,
.site-logo-link {
.site-logo-link,
.custom-logo-link {
display: block;
@include span(3 of 12);
clear: both;
@ -67,8 +68,9 @@
.site-search,
.site-header-cart,
.site-logo-anchor,
.site-logo-link {
margin-bottom: 1em;
.site-logo-link,
.custom-logo-link {
margin-bottom: 2.244em;
}
.site-header {

View file

@ -34,7 +34,8 @@
.site-branding,
.site-logo-anchor,
.site-logo-link {
.site-logo-link,
.custom-logo-link {
float: left;
}
}
@ -831,14 +832,6 @@ a.reset_variations {
table.cart {
margin-bottom: 3.631em;
thead {
text-indent: -999em;
th {
padding: 0;
}
}
.product-thumbnail,
.product-quantity .plus,
.product-quantity .minus {
@ -2053,8 +2046,7 @@ dl.variation {
table.cart {
th,
td,
thead th {
td {
padding: 1.618em;
}

View file

@ -75,6 +75,11 @@ if ( ! class_exists( 'Storefront' ) ) :
*/
add_theme_support( 'post-thumbnails' );
/**
* Enable support for site logo
*/
add_theme_support( 'custom-logo' );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'storefront' ),

View file

@ -564,7 +564,7 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
}
.widget h1 {
border-bottom-color: ' . $storefront_theme_mods['header_color'] . ';
border-bottom-color: ' . $storefront_theme_mods['heading_color'] . ';
}
body,

View file

@ -243,7 +243,9 @@ if ( ! function_exists( 'storefront_site_branding' ) ) {
* @return void
*/
function storefront_site_branding() {
if ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
if ( function_exists( 'the_custom_logo' ) ) {
the_custom_logo();
} elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
jetpack_the_site_logo();
} else { ?>
<div class="site-branding">