Skip to content

Commit 426b0cf

Browse files
Merge pull request #121 from bigboxwc/release/3.1.0
release/3.1.0
2 parents 4291a8a + 65e6b02 commit 426b0cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+441
-170
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## [3.1.0] - 2018-02-15
2+
3+
### New
4+
5+
- Add ARIA landmarks.
6+
- Allow price, rating, stock information, sale flash, short description, and "more options" in the product catalog to be hidden via the Customizer.
7+
- Use primary site color for input `:focus` border color.
8+
- Add accessible `labels` for FacetWP checkbox and radio facets.
9+
- WooCommerce 3.6.0 compatibility.
10+
- Allow image lazyload script to load in the footer.
11+
- Further WooCommerce Blocks style improvements.
12+
13+
### Fix
14+
15+
- Ensure dynamic colors are applied to elements left out in 3.0.0 update.
16+
- Ensure "No results found" shows when no results are available in FacetWP.
17+
- Don't attempt to open offcanvas drawers when using content skip links.
18+
- Hide "First Page" and "Last Page" links in FacetWP pagination.
19+
- Ensure :focus outline is visible on WooCommerce image gallery items.
20+
121
## [3.0.0] - 2018-02-04
222

323
### Breaking

app/customize/controls/wordpress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function bigbox_customize_register( $wp_customize ) {
3030
/* translators: Customizer control label. */
3131
$wp_customize->get_control( 'blogdescription' )->description = __( 'Not output but used for SEO', 'bigbox' );
3232

33-
// Update label of Header Text
33+
// Update label of Header Text.
3434
/* translators: Customizer control label. */
3535
$wp_customize->get_control( 'header_text' )->label = __( 'Display Site Title', 'bigbox' );
3636

app/customize/output/color-gray-200.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
'.wc-social-login',
4141
'.woocommerce-OrderUpdate',
4242
'.woocommerce-shipping-address',
43+
'.woocommerce-mini-cart__total',
4344
'.tax-wcpv_product_vendors .woocommerce-products-header__title img',
4445
],
4546
'declarations' => [

app/customize/output/color-gray-300.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
'.navbar-search__category select',
4949
'.widget ul ul',
5050
'.action-list__item--inset',
51-
'.shipping-note',
51+
'.woocommerce-shipping-note',
5252

5353
'.review-breakdown',
5454
'.review-breakdown__item',

app/customize/output/color-gray-400.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
// Solid border-color.
2020
[
2121
'selectors' => [
22-
'textarea:focus',
23-
'[type="email"]:focus',
24-
'[type="search"]:focus',
25-
'[type="tel"]:focus',
26-
'[type="url"]:focus',
27-
'[type="password"]:focus',
28-
'[type="text"]:focus',
2922
'.wc_payment_method [type="radio"] label:before',
3023
'ul.brands_index li a',
3124
'ul.brands_index li span',
@@ -63,12 +56,4 @@
6356
'border-left-color' => 'transparent',
6457
],
6558
],
66-
67-
// @mixin form--input
68-
[
69-
'selectors' => bigbox_customize_add_state_to_selectors( bigbox_customize_get_form_input_selectors(), 'focus' ),
70-
'declarations' => [
71-
'border-color' => esc_attr( $gray400 ),
72-
],
73-
],
7459
];

app/customize/output/color-gray-700.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@
6565
'selectors' => [
6666
'.woocommerce-product-gallery__trigger:after',
6767
'i.bigbox-icon',
68+
69+
'.menu-item > a[href*="dribbble.com"]::before',
70+
'.menu-item > a[href*="facebook.com"]::before',
71+
'.menu-item > a[href*="github.com"]::before',
72+
'.menu-item > a[href*="google.com"]::before',
73+
'.menu-item > a[href*="reddit.com"]::before',
74+
'.menu-item > a[href*="rss.com"]::before',
75+
'.menu-item > a[href*="slack.com"]::before',
76+
'.menu-item > a[href*="twitch.com"]::before',
77+
'.menu-item > a[href*="twitter.com"]::before',
78+
'.menu-item > a[href*="wordpress.com"]::before',
79+
'.menu-item > a[href*="youtube.com"]::before',
6880
],
6981
'declarations' => [
7082
'background-color' => esc_attr( $gray700 ),

app/customize/output/color-primary.php

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'color' => [
2222
'selectors' => [
2323
'a:hover',
24+
2425
'.navbar-menu--primary .sub-menu a:hover',
2526
'.wc-layered-nav-term.chosen',
2627
'.wc-layered-nav-term.chosen a',
@@ -83,20 +84,24 @@
8384

8485
// Solid border-color.
8586
'border-color' => [
86-
'selectors' => [
87-
'.widget_price_filter .ui-slider .ui-slider-handle',
88-
'.facetwp-facet.facetwp-type-slider .facetwp-slider .noUi-handle',
87+
'selectors' => array_merge(
88+
[
8989

90-
'.woocommerce-MyAccount-navigation-link.is-active a',
90+
'.widget_price_filter .ui-slider .ui-slider-handle',
91+
'.facetwp-facet.facetwp-type-slider .facetwp-slider .noUi-handle',
9192

92-
// Flatpickr.
93-
'.flatpickr-calendar .flatpickr-day.selected',
94-
'.flatpickr-calendar .flatpickr-day.startRange',
95-
'.flatpickr-calendar .flatpickr-day.endRange',
96-
'.flatpickr-calendar .flatpickr-day.selected.inRange',
97-
'.flatpickr-calendar .flatpickr-day.startRange.inRange',
98-
'.flatpickr-calendar .flatpickr-day.endRange.inRange',
99-
],
93+
'.woocommerce-MyAccount-navigation-link.is-active a',
94+
95+
// Flatpickr.
96+
'.flatpickr-calendar .flatpickr-day.selected',
97+
'.flatpickr-calendar .flatpickr-day.startRange',
98+
'.flatpickr-calendar .flatpickr-day.endRange',
99+
'.flatpickr-calendar .flatpickr-day.selected.inRange',
100+
'.flatpickr-calendar .flatpickr-day.startRange.inRange',
101+
'.flatpickr-calendar .flatpickr-day.endRange.inRange',
102+
],
103+
bigbox_customize_add_state_to_selectors( bigbox_customize_get_form_input_selectors(), 'focus' )
104+
),
100105
'declarations' => [
101106
'border-color' => esc_attr( $primary ),
102107
],
@@ -113,4 +118,14 @@
113118
'outline-color' => esc_attr( $primary ),
114119
],
115120
],
121+
122+
// Inset box shadow where outline doesn't work.
123+
'box-shadow' => [
124+
'selectors' => [
125+
'.is-tabbing .woocommerce-product-gallery__image a:focus:after',
126+
],
127+
'declarations' => [
128+
'box-shadow' => esc_attr( 'inset 0 0 0 2px ' . $primary ),
129+
],
130+
],
116131
];

app/integrations/facetwp/class-facetwp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class FacetWP extends Integration implements Registerable, Service {
4949
'color-gray-200',
5050
'color-primary',
5151
'refresh',
52+
'type',
5253
];
5354

5455
/**
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* Config for type output.
4+
*
5+
* @since 3.1.0
6+
*
7+
* @package BigBox
8+
* @category Integration
9+
* @author Spencer Finnell
10+
*/
11+
12+
$weight_base = bigbox_get_theme_font_weight( 'base' );
13+
14+
if ( 'regular' === $weight_base ) {
15+
$weight_base = 'normal';
16+
}
17+
18+
return [
19+
// Base weight.
20+
[
21+
'selectors' => [
22+
'.facetwp-checkbox label',
23+
'.facetwp-radio label',
24+
],
25+
'declarations' => [
26+
'font-weight' => $weight_base,
27+
],
28+
],
29+
];

app/integrations/facetwp/template-functions.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -184,25 +184,6 @@ function bigbox_facetwp_sort_options( $options ) {
184184
return $options;
185185
}
186186

187-
/**
188-
* Match "No Results Found" with WooCommerce.
189-
*
190-
* @since 1.0.0
191-
*
192-
* @param string $translated_text Text that has been translated.
193-
* @param string $text Text to be translated.
194-
* @param string $domain Text domain.
195-
*/
196-
function bigbox_facetwp_gettext_no_results( $translated_text, $text, $domain ) {
197-
if ( 'No results found' === $text && 'fwp' === $domain ) {
198-
ob_start();
199-
wc_get_template( 'loop/no-products-found.php' );
200-
return ob_get_clean();
201-
}
202-
203-
return $translated_text;
204-
}
205-
206187
/**
207188
* Dynamic navbar facets.
208189
*

app/integrations/facetwp/template-hooks.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
// Add custom sort options.
5252
add_filter( 'facetwp_sort_options', 'bigbox_facetwp_sort_options' );
5353

54-
// Match "No Results Found" with WooCommerce.
55-
add_filter( 'gettext', 'bigbox_facetwp_gettext_no_results', 20, 3 );
56-
5754
/**
5855
* General
5956
*/

app/integrations/woocommerce-bookings/class-woocommerce-bookings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class WooCommerce_Bookings extends Integration implements Registerable, Service
4444
* @since 1.16.0
4545
*/
4646
protected $inline_css_configs = [
47-
'color-success',
47+
'color-primary',
4848
'color-gray-200',
4949
'color-gray-300',
5050
'color-gray-700',

app/integrations/woocommerce-bookings/customize/output/color-gray-300.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
'selectors' => [
2121
'.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-header',
2222
'.wc-bookings-booking-form .form-field ul.block-picker li:nth-child(even) a',
23+
'.wc-bookings-booking-form .form-field ul.block-picker li:nth-child(odd) a',
2324
'.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-calendar td',
2425
'.wc-bookings-booking-form .wc-bookings-booking-cost',
2526
],

app/integrations/woocommerce-bookings/customize/output/color-success.php renamed to app/integrations/woocommerce-bookings/customize/output/color-primary.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Config for success color output.
3+
* Config for primary color output.
44
*
55
* @since 1.16.0
66
*
@@ -13,7 +13,7 @@
1313
exit; // Exit if accessed directly.
1414
}
1515

16-
$success = bigbox_get_theme_color( 'success' );
16+
$primary = bigbox_get_theme_color( 'primary' );
1717

1818
return [
1919
[
@@ -27,7 +27,7 @@
2727
'.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-calendar td.bookable-range .ui-state-default:hover',
2828
],
2929
'declarations' => [
30-
'background-color' => esc_attr( $success ) . ' !important',
30+
'background-color' => esc_attr( $primary ) . ' !important',
3131
],
3232
],
3333
[
@@ -37,7 +37,7 @@
3737
'.wc-bookings-booking-form .form-field ul.block-picker li a.selected',
3838
],
3939
'declarations' => [
40-
'border-color' => esc_attr( $success ) . ' !important',
40+
'border-color' => esc_attr( $primary ) . ' !important',
4141
],
4242
],
4343
];

app/integrations/woocommerce/customize/controls/catalog.php

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,44 @@
2121
* @param WP_Customize_Manager $wp_customize The Customizer object.
2222
*/
2323
function bigbox_woocommerce_customize_register_catalog_controls( $wp_customize ) {
24+
$wp_customize->add_setting(
25+
'display-rating',
26+
[
27+
'default' => true,
28+
'sanitize_callback' => 'absint',
29+
]
30+
);
31+
32+
$wp_customize->add_control(
33+
'display-rating',
34+
[
35+
/* translators: Customizer control label. */
36+
'label' => __( 'Display rating', 'bigbox' ),
37+
'type' => 'checkbox',
38+
'section' => 'woocommerce_product_catalog',
39+
'priority' => 50,
40+
]
41+
);
42+
43+
$wp_customize->add_setting(
44+
'display-price',
45+
[
46+
'default' => true,
47+
'sanitize_callback' => 'absint',
48+
]
49+
);
50+
51+
$wp_customize->add_control(
52+
'display-price',
53+
[
54+
/* translators: Customizer control label. */
55+
'label' => __( 'Display price', 'bigbox' ),
56+
'type' => 'checkbox',
57+
'section' => 'woocommerce_product_catalog',
58+
'priority' => 60,
59+
]
60+
);
61+
2462
$wp_customize->add_setting(
2563
'display-inventory',
2664
[
@@ -33,10 +71,10 @@ function bigbox_woocommerce_customize_register_catalog_controls( $wp_customize )
3371
'display-inventory',
3472
[
3573
/* translators: Customizer control label. */
36-
'label' => __( 'Display stock counts', 'bigbox' ),
74+
'label' => __( 'Display stock information', 'bigbox' ),
3775
'type' => 'checkbox',
3876
'section' => 'woocommerce_product_catalog',
39-
'priority' => 50,
77+
'priority' => 70,
4078
]
4179
);
4280

@@ -55,7 +93,7 @@ function bigbox_woocommerce_customize_register_catalog_controls( $wp_customize )
5593
'label' => __( 'Display sale "flash"', 'bigbox' ),
5694
'type' => 'checkbox',
5795
'section' => 'woocommerce_product_catalog',
58-
'priority' => 60,
96+
'priority' => 80,
5997
]
6098
);
6199

@@ -74,7 +112,26 @@ function bigbox_woocommerce_customize_register_catalog_controls( $wp_customize )
74112
'label' => __( 'Display short description', 'bigbox' ),
75113
'type' => 'checkbox',
76114
'section' => 'woocommerce_product_catalog',
77-
'priority' => 60,
115+
'priority' => 90,
116+
]
117+
);
118+
119+
$wp_customize->add_setting(
120+
'display-more-options',
121+
[
122+
'default' => true,
123+
'sanitize_callback' => 'absint',
124+
]
125+
);
126+
127+
$wp_customize->add_control(
128+
'display-more-options',
129+
[
130+
/* translators: Customizer control label. */
131+
'label' => __( 'Display "More Options" link for variable products', 'bigbox' ),
132+
'type' => 'checkbox',
133+
'section' => 'woocommerce_product_catalog',
134+
'priority' => 100,
78135
]
79136
);
80137
}

app/integrations/woocommerce/template-functions.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,6 @@ function bigbox_woocommerce_template_loop_variations() {
286286
* @since 1.0.0
287287
*/
288288
function bigbox_woocommerce_template_loop_stock() {
289-
if ( ! get_theme_mod( 'display-inventory', true ) ) {
290-
return;
291-
}
292-
293289
$html = wc_get_stock_html( wc_get_product( get_post() ) );
294290

295291
if ( '' === $html ) {
@@ -310,10 +306,6 @@ function bigbox_woocommerce_template_loop_stock() {
310306
* @since 3.0.0
311307
*/
312308
function bigbox_woocommerce_template_short_description() {
313-
if ( ! get_theme_mod( 'display-short-description', false ) ) {
314-
return;
315-
}
316-
317309
$product = wc_get_product( get_post() );
318310
$description = apply_filters( 'woocommerce_short_description', $product->get_short_description() );
319311

0 commit comments

Comments
 (0)