Skip to content

Commit

Permalink
Branch 2.9.3 (#496)
Browse files Browse the repository at this point in the history
* fixes #490 (#495)

* fixes #376 (#492)

* resolves #317 (#491)

* update readme and versions

* fix heading font-size slider

* update version numbers

* Update README.md
  • Loading branch information
jamesros161 committed Sep 14, 2021
1 parent 7b9ca45 commit e0b1303
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ user guide for more information.

## Changelog ##

### 2.9.3 ###
* Bug Fix: Removed Font Awesome notice from the admin notices [#317](https://github.com/BoldGrid/boldgrid-theme-framework/issues/317)
* Bug Fix: Crio Pro Sticky Header Menu [#376](https://github.com/BoldGrid/boldgrid-theme-framework/issues/317)
* Bug Fix: Default menu locations not selectable after changing them in the customizer [#483](https://github.com/BoldGrid/boldgrid-theme-framework/issues/483)
* Improvement: Make embedded videos more responsive [#490](https://github.com/BoldGrid/boldgrid-theme-framework/issues/490)

### 2.9.2 ###
* Bug Fix: Footer Layout Delete Buttons are disabled in same row as Attribution [#478](https://github.com/BoldGrid/boldgrid-theme-framework/issues/478)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boldgrid-theme-framework",
"version": "2.9.2",
"version": "2.9.3",
"description": "BoldGrid Theme Framework",
"main": "index.js",
"engines": {
Expand Down
19 changes: 18 additions & 1 deletion src/assets/js/customizer/controls/bgtfw-sortable-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,24 @@ export default {
* @since 2.0.3
*/
getConnectedControls() {
return _.filter( window._wpCustomizeSettings.controls, { type: this.params.type } );
var controls = window._wpCustomizeSettings.controls;

/*
* The bgtfw_sticky_header_layout and bgtfw_header_layout control values
* are used when using the preset layouts, but the '*_header_layout_advanced'
* is used when using a custom layout. Therefore, when using a custom layout,
* we need to omit these controls from the list of connected controls or else
* the menus will not work properly.
*/
if ( _.isFunction( wp.customize( 'bgtfw_sticky_header_preset' ) ) && 'custom' === wp.customize( 'bgtfw_sticky_header_preset' )() ) {
controls = _.omit( controls, 'bgtfw_sticky_header_layout' );
}

if ( _.isFunction( wp.customize( 'bgtfw_header_preset' ) ) && 'custom' === wp.customize( 'bgtfw_header_preset' )() ) {
controls = _.omit( controls, 'bgtfw_header_layout' );
}

return _.filter( controls, { type: this.params.type } );
},

/**
Expand Down
4 changes: 2 additions & 2 deletions src/assets/js/customizer/typography/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export class Preview {

// Handle variant of font sizes.
let variant = to.variant;
let fontWeight = parseInt( variant );
let fontStyle = variant.replace( fontWeight, '' );
let fontWeight = variant ? parseInt( variant ) : 'initial';
let fontStyle = variant ? variant.replace( fontWeight, '' ) : 'initial';

// Build CSS.
let css = '';
Expand Down
28 changes: 28 additions & 0 deletions src/assets/js/front-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,34 @@ var BoldGrid = BoldGrid || {};
this.skipLink();
this.forms();
this.cssVarsPonyfill();
this.responsiveVideos();
},

// Handle responsive video iframe embeds.
responsiveVideos: function() {
$( window ).on( 'resize', function() {
var proportion,
parentWidth;

// Loop iframe elements.
document.querySelectorAll( 'iframe' ).forEach( function( iframe ) {

// Only continue if the iframe has a width & height defined.
if ( iframe.width && iframe.height ) {

// Calculate the proportion/ratio based on the width & height.
proportion = parseFloat( iframe.width ) / parseFloat( iframe.height );

// Get the parent element's width.
parentWidth = parseFloat( window.getComputedStyle( iframe.parentElement, null ).width.replace( 'px', '' ) );

// Set the max-width & height.
iframe.style.maxWidth = '100%';
iframe.style.maxHeight = Math.round( parentWidth / proportion ).toString() + 'px';
}
} );

} );
},

// Observe classList changes on body element.
Expand Down
6 changes: 5 additions & 1 deletion src/boldgrid-theme-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: BoldGrid Theme Framework
* Plugin URI: https://www.boldgrid.com/docs/configuration-file
* Description: BoldGrid Theme Framework is a library that allows you to easily make BoldGrid themes. Please see our reference guide for more information: https://www.boldgrid.com/docs/configuration-file
* Version: 2.9.2
* Version: 2.9.3
* Author: BoldGrid.com <wpb@boldgrid.com>
* Author URI: https://www.boldgrid.com/
* Text Domain: bgtfw
Expand Down Expand Up @@ -38,6 +38,10 @@
$bgtfw_path = ABSPATH . BGTFW_PATH;
}

if ( ! defined( 'FONTAWESOME_DIR_PATH' ) ) {
define( 'FONTAWESOME_DIR_PATH', $bgtfw_path . '/assets/css/font-awesome' );
}

$bgtfw_class = $bgtfw_path . '/includes/class-boldgrid-framework.php';

if ( file_exists( $bgtfw_class ) ) {
Expand Down

0 comments on commit e0b1303

Please sign in to comment.