Skip to content

Commit

Permalink
Background patterns not displayed if background image is set fixes #135
Browse files Browse the repository at this point in the history
  • Loading branch information
rramo012 committed Nov 5, 2019
1 parent b9e0ae3 commit 0dbc315
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ user guide for more information.
### 2.1.12 ###
* Bug fix: `mce_external_plugins` returning incorrect values. [#129](https://github.com/BoldGrid/boldgrid-theme-framework/issues/129)
* Bug fix: WP 5.3 - Color palette preview fails with js error. [#132](https://github.com/BoldGrid/boldgrid-theme-framework/issues/132)
* Bug fix: Background patterns not displayed if background image is set. [#135](https://github.com/BoldGrid/boldgrid-theme-framework/issues/135)
* Update: Font sprite and webfonts json were updated to match latest font availability. [#134](https://github.com/BoldGrid/boldgrid-theme-framework/issues/134)


### 2.1.11 ###
* Bug fix: Ensure that the site header is correctly output when settings are updated in customizer. [#127](https://github.com/BoldGrid/boldgrid-theme-framework/issues/127)
* Update: Changed upsell link in customizer. [#126](https://github.com/BoldGrid/boldgrid-theme-framework/issues/126)
Expand Down
9 changes: 9 additions & 0 deletions src/includes/class-boldgrid-framework-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ private function customizer_bg() {
'default-image' => $this->configs['customizer-options']['background']['defaults']['background_image'],
'default-repeat' => $this->configs['customizer-options']['background']['defaults']['background_repeat'],
'default-attachment' => $this->configs['customizer-options']['background']['defaults']['background_attachment'],
'wp-head-callback' => function ( $styles ) {

// Disable background image styles, if using a pattern.
if ( 'pattern' === get_theme_mod( 'boldgrid_background_type' ) ) {
$styles = '';
}

return $styles;
}
) ) );
}
}
Expand Down

0 comments on commit 0dbc315

Please sign in to comment.