Skip to content

Commit

Permalink
1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
webmandesign committed Apr 28, 2018
1 parent 8226fcd commit c15274f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Reykjavik Changelog

## 1.1.1

* **Fix**: Backwards compatibility with Beaver Builder pre-2.1

### Files changed:

changelog.md
style.css
includes/plugins/beaver-builder/class-beaver-builder-assets.php
includes/plugins/beaver-themer/class-beaver-themer.php


## 1.1.0

* **Add**: Elementor Pro Theme Builder compatibility!
Expand Down
21 changes: 8 additions & 13 deletions includes/plugins/beaver-builder/class-beaver-builder-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
* @version 1.1.0
* @version 1.1.1
*
* Contents:
*
Expand Down Expand Up @@ -90,34 +90,29 @@ public static function init() {
* Load plugin stylesheets after the theme stylesheet
*
* @since 1.0.0
* @version 1.1.0
* @version 1.1.1
*/
public static function late_load() {

// Requirements check

if ( (bool) apply_filters( 'wmhook_reykjavik_beaver_builder_assets_late_load', false ) ) {
return;
}


// Helper variables

$priority = 120;
$callbacks = array(
$callbacks = (array) apply_filters( 'wmhook_reykjavik_beaver_builder_assets_late_load_callbacks', array(
'FLBuilder::enqueue_all_layouts_styles_scripts' => 10,
'FLBuilder::enqueue_ui_styles_scripts' => 11,
'FLBuilderUISettingsForms::enqueue_settings_config' => 11,
);
) );

$order = 0;


// Processing

foreach ( $callbacks as $callback => $default_priority ) {
remove_action( 'wp_enqueue_scripts', $callback, $default_priority );
add_action( 'wp_enqueue_scripts', $callback, $priority + $order++ );
if ( is_callable( $callback ) ) {
remove_action( 'wp_enqueue_scripts', $callback, $default_priority );
add_action( 'wp_enqueue_scripts', $callback, $priority + $order++ );
}
}

} // /late_load
Expand Down
25 changes: 10 additions & 15 deletions includes/plugins/beaver-themer/class-beaver-themer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
* @version 1.1.0
* @version 1.1.1
*
* Contents:
*
Expand Down Expand Up @@ -93,34 +93,29 @@ public static function init() {
/**
* Load plugin assets a bit later (see Beaver Builder compatibility)
*
* @since 1.1.0
* @version 1.1.0
* @since 1.1.1
* @version 1.1.1
*/
public static function late_load() {

// Requirements check

if ( (bool) apply_filters( 'wmhook_reykjavik_beaver_builder_assets_late_load', false ) ) {
return;
}


// Helper variables

$priority = 120;
$callbacks = array(
$callbacks = (array) apply_filters( 'wmhook_reykjavik_beaver_builder_assets_late_load_callbacks', array(
'FLThemeBuilderLayoutFrontendEdit::enqueue_scripts' => 11,
);
), 'themer' );

// Has to be enqueued after `{%= prefix_class %}_Beaver_Builder_Assets::late_load()` UI assets.
// Has to be enqueued after `Reykjavik_Beaver_Builder_Assets::late_load()` UI assets.
$order = 3;


// Processing

foreach ( $callbacks as $callback => $default_priority ) {
remove_action( 'wp_enqueue_scripts', $callback, $default_priority );
add_action( 'wp_enqueue_scripts', $callback, $priority + $order++ );
if ( is_callable( $callback ) ) {
remove_action( 'wp_enqueue_scripts', $callback, $default_priority );
add_action( 'wp_enqueue_scripts', $callback, $priority + $order++ );
}
}

} // /late_load
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: Reykjavik
Theme URI: https://www.webmandesign.eu/portfolio/reykjavik-wordpress-theme/
Author: WebMan Design
Author URI: https://www.webmandesign.eu/
Version: 1.1.0
Version: 1.1.1
Text Domain: reykjavik
Domain Path: /languages
License: GNU General Public License v3
Expand Down

0 comments on commit c15274f

Please # to comment.