From c4cedda3038cf5a64663c3ca68acc0444c88ce21 Mon Sep 17 00:00:00 2001 From: Nikhil Chavan Date: Mon, 11 Dec 2017 17:19:19 +0530 Subject: [PATCH 1/4] Use FLBuilderShortcodes::insert_layout() to render beaver builder layout --- class-bb-header-footer.php | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/class-bb-header-footer.php b/class-bb-header-footer.php index 43029f3..6161c71 100644 --- a/class-bb-header-footer.php +++ b/class-bb-header-footer.php @@ -24,7 +24,7 @@ function __construct() { $this->template = get_template(); - if ( class_exists( 'FLBuilder' ) ) { + if ( class_exists( 'FLBuilder' ) && is_callable( 'FLBuilderShortcodes::insert_layout' ) ) { $this->includes(); $this->load_textdomain(); @@ -111,17 +111,6 @@ public function enqueue_scripts() { wp_enqueue_style( 'bbhf-style', BBHF_URL . 'assets/css/bb-header-footer.css', array(), BBHF_VER ); wp_register_script( 'bb-header-footer', BBHF_URL . 'assets/js/bb-header-footer.js', array( 'jquery' ), BBHF_VER, true ); wp_enqueue_script( 'bb-header-footer' ); - - $header_id = BB_Header_Footer::get_settings( 'bb_header_id', '' ); - $footer_id = BB_Header_Footer::get_settings( 'bb_footer_id', '' ); - - if ( '' !== $header_id && is_callable( 'FLBuilder::enqueue_layout_styles_scripts_by_id' ) ) { - FLBuilder::enqueue_layout_styles_scripts_by_id( $header_id ); - } - - if ( '' !== $footer_id && is_callable( 'FLBuilder::enqueue_layout_styles_scripts_by_id' ) ) { - FLBuilder::enqueue_layout_styles_scripts_by_id( $footer_id ); - } } /** @@ -217,17 +206,11 @@ public static function get_footer_content() { * @return String Rendered markup of the layout */ public static function render_bb_layout( $post_id ) { - if ( is_callable( 'FLBuilder::render_content_by_id' ) ) { - - return FLBuilder::render_content_by_id( $post_id ); - } elseif ( is_callable( 'FLBuilderShortcodes::insert_layout' ) ) { - - return FLBuilderShortcodes::insert_layout( - array( - 'id' => $post_id, - ) - ); - } + return FLBuilderShortcodes::insert_layout( + array( + 'id' => $post_id, + ) + ); } /** From 0a414612d03538c7f2533bc0d5dc70f539aab49c Mon Sep 17 00:00:00 2001 From: Nikhil Chavan Date: Mon, 11 Dec 2017 17:21:29 +0530 Subject: [PATCH 2/4] Updated translation template --- languages/bb-header-footer.pot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/bb-header-footer.pot b/languages/bb-header-footer.pot index 91513f8..eafe47d 100644 --- a/languages/bb-header-footer.pot +++ b/languages/bb-header-footer.pot @@ -2,9 +2,9 @@ # This file is distributed under the same license as the Beaver Builder Header Footer package. msgid "" msgstr "" -"Project-Id-Version: Beaver Builder Header Footer 1.1.6-beta.2\n" +"Project-Id-Version: Beaver Builder Header Footer 1.1.6\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/bb-header-footer\n" -"POT-Creation-Date: 2017-10-13 07:02:34+00:00\n" +"POT-Creation-Date: 2017-12-11 11:49:28+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -91,7 +91,7 @@ msgid "" "activated." msgstr "" -#: class-bb-header-footer.php:172 +#: class-bb-header-footer.php:161 msgid "" "Hey, your current theme is not supported by BB Header Footer, click Date: Mon, 11 Dec 2017 18:06:01 +0530 Subject: [PATCH 3/4] Version bump v1.1.7 --- README.md | 10 +++++++--- bb-header-footer.php | 4 ++-- readme.txt | 8 ++++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 950e7e4..ac16c0d 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ **Tags:** beaver builder header footer, beaver builder modules, customize header, beaver builder addon, beaver builder, beaver builder extensions, beaver addons, beaver builder free, page builder addons, beaver builder template, beaver builder header, customize footer **Donate link:** https://www.paypal.me/BrainstormForce **Requires at least:** 3.6 -**Tested up to:** 4.8.0 -**Stable tag:** 1.1.5 +**Tested up to:** 4.9.1 +**Stable tag:** 1.1.7 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -93,7 +93,11 @@ href=”https://www.brainstormforce.com/go/brainstorm-force-twitter-page/?utm_so ## Changelog ## -### 1.1.6 (unreleased) ### +### 1.1.7 ### +- Fix: Beaver Builder layout cache missing loading CSS and JS files. +- Fix: When editing the header / footer the layout was being duplicated. + +### 1.1.6 ### - Fix: Menu module could not highlight the current menu item in the header template. - Improvement: Load the Header and Footer JS in the `wp_qneueue_script`. earlier this was loaded right where the shortcode is added. - Allow the plugin settings to be changed from child theme functions, This allows disabling and changing headers and footer per page from code. diff --git a/bb-header-footer.php b/bb-header-footer.php index d501362..d18c5c8 100644 --- a/bb-header-footer.php +++ b/bb-header-footer.php @@ -7,7 +7,7 @@ * Author URI: https://www.brainstormforce.com/ * Text Domain: bb-header-footer * Domain Path: /languages - * Version: 1.1.6 + * Version: 1.1.7 * * @package BB_Header_Footer */ @@ -17,7 +17,7 @@ */ require_once 'class-bb-header-footer.php'; -define( 'BBHF_VER', '1.1.6' ); +define( 'BBHF_VER', '1.1.7' ); define( 'BBHF_DIR', plugin_dir_path( __FILE__ ) ); define( 'BBHF_URL', plugins_url( '/', __FILE__ ) ); define( 'BBHF_PATH', plugin_basename( __FILE__ ) ); diff --git a/readme.txt b/readme.txt index 0e27a58..50576e0 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: brainstormforce, Nikschavan Tags: beaver builder header footer, beaver builder modules, customize header, beaver builder addon, beaver builder, beaver builder extensions, beaver addons, beaver builder free, page builder addons, beaver builder template, beaver builder header, customize footer Donate link: https://www.paypal.me/BrainstormForce Requires at least: 3.6 -Tested up to: 4.8.2 -Stable tag: 1.1.6 +Tested up to: 4.9.1 +Stable tag: 1.1.7 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -93,6 +93,10 @@ href=”https://www.brainstormforce.com/go/brainstorm-force-twitter-page/?utm_so == Changelog == += 1.1.7 = +- Fix: Beaver Builder layout cache missing loading CSS and JS files. +- Fix: When editing the header / footer the layout was being duplicated. + = 1.1.6 = - Fix: Menu module could not highlight the current menu item in the header template. - Improvement: Load the Header and Footer JS in the `wp_qneueue_script`. earlier this was loaded right where the shortcode is added. From 045cf1b6515f8e3f6ee6f77f32525774fb0030a6 Mon Sep 17 00:00:00 2001 From: Nikhil Chavan Date: Mon, 11 Dec 2017 23:17:00 +0530 Subject: [PATCH 4/4] Updated the changelog --- README.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac16c0d..2ff4413 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ href=”https://www.brainstormforce.com/go/brainstorm-force-twitter-page/?utm_so ## Changelog ## ### 1.1.7 ### -- Fix: Beaver Builder layout cache missing loading CSS and JS files. +- Fix: Beaver Builder layout cache missing some of the static CSS and JS files. - Fix: When editing the header / footer the layout was being duplicated. ### 1.1.6 ### diff --git a/readme.txt b/readme.txt index 50576e0..56be607 100644 --- a/readme.txt +++ b/readme.txt @@ -94,7 +94,7 @@ href=”https://www.brainstormforce.com/go/brainstorm-force-twitter-page/?utm_so == Changelog == = 1.1.7 = -- Fix: Beaver Builder layout cache missing loading CSS and JS files. +- Fix: Beaver Builder layout cache missing some of the static CSS and JS files. - Fix: When editing the header / footer the layout was being duplicated. = 1.1.6 =