Skip to content

Commit b978034

Browse files
committed
Merge branch 'master' of https://github.com/woocommerce/storefront into feature/pre-commit
2 parents d2eed07 + 52dbca9 commit b978034

20 files changed

+805
-771
lines changed

assets/css/woocommerce/woocommerce.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,12 @@ table.shop_table_responsive {
254254
text-align: right;
255255
clear: both;
256256

257-
&::before {
258-
content: attr(data-title) ': ';
259-
font-weight: 600;
260-
float: left;
257+
&[data-title] {
258+
&::before {
259+
content: attr(data-title) ': ';
260+
font-weight: 600;
261+
float: left;
262+
}
261263
}
262264

263265
&.product-remove {

functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
}
3838

3939
if ( storefront_is_woocommerce_activated() ) {
40-
$storefront->woocommerce = require 'inc/woocommerce/class-storefront-woocommerce.php';
40+
$storefront->woocommerce = require 'inc/woocommerce/class-storefront-woocommerce.php';
41+
$storefront->woocommerce_customizer = require 'inc/woocommerce/class-storefront-woocommerce-customizer.php';
4142

4243
require 'inc/woocommerce/storefront-woocommerce-template-hooks.php';
4344
require 'inc/woocommerce/storefront-woocommerce-template-functions.php';

inc/admin/class-storefront-admin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Storefront Admin Class
44
*
5-
* @author WooThemes
65
* @package storefront
76
* @since 2.0.0
87
*/

inc/admin/class-storefront-plugin-install.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Storefront Plugin Install Class
44
*
5-
* @author WooThemes
65
* @package storefront
76
* @since 2.2.0
87
*/

inc/class-storefront.php

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Storefront Class
44
*
5-
* @author WooThemes
65
* @since 2.0.0
76
* @package storefront
87
*/
@@ -70,15 +69,17 @@ public function setup() {
7069
add_theme_support( 'post-thumbnails' );
7170

7271
/**
73-
* Enable support for site logo
72+
* Enable support for site logo.
7473
*/
7574
add_theme_support( 'custom-logo', apply_filters( 'storefront_custom_logo_args', array(
7675
'height' => 110,
7776
'width' => 470,
7877
'flex-width' => true,
7978
) ) );
8079

81-
// This theme uses wp_nav_menu() in two locations.
80+
/**
81+
* Register menu locations.
82+
*/
8283
register_nav_menus( apply_filters( 'storefront_register_nav_menus', array(
8384
'primary' => __( 'Primary Menu', 'storefront' ),
8485
'secondary' => __( 'Secondary Menu', 'storefront' ),
@@ -98,12 +99,26 @@ public function setup() {
9899
'widgets',
99100
) ) );
100101

101-
// Setup the WordPress core custom background feature.
102+
/**
103+
* Setup the WordPress core custom background feature.
104+
*/
102105
add_theme_support( 'custom-background', apply_filters( 'storefront_custom_background_args', array(
103106
'default-color' => apply_filters( 'storefront_default_background_color', 'ffffff' ),
104107
'default-image' => '',
105108
) ) );
106109

110+
/**
111+
* Setup the WordPress core custom header feature.
112+
*/
113+
add_theme_support( 'custom-header', apply_filters( 'storefront_custom_header_args', array(
114+
'default-image' => '',
115+
'header-text' => false,
116+
'width' => 1950,
117+
'height' => 500,
118+
'flex-width' => true,
119+
'flex-height' => true,
120+
) ) );
121+
107122
/**
108123
* Add support for the Site Logo plugin and the site logo functionality in JetPack
109124
* https://github.com/automattic/site-logo
@@ -113,27 +128,14 @@ public function setup() {
113128
'size' => 'full'
114129
) ) );
115130

116-
// Declare WooCommerce support.
117-
add_theme_support( 'woocommerce', apply_filters( 'storefront_woocommerce_args', array(
118-
'single_image_width' => 416,
119-
'thumbnail_image_width' => 324,
120-
'product_grid' => array(
121-
'default_columns' => 3,
122-
'default_rows' => 4,
123-
'min_columns' => 1,
124-
'max_columns' => 6,
125-
'min_rows' => 1
126-
)
127-
) ) );
128-
129-
add_theme_support( 'wc-product-gallery-zoom' );
130-
add_theme_support( 'wc-product-gallery-lightbox' );
131-
add_theme_support( 'wc-product-gallery-slider' );
132-
133-
// Declare support for title theme feature.
131+
/**
132+
* Declare support for title theme feature.
133+
*/
134134
add_theme_support( 'title-tag' );
135135

136-
// Declare support for selective refreshing of widgets.
136+
/**
137+
* Declare support for selective refreshing of widgets.
138+
*/
137139
add_theme_support( 'customize-selective-refresh-widgets' );
138140
}
139141

@@ -300,14 +302,17 @@ public function page_menu_args( $args ) {
300302
* @return array
301303
*/
302304
public function body_classes( $classes ) {
303-
// Adds a class of group-blog to blogs with more than 1 published author.
305+
// Adds a class to blogs with more than 1 published author.
304306
if ( is_multi_author() ) {
305307
$classes[] = 'group-blog';
306308
}
307309

308-
if ( ! function_exists( 'woocommerce_breadcrumb' ) ) {
309-
$classes[] = 'no-wc-breadcrumb';
310-
}
310+
/**
311+
* Adds a class when WooCommerce is not active.
312+
*
313+
* @todo Refactor child themes to remove dependency on this class.
314+
*/
315+
$classes[] = 'no-wc-breadcrumb';
311316

312317
/**
313318
* What is this?!
@@ -325,12 +330,12 @@ public function body_classes( $classes ) {
325330
$classes[] = 'storefront-full-width-content';
326331
}
327332

328-
// Add class when using homepage template + featured image
333+
// Add class when using homepage template + featured image.
329334
if ( is_page_template( 'template-homepage.php' ) && has_post_thumbnail() ) {
330335
$classes[] = 'has-post-thumbnail';
331336
}
332337

333-
// Add class when Secondary Navigation is in use
338+
// Add class when Secondary Navigation is in use.
334339
if ( has_nav_menu( 'secondary' ) ) {
335340
$classes[] = 'storefront-secondary-navigation';
336341
}

inc/customizer/class-storefront-customizer-control-arbitrary.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Class to create a custom arbitrary html control for dividers etc
44
*
5-
* @author WooThemes
65
* @package storefront
76
*/
87

inc/customizer/class-storefront-customizer-control-more.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* Class to create a Customizer control for displaying information
44
*
5-
* @author WooThemes
65
* @package storefront
76
*/
87

0 commit comments

Comments
 (0)